eslint-config-entva 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -0
- package/README.md +27 -0
- package/index.js +34 -0
- package/package.json +39 -0
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) Maxim Degterev <max@degterev.me> (https://max.degterev.me)
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# eslint-config-entva
|
2
|
+
|
3
|
+
> Shareable entva styleguide config for eslint.
|
4
|
+
|
5
|
+
Extends [`eslint-config-airbnb`](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb).
|
6
|
+
|
7
|
+
A shareable config to enforce entva styleguide: https://github.com/entva/styleguide
|
8
|
+
|
9
|
+
To see the rules that this config uses, please read the [config itself](./index.js).
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
```bash
|
14
|
+
npm install eslint-config-entva --save-dev
|
15
|
+
```
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
If you've installed `eslint-config-entva` locally within your project, just set your `eslint` config to:
|
20
|
+
|
21
|
+
```json
|
22
|
+
{
|
23
|
+
"extends": "eslint-config-entva"
|
24
|
+
}
|
25
|
+
```
|
26
|
+
|
27
|
+
## [MIT License](LICENSE)
|
package/index.js
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
module.exports = {
|
2
|
+
extends: [
|
3
|
+
'airbnb',
|
4
|
+
'airbnb/hooks',
|
5
|
+
'entva-base',
|
6
|
+
],
|
7
|
+
rules: {
|
8
|
+
'react/jsx-props-no-spreading': 'off',
|
9
|
+
'react/forbid-prop-types': 'off',
|
10
|
+
'react/require-default-props': 'off',
|
11
|
+
'react/no-array-index-key': 'off',
|
12
|
+
'react/jsx-no-bind': 'off',
|
13
|
+
'react/prop-types': 'off',
|
14
|
+
'react/react-in-jsx-scope': 'off',
|
15
|
+
'react/function-component-definition': [2, { namedComponents: 'arrow-function' }],
|
16
|
+
'react/jsx-max-props-per-line': ['error', { maximum: 1, when: 'multiline' }],
|
17
|
+
'react/jsx-uses-react': 'off',
|
18
|
+
'react/no-unstable-nested-components': ['error', { allowAsProps: true }],
|
19
|
+
'react/no-unused-class-component-methods': 'off',
|
20
|
+
'react-hooks/exhaustive-deps': 'off',
|
21
|
+
'react/display-name': 'off',
|
22
|
+
'react/jsx-one-expression-per-line': 'off', // doesn't let write sentences in React
|
23
|
+
|
24
|
+
'jsx-a11y/anchor-is-valid': 'off',
|
25
|
+
'jsx-a11y/anchor-has-content': 'off',
|
26
|
+
'jsx-a11y/no-static-element-interactions': 'off',
|
27
|
+
'jsx-a11y/click-events-have-key-events': 'off',
|
28
|
+
'jsx-a11y/media-has-caption': 'off',
|
29
|
+
'jsx-a11y/no-noninteractive-element-interactions': 'off',
|
30
|
+
'jsx-a11y/label-has-for': 'off',
|
31
|
+
'jsx-a11y/label-has-associated-control': 'off',
|
32
|
+
'jsx-a11y/control-has-associated-label': 'off',
|
33
|
+
},
|
34
|
+
};
|
package/package.json
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
{
|
2
|
+
"name": "eslint-config-entva",
|
3
|
+
"description": "Shareable entva styleguide config for eslint",
|
4
|
+
"author": "Max Degterev <max@degterev.me>",
|
5
|
+
"license": "MIT",
|
6
|
+
"readmeFilename": "README.md",
|
7
|
+
"repository": "entva/styleguide",
|
8
|
+
"bugs": "https://github.com/entva/styleguide/issues",
|
9
|
+
"version": "1.0.0",
|
10
|
+
"keywords": [
|
11
|
+
"linter",
|
12
|
+
"config",
|
13
|
+
"eslint",
|
14
|
+
"react"
|
15
|
+
],
|
16
|
+
"main": "index.js",
|
17
|
+
"scripts": {
|
18
|
+
"reinstall": "rm -rf node_modules package-lock.json && npm install",
|
19
|
+
"test": "node ../../../test ./test js jsx",
|
20
|
+
"rules": "node_modules/.bin/eslint --print-config file.js > eslint-ruleset-output.json",
|
21
|
+
"prepublishOnly": "npm test"
|
22
|
+
},
|
23
|
+
"devDependencies": {
|
24
|
+
"eslint": "^8.46.0",
|
25
|
+
"prop-types": "^15.8.1",
|
26
|
+
"react": "^18.2.0"
|
27
|
+
},
|
28
|
+
"dependencies": {
|
29
|
+
"eslint-config-airbnb": "^19.0.4",
|
30
|
+
"eslint-config-entva-base": "^1.0.0",
|
31
|
+
"eslint-plugin-import": "^2.28.0",
|
32
|
+
"eslint-plugin-jsx-a11y": "^6.7.1",
|
33
|
+
"eslint-plugin-react": "^7.33.1",
|
34
|
+
"eslint-plugin-react-hooks": "^4.6.0"
|
35
|
+
},
|
36
|
+
"peerDependencies": {
|
37
|
+
"eslint": "^8.x.x"
|
38
|
+
}
|
39
|
+
}
|