eslint-plugin-inflection

1.1.1 • Public • Published

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 --save

Usage

Add to your .eslintrc.yml:

plugins:
  - inflection
rules:
  inflection/no-plural-filenames:
    - error

or

plugins:
  - inflection
rules:
  inflection/no-singular-filenames:
    - warn

It does what is sounds like it should do. With the no-plural-filenames rule enabled, these would be valid filenames:

  • bus.js
  • octopus.js
  • woman.js
  • here-is-the-woman.js
  • HERE_IS_THE_WOMAN.JS
  • hereIsTheWoman.js

while these would be invalid:

  • buses.js
  • octopi.js
  • women.js
  • here-are-the-women.js
  • HERE_ARE_THE_WOMEN.JS
  • hereAreTheWomen.js

For the no-singular-filenames rule, it would be the opposite.

Package Sidebar

Install

npm i eslint-plugin-inflection

Weekly Downloads

1

Version

1.1.1

License

MIT

Last publish

Collaborators

  • chadly