1.1.1 • Published 9 years ago
eslint-plugin-inflection v1.1.1
ESLint Filename Inflection Plugin
ESLint plugin to check inflection of filenames
Add rules for whether or not filenames should be plural or singular.
Install
npm install eslint-plugin-inflection --saveUsage
Add to your .eslintrc.yml:
plugins:
- inflection
rules:
inflection/no-plural-filenames:
- erroror
plugins:
- inflection
rules:
inflection/no-singular-filenames:
- warnIt does what is sounds like it should do. With the no-plural-filenames rule enabled, these would be valid filenames:
bus.jsoctopus.jswoman.jshere-is-the-woman.jsHERE_IS_THE_WOMAN.JShereIsTheWoman.js
while these would be invalid:
buses.jsoctopi.jswomen.jshere-are-the-women.jsHERE_ARE_THE_WOMEN.JShereAreTheWomen.js
For the no-singular-filenames rule, it would be the opposite.