eslint-plugin-vitest
eslint-plugin-vitest copied to clipboard
Feature request: `consistent-test-file-path`
Some projects nest test files next to relevant source files in several __tests__ directories. It would be handy to enforce this practice. I found out the hard way that consistent-test-filename does what it says and only uses basename.
The API could be something like this:
'vitest/consistent-test-file-path': [
'error',
{
pattern: '**/__tests__/*',
},
],
Why can't we add an optional file path option to the consistent-test-filename rule instead? Won't that be a good idea? What do you think?
That's an even better idea! Thanks for thinking along.