1.1.7 • Published 7 months ago

eslint-plugin-index v1.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

:point_up: eslint-plugin-index

License: MIT Conventional Commits

ESlint rules to ensure the proper usage of index.js files

Supported rules

ruledescriptionrecommended
index/only-import-exportAllow only import and export statements in index fileserror
index/forbidForbid files named indexoff

Installation and usage

You'll first need to install ESLint:

npm i -D eslint

Next, install eslint-plugin-index:

npm i -D eslint-plugin-index

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

{
  "plugins": ["index"]
}

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

{
  "plugins": ["index"],
  "rules": {
    "index/only-import-export": "error"
    "index/forbid": "off"
  }
}

Or start with the recommended rule set:

{
  "plugins": ["index"],
  "extends": ["plugin:index/recommended"]
}
1.1.7

7 months ago

1.1.6

8 months ago

1.1.5

12 months ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago