1.0.0 • Published 6 years ago
eslint-plugin-filepaths v1.0.0
eslint-plugin-filepaths
Verify filepaths and ensure they are placed correctly in your project.
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-filepaths:
$ npm install eslint-plugin-filepaths --save-devNote: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-filepaths globally.
Usage
Add filepaths to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"filepaths"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"filepaths/match-regex": [
"error",
[
{
"file": "[a-z]+.test.js",
"folder": "__tests__"
},
{
"file": "[a-z]+.stories.js",
"folder": "stories"
}
]
]
}
}Supported Rules
match-regex
1.0.0
6 years ago