UNPKG

1.42 kBMarkdownView Raw
1# eslint-plugin-filenames
2
3[![NPM Version](https://img.shields.io/npm/v/eslint-plugin-filenames.svg?style=flat-square)](https://www.npmjs.org/package/eslint-plugin-filenames)
4[![Build Status](https://img.shields.io/travis/selaux/eslint-plugin-filenames.svg?style=flat-square)](https://travis-ci.org/selaux/eslint-plugin-filenames)
5[![Coverage Status](https://img.shields.io/coveralls/selaux/eslint-plugin-filenames.svg?style=flat-square)](https://coveralls.io/r/selaux/eslint-plugin-filenames?branch=master)
6[![Dependencies](https://img.shields.io/david/selaux/eslint-plugin-filenames.svg?style=flat-square)](https://david-dm.org/selaux/eslint-plugin-filenames)
7
8Adds [eslint](http://eslint.org/) rules to ensure consistent filenames for your javascript files.
9
10__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).
11
12## Enabling the plugin
13
14Modify your `.eslintrc` file to load the plugin and enable the rule.
15
16```
17{
18 "plugins": [
19 "filenames"
20 ],
21 "rules": {
22 "filenames/filenames": 2
23 }
24}
25```
26
27## Rules
28
29### Consistent Filenames (filenames)
30
31A rule to enforce a certain file naming convention.
32
33The convention can be configured using a regular expression (the default is `camelCase.js`):
34
35```
36"filenames": [2, "^[a-z_]$"]
37```
38
39## Changelog
40
41#### 0.1.0
42- Initial Release