power-linter 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/eslint/config.js +70 -61
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "power-linter",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "power-linter — линтер (ESLint) и форматтер (Prettier) с расширяемой архитектурой для произвольных правил.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
26
26
|
"eslint-plugin-react": "^7.30.1",
|
|
27
27
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
28
|
-
"power-esrules": "^0.1.
|
|
28
|
+
"power-esrules": "^0.1.1",
|
|
29
29
|
"prettier": "^3.2.5"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
package/src/eslint/config.js
CHANGED
|
@@ -1,63 +1,72 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
2
|
+
root: true,
|
|
3
|
+
env: {
|
|
4
|
+
browser: true,
|
|
5
|
+
node: true,
|
|
6
|
+
es2021: true,
|
|
7
|
+
},
|
|
8
|
+
extends: [
|
|
9
|
+
"airbnb",
|
|
10
|
+
"airbnb/hooks",
|
|
11
|
+
"eslint:recommended",
|
|
12
|
+
"prettier",
|
|
13
|
+
"plugin:power-esrules/recommended",
|
|
14
|
+
],
|
|
15
|
+
parser: "@babel/eslint-parser",
|
|
16
|
+
parserOptions: {
|
|
17
|
+
requireConfigFile: false,
|
|
18
|
+
},
|
|
19
|
+
globals: {
|
|
20
|
+
document: true,
|
|
21
|
+
localStorage: true,
|
|
22
|
+
Headers: true,
|
|
23
|
+
fetch: true,
|
|
24
|
+
},
|
|
25
|
+
rules: {
|
|
26
|
+
"no-continue": 0,
|
|
27
|
+
"consistent-return": 0,
|
|
28
|
+
"no-constant-condition": 0,
|
|
29
|
+
"arrow-parens": 0,
|
|
30
|
+
"no-else-return": 0,
|
|
31
|
+
"global-require": 0,
|
|
32
|
+
"max-len": ["error", { code: 120, ignorePattern: "^import\\W.*" }],
|
|
33
|
+
"linebreak-style": 0,
|
|
34
|
+
indent: 0,
|
|
35
|
+
"prefer-template": ["warn"],
|
|
36
|
+
"no-restricted-syntax": 0,
|
|
37
|
+
"no-prototype-builtins": 0,
|
|
38
|
+
"no-param-reassign": ["error", { props: false }],
|
|
39
|
+
"comma-dangle": ["error", "only-multiline"],
|
|
40
|
+
"no-undef": 0,
|
|
41
|
+
"no-shadow": 0,
|
|
42
|
+
"no-plusplus": 0,
|
|
43
|
+
"arrow-body-style": ["error", "as-needed"],
|
|
44
|
+
"default-param-last": 0,
|
|
45
|
+
"class-methods-use-this": ["error", { enforceForClassFields: false }],
|
|
46
|
+
"no-use-before-define": [
|
|
47
|
+
"error",
|
|
48
|
+
{ functions: false, classes: true, variables: true },
|
|
49
|
+
],
|
|
50
|
+
"no-useless-escape": "warn",
|
|
51
|
+
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
52
|
+
"func-names": 0,
|
|
53
|
+
"jsx-a11y/anchor-is-valid": ["warn"],
|
|
54
|
+
"jsx-a11y/no-static-element-interactions": 0,
|
|
55
|
+
"jsx-a11y/click-events-have-key-events": ["warn"],
|
|
56
|
+
"import/prefer-default-export": 0,
|
|
57
|
+
"import/extensions": ["warn", { jsx: "never" }],
|
|
58
|
+
"import/no-unresolved": 0,
|
|
59
|
+
"import/no-extraneous-dependencies": 0,
|
|
60
|
+
"react/jsx-curly-brace-presence": 0,
|
|
61
|
+
"react/jsx-filename-extension": ["warn", { extensions: [".js", ".jsx"] }],
|
|
62
|
+
"react/require-default-props": 0,
|
|
63
|
+
"react/jsx-curly-spacing": 0,
|
|
64
|
+
"react/jsx-indent": ["error", 4],
|
|
65
|
+
"react/jsx-indent-props": 0,
|
|
66
|
+
"react/forbid-prop-types": 0,
|
|
67
|
+
"react/sort-comp": 0,
|
|
68
|
+
"react/prop-types": 0,
|
|
69
|
+
"react/jsx-props-no-spreading": 0,
|
|
70
|
+
"react/jsx-no-bind": 0,
|
|
71
|
+
},
|
|
63
72
|
};
|