-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Add ability to lint file name and path #1140
Comments
https://github.com/textlint/textlint/tree/master/packages/textlint-tester Probably, we can implement this by passing textlint/packages/textlint-tester/src/textlint-tester.ts Lines 239 to 243 in 8138ec8
textlint/packages/@textlint/kernel/src/textlint-kernel-interface.ts Lines 85 to 86 in 8138ec8
|
This is a feature I've used in ESLint before, and is something I'm looking to use in textlint. For example in ESLint, here is how it is used:
https://github.com/kellyselden/eslint-plugin-json-files/blob/v2.1.0/tests/lib/rules/ensure-repository-directory.js#L11
https://github.com/kellyselden/eslint-plugin-json-files/blob/v2.1.0/lib/rules/ensure-repository-directory.js#L15
You can generate failures based on the filename if you want.
It would be nice to have this in textlint. The use case would be to write a rule that verifies files are in a correct spot. For example, I have a rule that verifies a CODEOWNERS file is not malformed, but I also want the rule to verify all the files are in an expected spot in a monorepo.
The text was updated successfully, but these errors were encountered: