Skip to content
New issue

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

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

Already on GitHub? # to your account

Feature request: consistent-test-file-path #371

Open
h0adp0re opened this issue Feb 7, 2024 · 2 comments
Open

Feature request: consistent-test-file-path #371

h0adp0re opened this issue Feb 7, 2024 · 2 comments
Labels
good first issue Good for newcomers

Comments

@h0adp0re
Copy link

h0adp0re commented Feb 7, 2024

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__/*',
  },
],
@veritem
Copy link
Member

veritem commented Feb 7, 2024

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?

@h0adp0re
Copy link
Author

h0adp0re commented Feb 7, 2024

That's an even better idea! Thanks for thinking along.

@veritem veritem added the good first issue Good for newcomers label Dec 26, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants