eslint-path-checker

0.2.3 • Public • Published

eslint-path-checker

plugin for public-frontend

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-path-checker:

npm install eslint-path-checker --save-dev

Usage

Add eslint-path-checker to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "eslint-path-checker"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
      "eslint-path-checker/path-checker": ["error", { "alias": "@" }],
      "eslint-path-checker/public-api-import": [
        "error",
        {
          "alias": "@",
          "testFiles": ["**/*.test.*", "**/*.story.*", "**/StoreDecorator.tsx"]
        }
      ],
      "eslint-path-checker/layer-imports": [
        "error",
        {
          "alias": "@",
          "ignoreImportPatterns": ["**/StoreProvider", "**/testing"]
        }
      ]
    }
}

Rules

TODO: Run eslint-doc-generator to generate the rules list.

Readme

Keywords

Package Sidebar

Install

npm i eslint-path-checker

Weekly Downloads

0

Version

0.2.3

License

ISC

Unpacked Size

20.3 kB

Total Files

17

Last publish

Collaborators

  • tusvel