eslint-plugin-filepaths

1.0.0 • Public • Published

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

Next, install eslint-plugin-filepaths:

$ npm install eslint-plugin-filepaths --save-dev

Note: 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

Package Sidebar

Install

npm i eslint-plugin-filepaths

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

47.6 kB

Total Files

8

Last publish

Collaborators

  • rafaelrozon