vite-plugin-eslint
vite-plugin-eslint copied to clipboard
`vite build` produces duplicate eslint output
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.
@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.
I have the same issue.
@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: https://github.com/solidjs/vite-plugin-solid/pull/101