Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vite build produces duplicate eslint output #64

Open
samcarswell opened this issue Mar 10, 2023 · 3 comments
Open

vite build produces duplicate eslint output #64

samcarswell opened this issue Mar 10, 2023 · 3 comments

Comments

@samcarswell
Copy link

vite build seems to be producing duplicate output for eslint; one for [plugin:vite-plugin-eslint] and one normal:

[plugin:vite-plugin-eslint] 
/Users/user/project/src/utilities/resourceUtils.ts
   1:10  warning  'useState' is defined but never used                @typescript-eslint/no-unused-vars
   1:20  warning  'useEffect' is defined but never used               @typescript-eslint/no-unused-vars
   4:20  warning  Unexpected any. Specify a different type            @typescript-eslint/no-explicit-any
   8:9   error    'base' is never reassigned. Use 'const' instead     prefer-const
  11:9   error    'options' is never reassigned. Use 'const' instead  prefer-const

✖ 5 problems (2 errors, 3 warnings)
  2 errors and 0 warnings potentially fixable with the `--fix` option.


/Users/user/project/src/utilities/resourceUtils.ts
   1:10  warning  'useState' is defined but never used                @typescript-eslint/no-unused-vars
   1:20  warning  'useEffect' is defined but never used               @typescript-eslint/no-unused-vars
   4:20  warning  Unexpected any. Specify a different type            @typescript-eslint/no-explicit-any
   8:9   error    'base' is never reassigned. Use 'const' instead     prefer-const
  11:9   error    'options' is never reassigned. Use 'const' instead  prefer-const

✖ 5 problems (2 errors, 3 warnings)
  2 errors and 0 warnings potentially fixable with the `--fix` option.

@MrEraxd
Copy link

MrEraxd commented Apr 11, 2023

@samcarswell

I have the same error. Are you using any framework? These are my rules:

"extends": [
    "eslint:recommended",
    "plugin:vue/vue3-essential",
    "plugin:@typescript-eslint/recommended",
    "prettier"
 ]

Found out that when I remove typescript plugin it is working fine.

Also setting emmitError to false removes one of outputs, same for emmitWarning.

Everything is fixed by disabling cache.

@olafszad
Copy link

I have the same issue.

@GitMurf
Copy link

GitMurf commented Aug 31, 2023

@samcarswell et al, not sure if you ever got to the bottom of this but I was experiencing a similar issue with vite and it ended up being the solidjs plugin creating duplicate build config entries (running twice). This sounds very similar to your issue. Check out details here: solidjs/vite-plugin-solid#101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants