0.0.7 • Published 2 years ago

eslint-plugin-course-test-plugin v0.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

eslint-plugin-course-test-plugin

ESLint path checker plugin

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-course-test-plugin:

npm install eslint-plugin-course-test-plugin --save-dev

Usage

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

{
    "plugins": [
        "course-test-plugin"
    ]
}

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

{
    "rules": {
        "course-test-plugin/path-checker": "error",
        "course-test-plugin/public-api-imports": "error"
    }
}

Folders that will be checked by default

path-checker - entities, features, shared, widgets, pages

public-api-imports - entities, features, widgets, pages

Custom

Also, you can configure the rules more dynamically.

  • Add aliases
  • Add custom folders name for checking only these folders.
{
    "rules": {
        "course-test-plugin/path-checker": [
          "error",
          {
            "alias": "@"
          },
          [
            "pages",
            "modules",
            "components",
            "...otherFolders"
          ]
        ],
        "course-test-plugin/public-api-imports": [
          "error",
          {
            "alias": "@"
          },
          [
            "pages",
            "modules",
            "components",
            "...otherFolders"
          ]
        ]
    }
}

Rules

šŸ”§ Automatically fixable by the --fix CLI option.

NameDescriptionšŸ”§
path-checkerArchitecture relative path checker
public-api-importsCheck correct using of public apišŸ”§
0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago