/eslint-plugin-filenames

Eslint plugin to check filenames.

Primary LanguageJavaScript

eslint-plugin-filenames

NPM Version Build Status Coverage Status Dependencies

Adds eslint rules to ensure consistent filenames for your javascript files.

Please note: This plugin will only lint the filenames of the .js-files you are linting with eslint. It will ignore all other files (e.g. non-js files, files not linted with eslint).

Enabling the plugin

Modify your .eslintrc file to load the plugin and enable the rule.

{
  "plugins": [
    "filenames"
  ],
  "rules": {
    "filenames/filenames": 2
  }
}

Rules

Consistent Filenames (filenames)

A rule to enforce a certain file naming convention.

The convention can be configured using a regular expression (the default is camelCase.js):

"filenames": [2, "^[a-z_]$"]

Changelog

0.1.1

  • Fix: Text via stdin always passes
  • Tests: Travis builds also run on node 0.12 and iojs now

0.1.0

  • Initial Release