@nfq/eslint-config 1.2.7 → 2.1.0
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/CHANGELOG.md +35 -0
- package/config/globals.js +1 -1
- package/config/plugins.js +3 -1
- package/config/settings.js +26 -1
- package/package.json +5 -1
- package/pnpm-lock.yaml +129 -5
- package/rules/errors.js +1 -7
- package/rules/imports.js +40 -40
- package/rules/jsdoc.js +89 -0
- package/rules/security.js +9 -0
- package/rules/style.js +1 -11
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
+
|
|
5
|
+
## [2.1.0](https://github.com/nfqde/eslint-config-nfq/compare/v2.0.0...v2.1.0) (2022-05-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **jsdoc:** New jsdoc parser plugin ([#12](https://github.com/nfqde/eslint-config-nfq/issues/12)) ([a495a28](https://github.com/nfqde/eslint-config-nfq/commit/a495a282838132377d18b6615e39485dedbce3f2))
|
|
11
|
+
|
|
12
|
+
## 2.0.0 (2022-02-24)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### ⚠ BREAKING CHANGES
|
|
16
|
+
|
|
17
|
+
* **Babel:** New peer dependency
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **@nfq/no-magic-numbers:** Add also arrays for ignore ([#5](https://github.com/nfqde/eslint-config-nfq/issues/5)) ([10a8c6e](https://github.com/nfqde/eslint-config-nfq/commit/10a8c6ece0841e85f4bcbfb3451c259cc0cf016b))
|
|
22
|
+
* **Babel:** Changed babel-eslint parser to @babel/eslint-parser ([#9](https://github.com/nfqde/eslint-config-nfq/issues/9)) ([66eb90f](https://github.com/nfqde/eslint-config-nfq/commit/66eb90f95b8e0ee7ad7352d3760b962f13e6f375))
|
|
23
|
+
* **import/order:** Add new imports ([#4](https://github.com/nfqde/eslint-config-nfq/issues/4)) ([10b708c](https://github.com/nfqde/eslint-config-nfq/commit/10b708cf228772328094607ca3c5a8ca97d16063))
|
|
24
|
+
* **no-param-reassign:** Add key and value to ignore list for objects ([#6](https://github.com/nfqde/eslint-config-nfq/issues/6)) ([6adf418](https://github.com/nfqde/eslint-config-nfq/commit/6adf41817d439c27046f7ab68585c96e504ff5df))
|
|
25
|
+
* **Plugins:** Changed peerdependency to scooped nfq package ([#1](https://github.com/nfqde/eslint-config-nfq/issues/1)) ([eba532b](https://github.com/nfqde/eslint-config-nfq/commit/eba532be70748c55b83878c0ed9b85ba07da0679))
|
|
26
|
+
* **React:** Change react in scope rule for react 17 ([#10](https://github.com/nfqde/eslint-config-nfq/issues/10)) ([3a163bc](https://github.com/nfqde/eslint-config-nfq/commit/3a163bcfdfeac65ff319634f3305c2d5cf834f35))
|
|
27
|
+
* **ReDOS:** Add redos checker ([#11](https://github.com/nfqde/eslint-config-nfq/issues/11)) ([ede6dce](https://github.com/nfqde/eslint-config-nfq/commit/ede6dcea975f4ebd01933f093f3a842a0de24140))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* **Import/extensions:** Add font extensions. ([#2](https://github.com/nfqde/eslint-config-nfq/issues/2)) ([c2971a1](https://github.com/nfqde/eslint-config-nfq/commit/c2971a1de1406348ac340cd012b22417bf267674))
|
|
33
|
+
* **import/order:** Fix image import ([#7](https://github.com/nfqde/eslint-config-nfq/issues/7)) ([37df73c](https://github.com/nfqde/eslint-config-nfq/commit/37df73c6f1d39fbe265fb591d89b839430ee5667))
|
|
34
|
+
* **no-empty-func:** fixed async methods ([#3](https://github.com/nfqde/eslint-config-nfq/issues/3)) ([441fa2a](https://github.com/nfqde/eslint-config-nfq/commit/441fa2a6d890e4cec5f224951990a552be9cc644))
|
|
35
|
+
* **Snyk:** upgrade confusing-browser-globals from 1.0.9 to 1.0.10 ([#8](https://github.com/nfqde/eslint-config-nfq/issues/8)) ([d3a23d0](https://github.com/nfqde/eslint-config-nfq/commit/d3a23d01dc449ea870e8ba36d83920d0f56e7159))
|
package/config/globals.js
CHANGED
package/config/plugins.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
module.exports = [
|
|
2
|
+
'@nfq',
|
|
2
3
|
'array-func',
|
|
3
4
|
'better-styled-components',
|
|
4
5
|
'import',
|
|
6
|
+
'jsdoc',
|
|
5
7
|
'jsx-a11y',
|
|
6
|
-
'@nfq',
|
|
7
8
|
'no-unsanitized',
|
|
8
9
|
'node',
|
|
9
10
|
'perf-standard',
|
|
@@ -11,6 +12,7 @@ module.exports = [
|
|
|
11
12
|
'react',
|
|
12
13
|
'react-hooks',
|
|
13
14
|
'react-hooks-ssr',
|
|
15
|
+
'redos',
|
|
14
16
|
'security',
|
|
15
17
|
'sort-destructure-keys'
|
|
16
18
|
];
|
package/config/settings.js
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
'import/resolver': {
|
|
2
|
+
'import/resolver': {
|
|
3
|
+
alias: {
|
|
4
|
+
extensions: [
|
|
5
|
+
'.js',
|
|
6
|
+
'.jsx',
|
|
7
|
+
'.json',
|
|
8
|
+
'.css',
|
|
9
|
+
'.png',
|
|
10
|
+
'.jpeg',
|
|
11
|
+
'.jpg',
|
|
12
|
+
'.svg',
|
|
13
|
+
'.webp'
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
jsdoc: {
|
|
18
|
+
ignoreInternal: false,
|
|
19
|
+
ignorePrivate: false,
|
|
20
|
+
maxLines: 1,
|
|
21
|
+
minLines: 0,
|
|
22
|
+
mode: 'typescript',
|
|
23
|
+
tagNamePreference: {
|
|
24
|
+
augments: 'extends',
|
|
25
|
+
ignore: false
|
|
26
|
+
}
|
|
27
|
+
},
|
|
3
28
|
react: {version: 'detect'}
|
|
4
29
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nfq/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">= 12.0.0"
|
|
6
6
|
},
|
|
7
7
|
"description": "Eslint configuration for all nfq projects",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"scripts": {
|
|
10
|
+
"deploy": "standard-version && git push --follow-tags origin master",
|
|
10
11
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
12
|
},
|
|
12
13
|
"keywords": [
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
"eslint-plugin-react": ">= 7",
|
|
32
33
|
"eslint-plugin-react-hooks": ">= 4",
|
|
33
34
|
"eslint-plugin-react-hooks-ssr": ">= 0.1.5",
|
|
35
|
+
"eslint-plugin-redos": ">= 4",
|
|
34
36
|
"eslint-plugin-security": ">= 1",
|
|
35
37
|
"eslint-plugin-sort-destructure-keys": ">= 1"
|
|
36
38
|
},
|
|
@@ -46,6 +48,7 @@
|
|
|
46
48
|
"eslint-plugin-array-func": "^3.1.7",
|
|
47
49
|
"eslint-plugin-better-styled-components": "^1.1.2",
|
|
48
50
|
"eslint-plugin-import": "^2.25.2",
|
|
51
|
+
"eslint-plugin-jsdoc": "^39.3.0",
|
|
49
52
|
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
50
53
|
"eslint-plugin-no-unsanitized": "^3.1.5",
|
|
51
54
|
"eslint-plugin-node": "^11.1.0",
|
|
@@ -54,6 +57,7 @@
|
|
|
54
57
|
"eslint-plugin-react": "^7.26.1",
|
|
55
58
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
56
59
|
"eslint-plugin-react-hooks-ssr": "^0.1.5",
|
|
60
|
+
"eslint-plugin-redos": "^4.3.0",
|
|
57
61
|
"eslint-plugin-security": "^1.4.0",
|
|
58
62
|
"eslint-plugin-sort-destructure-keys": "^1.3.5"
|
|
59
63
|
},
|
package/pnpm-lock.yaml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
lockfileVersion: 5.
|
|
1
|
+
lockfileVersion: 5.4
|
|
2
2
|
|
|
3
3
|
specifiers:
|
|
4
4
|
'@babel/core': ^7.15.8
|
|
@@ -10,6 +10,7 @@ specifiers:
|
|
|
10
10
|
eslint-plugin-array-func: ^3.1.7
|
|
11
11
|
eslint-plugin-better-styled-components: ^1.1.2
|
|
12
12
|
eslint-plugin-import: ^2.25.2
|
|
13
|
+
eslint-plugin-jsdoc: ^39.3.0
|
|
13
14
|
eslint-plugin-jsx-a11y: ^6.4.1
|
|
14
15
|
eslint-plugin-no-unsanitized: ^3.1.5
|
|
15
16
|
eslint-plugin-node: ^11.1.0
|
|
@@ -18,6 +19,7 @@ specifiers:
|
|
|
18
19
|
eslint-plugin-react: ^7.26.1
|
|
19
20
|
eslint-plugin-react-hooks: ^4.2.0
|
|
20
21
|
eslint-plugin-react-hooks-ssr: ^0.1.5
|
|
22
|
+
eslint-plugin-redos: ^4.3.0
|
|
21
23
|
eslint-plugin-security: ^1.4.0
|
|
22
24
|
eslint-plugin-sort-destructure-keys: ^1.3.5
|
|
23
25
|
|
|
@@ -26,13 +28,14 @@ dependencies:
|
|
|
26
28
|
|
|
27
29
|
devDependencies:
|
|
28
30
|
'@babel/core': 7.15.8
|
|
29
|
-
'@babel/eslint-parser': 7.15.
|
|
31
|
+
'@babel/eslint-parser': 7.15.8_zlqquzezyrclzsndbv25dj3g74
|
|
30
32
|
'@nfq/eslint-plugin': 0.6.0
|
|
31
33
|
eslint: 8.0.0
|
|
32
|
-
eslint-import-resolver-alias: 1.1.
|
|
34
|
+
eslint-import-resolver-alias: 1.1.2_vh5gizyt4jfjl2cpwztvw7criy
|
|
33
35
|
eslint-plugin-array-func: 3.1.7_eslint@8.0.0
|
|
34
36
|
eslint-plugin-better-styled-components: 1.1.2
|
|
35
37
|
eslint-plugin-import: 2.25.2_eslint@8.0.0
|
|
38
|
+
eslint-plugin-jsdoc: 39.3.0_eslint@8.0.0
|
|
36
39
|
eslint-plugin-jsx-a11y: 6.4.1_eslint@8.0.0
|
|
37
40
|
eslint-plugin-no-unsanitized: 3.1.5_eslint@8.0.0
|
|
38
41
|
eslint-plugin-node: 11.1.0_eslint@8.0.0
|
|
@@ -41,6 +44,7 @@ devDependencies:
|
|
|
41
44
|
eslint-plugin-react: 7.26.1_eslint@8.0.0
|
|
42
45
|
eslint-plugin-react-hooks: 4.2.0_eslint@8.0.0
|
|
43
46
|
eslint-plugin-react-hooks-ssr: 0.1.5_eslint@8.0.0
|
|
47
|
+
eslint-plugin-redos: 4.3.0_eslint@8.0.0
|
|
44
48
|
eslint-plugin-security: 1.4.0
|
|
45
49
|
eslint-plugin-sort-destructure-keys: 1.3.5_eslint@8.0.0
|
|
46
50
|
|
|
@@ -81,7 +85,7 @@ packages:
|
|
|
81
85
|
- supports-color
|
|
82
86
|
dev: true
|
|
83
87
|
|
|
84
|
-
/@babel/eslint-parser/7.15.
|
|
88
|
+
/@babel/eslint-parser/7.15.8_zlqquzezyrclzsndbv25dj3g74:
|
|
85
89
|
resolution: {integrity: sha512-fYP7QFngCvgxjUuw8O057SVH5jCXsbFFOoE77CFDcvzwBVgTOkMD/L4mIC5Ud1xf8chK/no2fRbSSn1wvNmKuQ==}
|
|
86
90
|
engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0}
|
|
87
91
|
peerDependencies:
|
|
@@ -288,6 +292,15 @@ packages:
|
|
|
288
292
|
to-fast-properties: 2.0.0
|
|
289
293
|
dev: true
|
|
290
294
|
|
|
295
|
+
/@es-joy/jsdoccomment/0.30.0:
|
|
296
|
+
resolution: {integrity: sha512-U30cjaHCjdUqtbMgChJl80BP25GSRWg0/1R3UdB2ksitAo2oDYdRMrvzwuM21jcsFbEcLNAqwQGTCg+5CVbSIA==}
|
|
297
|
+
engines: {node: ^14 || ^16 || ^17 || ^18}
|
|
298
|
+
dependencies:
|
|
299
|
+
comment-parser: 1.3.1
|
|
300
|
+
esquery: 1.4.0
|
|
301
|
+
jsdoc-type-pratt-parser: 3.1.0
|
|
302
|
+
dev: true
|
|
303
|
+
|
|
291
304
|
/@eslint/eslintrc/1.0.2:
|
|
292
305
|
resolution: {integrity: sha512-x1ZXdEFsvTcnbTZgqcWUL9w2ybgZCw/qbKTPQnab+XnYA2bMQpJCh+/bBzCRfDJaJdlrrQlOk49jNtru9gL/6Q==}
|
|
293
306
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
|
@@ -528,6 +541,11 @@ packages:
|
|
|
528
541
|
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
|
|
529
542
|
dev: true
|
|
530
543
|
|
|
544
|
+
/comment-parser/1.3.1:
|
|
545
|
+
resolution: {integrity: sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==}
|
|
546
|
+
engines: {node: '>= 12.0.0'}
|
|
547
|
+
dev: true
|
|
548
|
+
|
|
531
549
|
/concat-map/0.0.1:
|
|
532
550
|
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
|
|
533
551
|
dev: true
|
|
@@ -584,6 +602,18 @@ packages:
|
|
|
584
602
|
ms: 2.1.2
|
|
585
603
|
dev: true
|
|
586
604
|
|
|
605
|
+
/debug/4.3.4:
|
|
606
|
+
resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
|
|
607
|
+
engines: {node: '>=6.0'}
|
|
608
|
+
peerDependencies:
|
|
609
|
+
supports-color: '*'
|
|
610
|
+
peerDependenciesMeta:
|
|
611
|
+
supports-color:
|
|
612
|
+
optional: true
|
|
613
|
+
dependencies:
|
|
614
|
+
ms: 2.1.2
|
|
615
|
+
dev: true
|
|
616
|
+
|
|
587
617
|
/deep-is/0.1.4:
|
|
588
618
|
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
|
|
589
619
|
dev: true
|
|
@@ -698,7 +728,7 @@ packages:
|
|
|
698
728
|
engines: {node: '>=10'}
|
|
699
729
|
dev: true
|
|
700
730
|
|
|
701
|
-
/eslint-import-resolver-alias/1.1.
|
|
731
|
+
/eslint-import-resolver-alias/1.1.2_vh5gizyt4jfjl2cpwztvw7criy:
|
|
702
732
|
resolution: {integrity: sha512-WdviM1Eu834zsfjHtcGHtGfcu+F30Od3V7I9Fi57uhBEwPkjDcii7/yW8jAT+gOhn4P/vOxxNAXbFAKsrrc15w==}
|
|
703
733
|
engines: {node: '>= 4'}
|
|
704
734
|
peerDependencies:
|
|
@@ -773,6 +803,24 @@ packages:
|
|
|
773
803
|
tsconfig-paths: 3.11.0
|
|
774
804
|
dev: true
|
|
775
805
|
|
|
806
|
+
/eslint-plugin-jsdoc/39.3.0_eslint@8.0.0:
|
|
807
|
+
resolution: {integrity: sha512-zEdkpezjIhG7gq4MbwLBKaD3cWsJkT7uTAJcIbLohQWR7OVwhPOBLPqpftBt8uzy0ZL+3jlbiaSXik4+VmN6JQ==}
|
|
808
|
+
engines: {node: ^14 || ^16 || ^17 || ^18}
|
|
809
|
+
peerDependencies:
|
|
810
|
+
eslint: ^7.0.0 || ^8.0.0
|
|
811
|
+
dependencies:
|
|
812
|
+
'@es-joy/jsdoccomment': 0.30.0
|
|
813
|
+
comment-parser: 1.3.1
|
|
814
|
+
debug: 4.3.4
|
|
815
|
+
escape-string-regexp: 4.0.0
|
|
816
|
+
eslint: 8.0.0
|
|
817
|
+
esquery: 1.4.0
|
|
818
|
+
semver: 7.3.7
|
|
819
|
+
spdx-expression-parse: 3.0.1
|
|
820
|
+
transitivePeerDependencies:
|
|
821
|
+
- supports-color
|
|
822
|
+
dev: true
|
|
823
|
+
|
|
776
824
|
/eslint-plugin-jsx-a11y/6.4.1_eslint@8.0.0:
|
|
777
825
|
resolution: {integrity: sha512-0rGPJBbwHoGNPU73/QCLP/vveMlM1b1Z9PponxO87jfr6tuH5ligXbDT6nHSSzBC8ovX2Z+BQu7Bk5D/Xgq9zg==}
|
|
778
826
|
engines: {node: '>=4.0'}
|
|
@@ -869,6 +917,15 @@ packages:
|
|
|
869
917
|
string.prototype.matchall: 4.0.5
|
|
870
918
|
dev: true
|
|
871
919
|
|
|
920
|
+
/eslint-plugin-redos/4.3.0_eslint@8.0.0:
|
|
921
|
+
resolution: {integrity: sha512-m8wNdabRK/KNt8pcVmxy2mOzTGodIV8xIIyx25/ub/Nbip2CIMCbmQfeO3OBwsgOhefblRoULAYCqYPm/aLvaA==}
|
|
922
|
+
peerDependencies:
|
|
923
|
+
eslint: '>= 3'
|
|
924
|
+
dependencies:
|
|
925
|
+
eslint: 8.0.0
|
|
926
|
+
recheck: 4.3.0
|
|
927
|
+
dev: true
|
|
928
|
+
|
|
872
929
|
/eslint-plugin-security/1.4.0:
|
|
873
930
|
resolution: {integrity: sha512-xlS7P2PLMXeqfhyf3NpqbvbnW04kN8M9NtmhpR3XGyOvt/vNKS7XPXT5EDbwKW9vCjWH4PpfQvgD/+JgN0VJKA==}
|
|
874
931
|
dependencies:
|
|
@@ -1312,6 +1369,11 @@ packages:
|
|
|
1312
1369
|
argparse: 2.0.1
|
|
1313
1370
|
dev: true
|
|
1314
1371
|
|
|
1372
|
+
/jsdoc-type-pratt-parser/3.1.0:
|
|
1373
|
+
resolution: {integrity: sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw==}
|
|
1374
|
+
engines: {node: '>=12.0.0'}
|
|
1375
|
+
dev: true
|
|
1376
|
+
|
|
1315
1377
|
/jsesc/2.5.2:
|
|
1316
1378
|
resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==}
|
|
1317
1379
|
engines: {node: '>=4'}
|
|
@@ -1605,6 +1667,45 @@ packages:
|
|
|
1605
1667
|
resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==}
|
|
1606
1668
|
dev: true
|
|
1607
1669
|
|
|
1670
|
+
/recheck-jar/4.3.0:
|
|
1671
|
+
resolution: {integrity: sha512-Z1ValtlVKZXoM71gMKRi+RH7vaVn7YvDKxC+1V2BVdKHsei/F9jcaZGp47q6rep9YPFhHYZ2tOKuqzfar+L1dw==}
|
|
1672
|
+
requiresBuild: true
|
|
1673
|
+
dev: true
|
|
1674
|
+
optional: true
|
|
1675
|
+
|
|
1676
|
+
/recheck-linux-x64/4.3.0:
|
|
1677
|
+
resolution: {integrity: sha512-W4vBHzrflvx1y6aU6iLDme0grp+pHGSYXgOhtNMl0YkrzYBQ5TeF/eaM5o9f3ZZuVfjxr73CRWAm9B2Qx4XpYw==}
|
|
1678
|
+
cpu: [x64]
|
|
1679
|
+
os: [linux]
|
|
1680
|
+
requiresBuild: true
|
|
1681
|
+
dev: true
|
|
1682
|
+
optional: true
|
|
1683
|
+
|
|
1684
|
+
/recheck-macos-x64/4.3.0:
|
|
1685
|
+
resolution: {integrity: sha512-ikmmDRRk6w+wunwNVSwKMwxJnXYWv7DlHkDxij5dw6bauJ9YqpfxHCa603G+K6zcRfB5OiMWz6EI7x2mNnSDeA==}
|
|
1686
|
+
cpu: [x64]
|
|
1687
|
+
os: [darwin]
|
|
1688
|
+
requiresBuild: true
|
|
1689
|
+
dev: true
|
|
1690
|
+
optional: true
|
|
1691
|
+
|
|
1692
|
+
/recheck-windows-x64/4.3.0:
|
|
1693
|
+
resolution: {integrity: sha512-6ut79YbjkXxbpouu1PyzIhyOEkmMyYDBzstihxa62XTrwiyRl0A6BDGvy3o2mHzQ355T5UmsbcTYIsoav3UEyA==}
|
|
1694
|
+
cpu: [x64]
|
|
1695
|
+
os: [win32]
|
|
1696
|
+
requiresBuild: true
|
|
1697
|
+
dev: true
|
|
1698
|
+
optional: true
|
|
1699
|
+
|
|
1700
|
+
/recheck/4.3.0:
|
|
1701
|
+
resolution: {integrity: sha512-Tja4wYd3Vk929QkmwvIyAowtg7RbUvM1mAIVhZo8idUq4nzit6FiMyIH2Tp5+8qaAl3Akem/GJDE4+Q2oVYLUA==}
|
|
1702
|
+
optionalDependencies:
|
|
1703
|
+
recheck-jar: 4.3.0
|
|
1704
|
+
recheck-linux-x64: 4.3.0
|
|
1705
|
+
recheck-macos-x64: 4.3.0
|
|
1706
|
+
recheck-windows-x64: 4.3.0
|
|
1707
|
+
dev: true
|
|
1708
|
+
|
|
1608
1709
|
/regenerator-runtime/0.13.9:
|
|
1609
1710
|
resolution: {integrity: sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==}
|
|
1610
1711
|
dev: true
|
|
@@ -1681,6 +1782,14 @@ packages:
|
|
|
1681
1782
|
lru-cache: 6.0.0
|
|
1682
1783
|
dev: true
|
|
1683
1784
|
|
|
1785
|
+
/semver/7.3.7:
|
|
1786
|
+
resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==}
|
|
1787
|
+
engines: {node: '>=10'}
|
|
1788
|
+
hasBin: true
|
|
1789
|
+
dependencies:
|
|
1790
|
+
lru-cache: 6.0.0
|
|
1791
|
+
dev: true
|
|
1792
|
+
|
|
1684
1793
|
/shebang-command/2.0.0:
|
|
1685
1794
|
resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
|
|
1686
1795
|
engines: {node: '>=8'}
|
|
@@ -1711,6 +1820,21 @@ packages:
|
|
|
1711
1820
|
engines: {node: '>=0.10.0'}
|
|
1712
1821
|
dev: true
|
|
1713
1822
|
|
|
1823
|
+
/spdx-exceptions/2.3.0:
|
|
1824
|
+
resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==}
|
|
1825
|
+
dev: true
|
|
1826
|
+
|
|
1827
|
+
/spdx-expression-parse/3.0.1:
|
|
1828
|
+
resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==}
|
|
1829
|
+
dependencies:
|
|
1830
|
+
spdx-exceptions: 2.3.0
|
|
1831
|
+
spdx-license-ids: 3.0.11
|
|
1832
|
+
dev: true
|
|
1833
|
+
|
|
1834
|
+
/spdx-license-ids/3.0.11:
|
|
1835
|
+
resolution: {integrity: sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==}
|
|
1836
|
+
dev: true
|
|
1837
|
+
|
|
1714
1838
|
/sprintf-js/1.0.3:
|
|
1715
1839
|
resolution: {integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=}
|
|
1716
1840
|
dev: true
|
package/rules/errors.js
CHANGED
|
@@ -49,13 +49,7 @@ module.exports = {
|
|
|
49
49
|
'no-unsafe-negation': 'error', // disallow negating the left operand of relational operators https://eslint.org/docs/rules/no-unsafe-negation
|
|
50
50
|
'require-atomic-updates': 'off', // Disallow assignments that can lead to race conditions due to usage of await or yield https://eslint.org/docs/rules/require-atomic-updates
|
|
51
51
|
'use-isnan': 'error', // disallow comparisons with the value NaN https://eslint.org/docs/rules/use-isnan
|
|
52
|
-
'valid-jsdoc':
|
|
53
|
-
'error',
|
|
54
|
-
{
|
|
55
|
-
matchDescription: '.+',
|
|
56
|
-
requireReturn: false
|
|
57
|
-
}
|
|
58
|
-
], // ensure JSDoc comments are valid https://eslint.org/docs/rules/valid-jsdoc
|
|
52
|
+
'valid-jsdoc': 'off', // ensure JSDoc comments are valid https://eslint.org/docs/rules/valid-jsdoc
|
|
59
53
|
'valid-typeof': ['error', {requireStringLiterals: true}] // ensure that the results of typeof are compared against a valid string https://eslint.org/docs/rules/valid-typeof
|
|
60
54
|
}
|
|
61
55
|
};
|
package/rules/imports.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
5
5
|
rules: {
|
|
6
|
-
'import/default':
|
|
7
|
-
'import/named':
|
|
8
|
-
'import/namespace': [
|
|
6
|
+
'import/default': 2, // ensure default import coupled with default export https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it
|
|
7
|
+
'import/named': 2, // ensure named imports coupled with named exports https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it
|
|
8
|
+
'import/namespace': [2, {allowComputed: true}], // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md
|
|
9
9
|
'import/no-unresolved': [
|
|
10
|
-
|
|
10
|
+
2,
|
|
11
11
|
{
|
|
12
12
|
caseSensitive: true,
|
|
13
13
|
commonjs: true,
|
|
@@ -16,10 +16,10 @@ module.exports = {
|
|
|
16
16
|
], // ensure imports point to files/modules that can be resolved https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md
|
|
17
17
|
|
|
18
18
|
// Helpful warnings:
|
|
19
|
-
'import/export':
|
|
20
|
-
'import/no-deprecated':
|
|
19
|
+
'import/export': 2, // disallow invalid exports, e.g. multiple defaults https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md
|
|
20
|
+
'import/no-deprecated': 1, // disallow use of jsdoc-marked-deprecated imports https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md
|
|
21
21
|
'import/no-extraneous-dependencies': [
|
|
22
|
-
|
|
22
|
+
0,
|
|
23
23
|
{
|
|
24
24
|
devDependencies: [
|
|
25
25
|
'test/**', // tape, common npm pattern
|
|
@@ -47,24 +47,24 @@ module.exports = {
|
|
|
47
47
|
optionalDependencies: false
|
|
48
48
|
}
|
|
49
49
|
], // Forbid the use of extraneous packages https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md paths are treated both as absolute paths, and relative to process.cwd()
|
|
50
|
-
'import/no-mutable-exports':
|
|
51
|
-
'import/no-named-as-default':
|
|
52
|
-
'import/no-named-as-default-member':
|
|
50
|
+
'import/no-mutable-exports': 2, // Forbid mutable exports https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md
|
|
51
|
+
'import/no-named-as-default': 2, // do not allow a default import name to match a named export https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md
|
|
52
|
+
'import/no-named-as-default-member': 2, // warn on accessing default export property names that are also named exports https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md
|
|
53
53
|
// Module systems:
|
|
54
|
-
'import/no-amd':
|
|
55
|
-
'import/no-commonjs':
|
|
56
|
-
'import/no-nodejs-modules':
|
|
54
|
+
'import/no-amd': 2, // disallow AMD require/define https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md
|
|
55
|
+
'import/no-commonjs': 0, // disallow require() https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md
|
|
56
|
+
'import/no-nodejs-modules': 0, // No Node.js builtin modules https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md
|
|
57
57
|
// Style guide:
|
|
58
58
|
'import/dynamic-import-chunkname': [
|
|
59
|
-
|
|
59
|
+
2,
|
|
60
60
|
{
|
|
61
61
|
importFunctions: [],
|
|
62
62
|
webpackChunknameFormat: '[0-9a-zA-Z-_/.]+'
|
|
63
63
|
}
|
|
64
64
|
], // dynamic imports require a leading comment with a webpackChunkName https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/dynamic-import-chunkname.md
|
|
65
|
-
'import/exports-last':
|
|
65
|
+
'import/exports-last': 0, // This rule enforces that all exports are declared at the bottom of the file. https://github.com/benmosher/eslint-plugin-import/blob/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md
|
|
66
66
|
'import/extensions': [
|
|
67
|
-
|
|
67
|
+
2,
|
|
68
68
|
'never',
|
|
69
69
|
{
|
|
70
70
|
woff: 'always',
|
|
@@ -74,13 +74,13 @@ module.exports = {
|
|
|
74
74
|
otf: 'always'
|
|
75
75
|
}
|
|
76
76
|
], // Ensure consistent use of file extension within the import path https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md
|
|
77
|
-
'import/first':
|
|
78
|
-
'import/group-exports':
|
|
79
|
-
'import/max-dependencies': [
|
|
80
|
-
'import/newline-after-import':
|
|
81
|
-
'import/no-absolute-path':
|
|
77
|
+
'import/first': 2, // disallow non-import statements appearing before import statements https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md
|
|
78
|
+
'import/group-exports': 0, // Reports when named exports are not grouped together in a single export declaration or when multiple assignments to CommonJS module.exports or exports object are present in a single file. https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md
|
|
79
|
+
'import/max-dependencies': [1, {max: 20}], // Forbid modules to have too many dependencies https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md
|
|
80
|
+
'import/newline-after-import': 2, // Require a newline after the last import/require in a group https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md
|
|
81
|
+
'import/no-absolute-path': 2, // Forbid import of modules using absolute paths https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md
|
|
82
82
|
'import/no-anonymous-default-export': [
|
|
83
|
-
|
|
83
|
+
0,
|
|
84
84
|
{
|
|
85
85
|
allowAnonymousClass: false,
|
|
86
86
|
allowAnonymousFunction: false,
|
|
@@ -91,32 +91,32 @@ module.exports = {
|
|
|
91
91
|
}
|
|
92
92
|
], // Reports if a module's default export is unnamed https://github.com/benmosher/eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md
|
|
93
93
|
'import/no-cycle': [
|
|
94
|
-
|
|
94
|
+
0,
|
|
95
95
|
{maxDepth: Infinity}
|
|
96
96
|
], // Forbid cyclical dependencies between modules https://github.com/benmosher/eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md
|
|
97
|
-
'import/no-default-export':
|
|
98
|
-
'import/no-duplicates':
|
|
99
|
-
'import/no-dynamic-require':
|
|
100
|
-
'import/no-internal-modules': [
|
|
101
|
-
'import/no-named-default':
|
|
102
|
-
'import/no-named-export':
|
|
103
|
-
'import/no-namespace':
|
|
104
|
-
'import/no-relative-parent-imports':
|
|
105
|
-
'import/no-restricted-paths':
|
|
106
|
-
'import/no-self-import':
|
|
107
|
-
'import/no-unassigned-import':
|
|
97
|
+
'import/no-default-export': 0, // forbid default exports. this is a terrible rule, do not use it. https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md
|
|
98
|
+
'import/no-duplicates': 2, // disallow duplicate imports https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md
|
|
99
|
+
'import/no-dynamic-require': 0, // Forbid require() calls with expressions https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md
|
|
100
|
+
'import/no-internal-modules': [0, {allow: []}], // prevent importing the submodules of other modules https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md
|
|
101
|
+
'import/no-named-default': 2, // Prevent importing the default as if it were named https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md
|
|
102
|
+
'import/no-named-export': 0, // Prohibit named exports. this is a terrible rule, do not use it. https://github.com/benmosher/eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md
|
|
103
|
+
'import/no-namespace': 0, // disallow namespace imports https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md
|
|
104
|
+
'import/no-relative-parent-imports': 0, // Use this rule to prevent imports to folders in relative parent paths. https://github.com/benmosher/eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md
|
|
105
|
+
'import/no-restricted-paths': 0, // Restrict which files can be imported in a given folder https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md
|
|
106
|
+
'import/no-self-import': 2, // Forbid a module from importing itself https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-self-import.md
|
|
107
|
+
'import/no-unassigned-import': 0, // Prevent unassigned imports https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md importing for side effects is perfectly acceptable, if you need side effects.
|
|
108
108
|
'import/no-unused-modules': [
|
|
109
|
-
|
|
109
|
+
0,
|
|
110
110
|
{
|
|
111
111
|
ignoreExports: [],
|
|
112
112
|
missingExports: true,
|
|
113
113
|
unusedExports: true
|
|
114
114
|
}
|
|
115
115
|
], // Reports modules without any exports, or with unused exports https://github.com/benmosher/eslint-plugin-import/blob/f63dd261809de6883b13b6b5b960e6d7f42a7813/docs/rules/no-unused-modules.md
|
|
116
|
-
'import/no-useless-path-segments': [
|
|
117
|
-
'import/no-webpack-loader-syntax':
|
|
116
|
+
'import/no-useless-path-segments': [2, {commonjs: true}], // Ensures that there are no useless path segments https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/no-useless-path-segments.md
|
|
117
|
+
'import/no-webpack-loader-syntax': 2, // Forbid Webpack loader syntax in imports https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md
|
|
118
118
|
'import/order': [
|
|
119
|
-
|
|
119
|
+
2,
|
|
120
120
|
{
|
|
121
121
|
alphabetize: {
|
|
122
122
|
caseInsensitive: true,
|
|
@@ -211,7 +211,7 @@ module.exports = {
|
|
|
211
211
|
pathGroupsExcludedImportTypes: ['react', 'react-dom']
|
|
212
212
|
}
|
|
213
213
|
], // ensure absolute imports are above relative imports and that unassigned imports are ignored https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md
|
|
214
|
-
'import/prefer-default-export':
|
|
215
|
-
'import/unambiguous':
|
|
214
|
+
'import/prefer-default-export': 0, // Require modules with a single export to use a default export https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md
|
|
215
|
+
'import/unambiguous': 0 // Warn if a module could be mistakenly parsed as a script by a consumer leveraging Unambiguous JavaScript Grammar https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/unambiguous.md At the moment, it's not a thing.
|
|
216
216
|
}
|
|
217
217
|
};
|
package/rules/jsdoc.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* eslint-disable no-inline-comments */
|
|
2
|
+
module.exports = {
|
|
3
|
+
rules: {
|
|
4
|
+
'jsdoc/check-access': 'off', // checks access keyword for right values https://github.com/gajus/eslint-plugin-jsdoc#check-access
|
|
5
|
+
'jsdoc/check-alignment': 'error', // Reports invalid alignment of JSDoc block asterisks. https://github.com/gajus/eslint-plugin-jsdoc#check-alignment
|
|
6
|
+
'jsdoc/check-examples': 'off', // Reports invalid examples in JSDoc comments. (Waiting for eslint 8 support) https://github.com/gajus/eslint-plugin-jsdoc#check-examples
|
|
7
|
+
'jsdoc/check-indentation': 'error', // Reports invalid indentation of JSDoc block. https://github.com/gajus/eslint-plugin-jsdoc#check-indentation
|
|
8
|
+
'jsdoc/check-line-alignment': [
|
|
9
|
+
'error',
|
|
10
|
+
'always',
|
|
11
|
+
{tags: ['param', 'arg', 'argument', 'property', 'prop']}
|
|
12
|
+
], // Reports invalid alignment of JSDoc block lines. https://github.com/gajus/eslint-plugin-jsdoc#check-indentation
|
|
13
|
+
'jsdoc/check-param-names': [
|
|
14
|
+
'error',
|
|
15
|
+
{
|
|
16
|
+
checkDestructured: true,
|
|
17
|
+
enableFixer: true
|
|
18
|
+
}
|
|
19
|
+
], // Reports invalid parameter names in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#check-param-names
|
|
20
|
+
'jsdoc/check-property-names': [
|
|
21
|
+
'error',
|
|
22
|
+
{enableFixer: true}
|
|
23
|
+
], // Reports invalid property names in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#check-property-names
|
|
24
|
+
'jsdoc/check-syntax': 'error', // Reports invalid JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#check-syntax
|
|
25
|
+
'jsdoc/check-tag-names': 'error', // Reports invalid tag names in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#check-tag-names
|
|
26
|
+
'jsdoc/check-types': 'error', // Reports invalid types in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#check-types
|
|
27
|
+
'jsdoc/check-values': 'error', // This rule checks the values for a handful of tags. https://github.com/gajus/eslint-plugin-jsdoc#check-values
|
|
28
|
+
'jsdoc/empty-tags': 'error', // Reports non empty JSDoc tags that should be empty. https://github.com/gajus/eslint-plugin-jsdoc#empty-tags
|
|
29
|
+
'jsdoc/implements-on-classes': 'error', // Reports missing @implements tag on classes. https://github.com/gajus/eslint-plugin-jsdoc#implements-on-classes
|
|
30
|
+
'jsdoc/match-description': 'error', // Reports invalid descriptions in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#match-description
|
|
31
|
+
'jsdoc/match-name': 'off', // Reports invalid names in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#match-name
|
|
32
|
+
'jsdoc/multiline-blocks': [
|
|
33
|
+
'error',
|
|
34
|
+
{
|
|
35
|
+
noFinalLineText: true,
|
|
36
|
+
noMultilineBlocks: false,
|
|
37
|
+
noSingleLineBlocks: false,
|
|
38
|
+
noZeroLineText: true
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
], // Controls how and whether jsdoc blocks can be expressed as single or multiple line blocks. https://github.com/gajus/eslint-plugin-jsdoc#multiline-blocks
|
|
42
|
+
'jsdoc/newline-after-description': ['error', 'always'], // Reports missing newline after description in JSDoc comments.
|
|
43
|
+
'jsdoc/no-bad-blocks': 'error', // Reports invalid JSDoc block tags. https://github.com/gajus/eslint-plugin-jsdoc#no-bad-blocks
|
|
44
|
+
'jsdoc/no-defaults': 'off', // Reports default params if used. https://github.com/gajus/eslint-plugin-jsdoc#no-defaults
|
|
45
|
+
'jsdoc/no-missing-syntax': 'off', // Reports missing JSDoc syntax. https://github.com/gajus/eslint-plugin-jsdoc#no-missing-syntax
|
|
46
|
+
'jsdoc/no-multi-asterisks': 'error', // Prevents use of multiple asterisks at the beginning of lines. https://github.com/gajus/eslint-plugin-jsdoc#no-multi-asterisks
|
|
47
|
+
'jsdoc/no-restricted-syntax': 'off', // Reports invalid JSDoc syntax. https://github.com/gajus/eslint-plugin-jsdoc#no-restricted-syntax
|
|
48
|
+
'jsdoc/no-types': 'off', // Reports redundant types in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#no-types
|
|
49
|
+
'jsdoc/no-undefined-types': [
|
|
50
|
+
'error',
|
|
51
|
+
{definedTypes: ['JSX']}
|
|
52
|
+
], // Reports undefined types in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#no-undefined-types
|
|
53
|
+
'jsdoc/require-asterisk-prefix': ['error', 'always'], // Requires that each JSDoc line starts with an *. https://github.com/gajus/eslint-plugin-jsdoc#require-asterisk-prefix
|
|
54
|
+
'jsdoc/require-description': ['error', {exemptedBy: ['type', 'inheritdoc']}], // Reports missing description in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-description
|
|
55
|
+
'jsdoc/require-description-complete-sentence': 'error', // Reports missing complete sentence in JSDoc description. https://github.com/gajus/eslint-plugin-jsdoc#require-description-complete-sentence
|
|
56
|
+
'jsdoc/require-example': 'off', // Reports missing example in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-example
|
|
57
|
+
'jsdoc/require-file-overview': 'off', // Reports missing file overview in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-file-overview
|
|
58
|
+
'jsdoc/require-hyphen-before-param-description': ['error', 'never'], // Reports missing hyphen before param description in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-hyphen-before-param-description
|
|
59
|
+
'jsdoc/require-jsdoc': 'error', // Reports missing JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-jsdoc
|
|
60
|
+
'jsdoc/require-param': [
|
|
61
|
+
'error',
|
|
62
|
+
{
|
|
63
|
+
checkDestructured: true,
|
|
64
|
+
checkDestructuredRoots: true,
|
|
65
|
+
checkRestProperty: true,
|
|
66
|
+
enableFixer: true,
|
|
67
|
+
enableRestElementFixer: true,
|
|
68
|
+
enableRootFixer: true,
|
|
69
|
+
useDefaultObjectProperties: true
|
|
70
|
+
}
|
|
71
|
+
], // Reports missing params in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-param
|
|
72
|
+
'jsdoc/require-param-description': 'error', // Reports missing param description in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-param-description
|
|
73
|
+
'jsdoc/require-param-name': 'error', // Reports missing param name in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-param-name
|
|
74
|
+
'jsdoc/require-param-type': 'error', // Reports missing param type in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-param-type
|
|
75
|
+
'jsdoc/require-property': 'error', // Reports missing properties in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-property
|
|
76
|
+
'jsdoc/require-property-description': 'error', // Reports missing property description in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-property-description
|
|
77
|
+
'jsdoc/require-property-name': 'error', // Reports missing property name in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-property-name
|
|
78
|
+
'jsdoc/require-property-type': 'error', // Reports missing property type in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-property-type
|
|
79
|
+
'jsdoc/require-returns': 'error', // Reports missing returns in JSDoc comments.
|
|
80
|
+
'jsdoc/require-returns-check': 'error', // Reports missing returns in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-returns-check
|
|
81
|
+
'jsdoc/require-returns-description': 'error', // Reports missing returns description in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-returns-description
|
|
82
|
+
'jsdoc/require-returns-type': 'error', // Reports missing returns type in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-returns-type
|
|
83
|
+
'jsdoc/require-throws': 'error', // Reports missing throws in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-throws
|
|
84
|
+
'jsdoc/require-yields': 'error', // Reports missing yields in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-yields
|
|
85
|
+
'jsdoc/require-yields-check': 'error', // Reports missing yields in JSDoc comments. https://github.com/gajus/eslint-plugin-jsdoc#require-yields-check
|
|
86
|
+
'jsdoc/sort-tags': 'error', // Reports unsorted JSDoc tags. https://github.com/gajus/eslint-plugin-jsdoc#sort-tags
|
|
87
|
+
'jsdoc/tag-lines': 'off' // Reports unsorted JSDoc tags. https://github.com/gajus/eslint-plugin-jsdoc#tag-lines
|
|
88
|
+
}
|
|
89
|
+
};
|
package/rules/security.js
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
rules: {
|
|
5
|
+
'redos/no-vulnerable': [
|
|
6
|
+
'error',
|
|
7
|
+
{
|
|
8
|
+
checker: 'auto',
|
|
9
|
+
ignoreErrors: true,
|
|
10
|
+
permittableComplexities: ['polynomial', 'exponential'],
|
|
11
|
+
timeout: 10000
|
|
12
|
+
}
|
|
13
|
+
], // Detects regexes vulnerable to ReDOS attacks https://makenowjust-labs.github.io/recheck/docs/usage/as-eslint-plugin/
|
|
5
14
|
'security/detect-buffer-noassert': 'error', // Detects calls to buffer with noAssert flag set https://github.com/nodesecurity/eslint-plugin-security
|
|
6
15
|
'security/detect-child-process': 'error', // Detects instances of child_process & non-literal exec() https://github.com/nodesecurity/eslint-plugin-security/blob/master/docs/avoid-command-injection-node.md
|
|
7
16
|
'security/detect-disable-mustache-escape': 'error', // Detects object.escapeMarkup = false, which can be used with some template engines to disable escaping of HTML entities. This can lead to Cross-Site Scripting (XSS) vulnerabilities. https://github.com/nodesecurity/eslint-plugin-security
|
package/rules/style.js
CHANGED
|
@@ -334,17 +334,7 @@ module.exports = {
|
|
|
334
334
|
'single',
|
|
335
335
|
{avoidEscape: true}
|
|
336
336
|
], // specify whether double or single quotes should be used
|
|
337
|
-
'require-jsdoc':
|
|
338
|
-
'error',
|
|
339
|
-
{
|
|
340
|
-
require: {
|
|
341
|
-
ArrowFunctionExpression: true,
|
|
342
|
-
ClassDeclaration: true,
|
|
343
|
-
FunctionDeclaration: true,
|
|
344
|
-
MethodDefinition: true
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
], // do not require jsdoc https://eslint.org/docs/rules/require-jsdoc
|
|
337
|
+
'require-jsdoc': 'off', // do not require jsdoc https://eslint.org/docs/rules/require-jsdoc
|
|
348
338
|
semi: ['error', 'always'], // require or disallow use of semicolons instead of ASI https://eslint.org/docs/rules/semi
|
|
349
339
|
'semi-spacing': [
|
|
350
340
|
'error',
|