0.0.24 • Published 7 months ago

eslint-plugin-path-checker-1911 v0.0.24

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

Custom Eslint plugin to check import paths

Start work:

  1. Install 'yo' globally: npm i -g yo
  2. Create custom plugin: yo eslint:plugin
  3. Create custom rules for plugin: yo eslint:rule
  4. Update current version in package.json before publishing
  5. Run npm adduser and sign in to npmjs.com once before publishing
  6. Publish npm plugin: npm publish

Plugin rules

- layer imports Проверка вышележащих и нижележащих импортов: - вышележащие могут использовать нижележащие ('pages' могут использовать 'entities' и 'features') - нижележащие не могут использовать вышележащие ('entities' не могут использовать 'features' или 'pages')

- path checker Проверка импортов внутри модуля (должны быть всегда относительными)

- public api imports Проверка импортов из внешних модулей (должны быть через 'publicApi')


Plugin installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-path-checker-1911:

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

Plugin usage

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

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

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

{
    "rules": {
        "path-checker-1911/rule-name": 2
    }
}
0.0.22

7 months ago

0.0.23

7 months ago

0.0.24

7 months ago

0.0.20

8 months ago

0.0.17

9 months ago

0.0.18

8 months ago

0.0.19

8 months ago

0.0.10

9 months ago

0.0.11

9 months ago

0.0.12

9 months ago

0.0.13

9 months ago

0.0.14

9 months ago

0.0.15

9 months ago

0.0.9

9 months ago

0.0.16

9 months ago

0.0.8

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago

0.0.0

10 months ago