Just noticed when I'm in a test file within the <package>/test which should be vite…
Private research annotation
Sign in to add a private research label or note.
- User
Just noticed when I'm in a test file within the /test which should be vite world, it shouts:
ESLint: 'vitest' should be listed in the project's dependencies, not devDependencies. (import/no-extraneous-dependencies)
Any idea how we can add this in
Assistant· claude-opus-4-7
Found it. The base config's
import/no-extraneous-dependenciesallowlist (packages/eslint-config-base/src/configs/base.ts:512-519) covers**/*.{test,spec}.*and**/__tests__/**, but not files in a plain**/test/**directory. Same gap exists inflavour-vitest.ts:14-18— files under<pkg>/test/foo.tsaren't picked up as test files at all.I'll extend both configs to recognize
**/test/**.Assistant· claude-opus-4-7
Let me verify the build still passes.
Assistant· claude-opus-4-7
Build passes. Two changes:
base.ts:512-521— added**/test/**and**/tests/**to theimport/no-extraneous-dependenciesallowlist so importingvitest(a devDependency) from those folders no longer flags.flavour-vitest.ts:14-20— added the same globs to the vitest flavour'sfilesso the relaxed test rules + vitest globals also apply to files placed under<package>/test/, not just*.test.ts/__tests__/.After consumers bump to the new release of
@abinnovision/eslint-config-base, files like<package>/test/foo.tswill be treated as test files end-to-end.