@pob/eslint-config 47.1.0 → 48.0.4
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 +56 -0
- package/lib/node/commonjs.js +2 -1
- package/lib/node/module.js +7 -1
- package/lib/plugins/unicorn.js +99 -93
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,62 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [48.0.4](https://github.com/christophehurpeau/eslint-config-pob/compare/v48.0.3...v48.0.4) (2021-12-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* sourceType script ([e10cfb2](https://github.com/christophehurpeau/eslint-config-pob/commit/e10cfb26541eee59858730ec0e25bd58b9ccdfa1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [48.0.3](https://github.com/christophehurpeau/eslint-config-pob/compare/v48.0.2...v48.0.3) (2021-12-11)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* make sure cjs files are treated as commonjs ([de37d3d](https://github.com/christophehurpeau/eslint-config-pob/commit/de37d3dbbb4e3b1edbe75541f380b4d99e051385))
|
|
23
|
+
* use ecmaVersion 2022 for node ([6fd0f78](https://github.com/christophehurpeau/eslint-config-pob/commit/6fd0f7847e208d7a66cbf98a99858572dd8f1ac7))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## [48.0.2](https://github.com/christophehurpeau/eslint-config-pob/compare/v48.0.1...v48.0.2) (2021-12-11)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* use ecmaVersion 2021 for node ([0994815](https://github.com/christophehurpeau/eslint-config-pob/commit/099481583a26e4d244070ccef5339f8a65c2079c))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# [48.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v47.1.0...v48.0.0) (2021-12-11)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### chore
|
|
44
|
+
|
|
45
|
+
* update dev deps ([b1e3588](https://github.com/christophehurpeau/eslint-config-pob/commit/b1e3588e32b525548975639d2e35ac3c60b55617))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Features
|
|
49
|
+
|
|
50
|
+
* update to eslint 8 ([2a7b679](https://github.com/christophehurpeau/eslint-config-pob/commit/2a7b67970cb1bb4fdee06badc24948f7d15193e6))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### BREAKING CHANGES
|
|
54
|
+
|
|
55
|
+
* eslint 8 and other peer dependencies updated for eslint 8
|
|
56
|
+
* drop node 12, requires node 14
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
6
62
|
# [47.1.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v47.0.1...v47.1.0) (2021-12-10)
|
|
7
63
|
|
|
8
64
|
|
package/lib/node/commonjs.js
CHANGED
|
@@ -10,8 +10,9 @@ module.exports = {
|
|
|
10
10
|
parserOptions: {
|
|
11
11
|
// https://node.green/#ES2020
|
|
12
12
|
// most 2020 features are supported in node 14
|
|
13
|
+
// top level await is introduced in 2022
|
|
13
14
|
// current ecmaVersion in eslint-plugin-node is 2019
|
|
14
|
-
ecmaVersion:
|
|
15
|
+
ecmaVersion: 2022,
|
|
15
16
|
},
|
|
16
17
|
|
|
17
18
|
rules: {
|
package/lib/node/module.js
CHANGED
|
@@ -9,8 +9,9 @@ module.exports = {
|
|
|
9
9
|
sourceType: 'module',
|
|
10
10
|
// https://node.green/#ES2020
|
|
11
11
|
// most 2020 features are supported in node 14
|
|
12
|
+
// top level await is introduced in 2022
|
|
12
13
|
// current ecmaVersion in eslint-plugin-node is 2019
|
|
13
|
-
ecmaVersion:
|
|
14
|
+
ecmaVersion: 2022,
|
|
14
15
|
},
|
|
15
16
|
env,
|
|
16
17
|
rules: {
|
|
@@ -38,7 +39,12 @@ module.exports = {
|
|
|
38
39
|
{
|
|
39
40
|
files: ['*.cjs'],
|
|
40
41
|
extends: ['plugin:node/recommended-script'],
|
|
42
|
+
parserOptions: {
|
|
43
|
+
sourceType: 'script',
|
|
44
|
+
ecmaVersion: 2022,
|
|
45
|
+
},
|
|
41
46
|
rules: {
|
|
47
|
+
strict: ['error', 'safe'],
|
|
42
48
|
...overrideRules,
|
|
43
49
|
'unicorn/prefer-module': 'off',
|
|
44
50
|
},
|
package/lib/plugins/unicorn.js
CHANGED
|
@@ -9,115 +9,115 @@ usePlugin(require('eslint-plugin-unicorn/package.json'));
|
|
|
9
9
|
module.exports = {
|
|
10
10
|
plugins: ['unicorn'],
|
|
11
11
|
rules: {
|
|
12
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/catch-error-name.md
|
|
13
13
|
'unicorn/catch-error-name': ['error', { name: 'err' }],
|
|
14
14
|
|
|
15
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/explicit-length-check.md
|
|
16
16
|
'unicorn/explicit-length-check': 'error',
|
|
17
17
|
|
|
18
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
18
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md
|
|
19
19
|
'unicorn/filename-case': 'off',
|
|
20
20
|
|
|
21
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
21
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-abusive-eslint-disable.md
|
|
22
22
|
'unicorn/no-abusive-eslint-disable': 'error',
|
|
23
23
|
|
|
24
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
24
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-process-exit.md
|
|
25
25
|
'unicorn/no-process-exit': 'error',
|
|
26
26
|
|
|
27
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
27
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/throw-new-error.md
|
|
28
28
|
'unicorn/throw-new-error': 'error',
|
|
29
29
|
|
|
30
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
30
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/number-literal-case.md
|
|
31
31
|
'unicorn/number-literal-case': 'error',
|
|
32
32
|
|
|
33
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
33
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/escape-case.md
|
|
34
34
|
'unicorn/escape-case': 'error',
|
|
35
35
|
|
|
36
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
36
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-array.md
|
|
37
37
|
'unicorn/no-instanceof-array': 'error',
|
|
38
38
|
|
|
39
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
39
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-buffer.md
|
|
40
40
|
'unicorn/no-new-buffer': 'error',
|
|
41
41
|
|
|
42
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
42
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-hex-escape.md
|
|
43
43
|
'unicorn/no-hex-escape': 'error',
|
|
44
44
|
|
|
45
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
45
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/custom-error-definition.md
|
|
46
46
|
'unicorn/custom-error-definition': 'error',
|
|
47
47
|
|
|
48
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
48
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-starts-ends-with.md
|
|
49
49
|
'unicorn/prefer-string-starts-ends-with': 'error',
|
|
50
50
|
|
|
51
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
51
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md
|
|
52
52
|
'unicorn/prefer-type-error': 'error',
|
|
53
53
|
|
|
54
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
54
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-callback-reference.md
|
|
55
55
|
'unicorn/no-array-callback-reference': 'off',
|
|
56
56
|
|
|
57
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
57
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/import-index.md
|
|
58
58
|
'unicorn/import-index': 'error',
|
|
59
59
|
|
|
60
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
60
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/new-for-builtins.md
|
|
61
61
|
'unicorn/new-for-builtins': 'error',
|
|
62
62
|
|
|
63
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
63
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-regex.md
|
|
64
64
|
'unicorn/better-regex': 'error',
|
|
65
65
|
|
|
66
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
66
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-spread.md
|
|
67
67
|
'unicorn/prefer-spread': 'error',
|
|
68
68
|
|
|
69
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
69
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md
|
|
70
70
|
'unicorn/error-message': 'error',
|
|
71
71
|
|
|
72
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
72
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unsafe-regex.md
|
|
73
73
|
'unicorn/no-unsafe-regex': 'error',
|
|
74
74
|
|
|
75
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
75
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener.md
|
|
76
76
|
'unicorn/prefer-add-event-listener': 'error',
|
|
77
77
|
|
|
78
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
78
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-query-selector.md
|
|
79
79
|
'unicorn/prefer-query-selector': 'off',
|
|
80
80
|
|
|
81
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
81
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-append.md
|
|
82
82
|
'unicorn/prefer-dom-node-append': 'error',
|
|
83
83
|
|
|
84
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
84
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-remove.md
|
|
85
85
|
'unicorn/prefer-dom-node-remove': 'error',
|
|
86
86
|
|
|
87
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
87
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unused-properties.md
|
|
88
88
|
'unicorn/no-unused-properties': 'off',
|
|
89
89
|
|
|
90
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
90
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-array-destructuring.md
|
|
91
91
|
'unicorn/no-unreadable-array-destructuring': 'off',
|
|
92
92
|
|
|
93
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
93
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-console-spaces.md
|
|
94
94
|
'unicorn/no-console-spaces': 'off',
|
|
95
95
|
|
|
96
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
96
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prevent-abbreviations.md
|
|
97
97
|
'unicorn/prevent-abbreviations': 'off',
|
|
98
98
|
|
|
99
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
99
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-for-loop.md
|
|
100
100
|
'unicorn/no-for-loop': 'off',
|
|
101
101
|
|
|
102
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
102
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-zero-fractions.md
|
|
103
103
|
'unicorn/no-zero-fractions': 'off',
|
|
104
104
|
|
|
105
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
105
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes.md
|
|
106
106
|
'unicorn/prefer-includes': 'error',
|
|
107
107
|
|
|
108
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
108
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-text-content.md
|
|
109
109
|
'unicorn/prefer-dom-node-text-content': 'error',
|
|
110
110
|
|
|
111
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
111
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-keyboard-event-key.md
|
|
112
112
|
'unicorn/prefer-keyboard-event-key': 'off',
|
|
113
113
|
|
|
114
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
114
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat-map.md
|
|
115
115
|
'unicorn/prefer-array-flat-map': 'error',
|
|
116
116
|
|
|
117
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
117
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-keyword-prefix.md
|
|
118
118
|
'unicorn/no-keyword-prefix': 'off',
|
|
119
119
|
|
|
120
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
120
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/expiring-todo-comments.md
|
|
121
121
|
'unicorn/expiring-todo-comments': [
|
|
122
122
|
'error',
|
|
123
123
|
{
|
|
@@ -125,171 +125,177 @@ module.exports = {
|
|
|
125
125
|
},
|
|
126
126
|
],
|
|
127
127
|
|
|
128
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
128
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-nested-ternary.md
|
|
129
129
|
'no-nested-ternary': 'off',
|
|
130
130
|
'unicorn/no-nested-ternary': 'error',
|
|
131
131
|
|
|
132
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
132
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-function-scoping.md
|
|
133
133
|
'unicorn/consistent-function-scoping': 'off',
|
|
134
134
|
|
|
135
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
135
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-reflect-apply.md
|
|
136
136
|
'unicorn/prefer-reflect-apply': 'off',
|
|
137
137
|
|
|
138
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
138
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-dataset.md
|
|
139
139
|
'unicorn/prefer-dom-node-dataset': 'error',
|
|
140
140
|
|
|
141
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
141
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-slice.md
|
|
142
142
|
'unicorn/prefer-string-slice': 'error',
|
|
143
143
|
|
|
144
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
144
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-trim-start-end.md
|
|
145
145
|
'unicorn/prefer-string-trim-start-end': 'error',
|
|
146
146
|
|
|
147
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
147
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-negative-index.md
|
|
148
148
|
'unicorn/prefer-negative-index': 'error',
|
|
149
149
|
|
|
150
|
-
// https://github.com/sindr esorhus/eslint-plugin-unicorn/blob/
|
|
150
|
+
// https://github.com/sindr esorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-dom-apis.md
|
|
151
151
|
'unicorn/prefer-modern-dom-apis': 'error',
|
|
152
152
|
|
|
153
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
153
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md
|
|
154
154
|
'unicorn/prefer-string-replace-all': 'off',
|
|
155
155
|
|
|
156
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
156
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/string-content.md
|
|
157
157
|
'unicorn/string-content': 'off',
|
|
158
158
|
|
|
159
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
159
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-number-properties.md
|
|
160
160
|
'unicorn/prefer-number-properties': 'off',
|
|
161
161
|
|
|
162
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
162
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-has.md
|
|
163
163
|
'unicorn/prefer-set-has': 'off',
|
|
164
164
|
|
|
165
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
165
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-optional-catch-binding.md
|
|
166
166
|
'unicorn/prefer-optional-catch-binding': 'error',
|
|
167
167
|
|
|
168
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
168
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-undefined.md
|
|
169
169
|
'unicorn/no-useless-undefined': 'off',
|
|
170
170
|
|
|
171
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
171
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-find.md
|
|
172
172
|
'unicorn/prefer-array-find': 'error',
|
|
173
173
|
|
|
174
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
174
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reduce.md
|
|
175
175
|
'unicorn/no-array-reduce': 'error',
|
|
176
176
|
|
|
177
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
177
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/import-style.md
|
|
178
178
|
'unicorn/import-style': 'off',
|
|
179
179
|
|
|
180
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
180
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-trunc.md
|
|
181
181
|
'unicorn/prefer-math-trunc': 'error',
|
|
182
182
|
|
|
183
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
183
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/numeric-separators-style.md
|
|
184
184
|
'unicorn/numeric-separators-style': 'error',
|
|
185
185
|
|
|
186
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
186
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md
|
|
187
187
|
'unicorn/prefer-ternary': 'off',
|
|
188
188
|
|
|
189
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
189
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-lonely-if.md
|
|
190
190
|
'unicorn/no-lonely-if': 'off',
|
|
191
191
|
|
|
192
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
192
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/empty-brace-spaces.md
|
|
193
193
|
'unicorn/empty-brace-spaces': 'off',
|
|
194
194
|
|
|
195
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
195
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-date-now.md
|
|
196
196
|
'unicorn/prefer-date-now': 'error',
|
|
197
197
|
|
|
198
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
198
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-some.md
|
|
199
199
|
'unicorn/prefer-array-some': 'error',
|
|
200
200
|
|
|
201
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
201
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-default-parameters.md
|
|
202
202
|
'unicorn/prefer-default-parameters': 'error',
|
|
203
203
|
|
|
204
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
204
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-array.md
|
|
205
205
|
'unicorn/no-new-array': 'error',
|
|
206
206
|
|
|
207
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
207
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-index-of.md
|
|
208
208
|
'unicorn/prefer-array-index-of': 'error',
|
|
209
209
|
|
|
210
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
210
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-regexp-test.md
|
|
211
211
|
'unicorn/prefer-regexp-test': 'error',
|
|
212
212
|
|
|
213
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
213
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-destructuring.md
|
|
214
214
|
'unicorn/consistent-destructuring': 'off',
|
|
215
215
|
|
|
216
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
216
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-for-each.md
|
|
217
217
|
'unicorn/no-array-for-each': 'off',
|
|
218
218
|
|
|
219
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
219
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-push-push.md
|
|
220
220
|
'unicorn/no-array-push-push': 'error',
|
|
221
221
|
|
|
222
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
222
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-this-assignment.md
|
|
223
223
|
'unicorn/no-this-assignment': 'error',
|
|
224
224
|
|
|
225
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
225
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-static-only-class.md
|
|
226
226
|
'unicorn/no-static-only-class': 'error',
|
|
227
227
|
|
|
228
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
228
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat.md
|
|
229
229
|
'unicorn/prefer-array-flat': 'error',
|
|
230
230
|
|
|
231
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
231
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-switch.md
|
|
232
232
|
'unicorn/prefer-switch': 'error',
|
|
233
233
|
|
|
234
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
234
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md
|
|
235
235
|
'unicorn/prefer-node-protocol': 'off',
|
|
236
236
|
|
|
237
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
237
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-module.md
|
|
238
238
|
// unicorn/prefer-module is enabled in node configs.
|
|
239
239
|
'unicorn/prefer-module': 'off',
|
|
240
240
|
|
|
241
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
241
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-document-cookie.md
|
|
242
242
|
'unicorn/no-document-cookie': 'error',
|
|
243
243
|
|
|
244
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
244
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-array-join-separator.md
|
|
245
245
|
'unicorn/require-array-join-separator': 'error',
|
|
246
246
|
|
|
247
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
247
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-number-to-fixed-digits-argument.md
|
|
248
248
|
'unicorn/require-number-to-fixed-digits-argument': 'error',
|
|
249
249
|
|
|
250
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
250
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-prototype-methods.md
|
|
251
251
|
'unicorn/prefer-prototype-methods': 'error',
|
|
252
252
|
|
|
253
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
253
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-has-own.md
|
|
254
254
|
'unicorn/prefer-object-has-own': 'error',
|
|
255
255
|
|
|
256
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
256
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-method-this-argument.md
|
|
257
257
|
'unicorn/no-array-method-this-argument': 'error',
|
|
258
258
|
|
|
259
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
259
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-post-message-target-origin.md
|
|
260
260
|
'unicorn/require-post-message-target-origin': 'error',
|
|
261
261
|
|
|
262
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
263
|
-
|
|
264
|
-
'unicorn/prefer-top-level-await': 'off',
|
|
262
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-top-level-await.md
|
|
263
|
+
'unicorn/prefer-top-level-await': 'error',
|
|
265
264
|
|
|
266
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
265
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md
|
|
266
|
+
// use when node 14 support drop
|
|
267
267
|
'unicorn/prefer-at': 'off',
|
|
268
268
|
|
|
269
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
269
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-from-entries.md
|
|
270
270
|
'unicorn/prefer-object-from-entries': 'error',
|
|
271
271
|
|
|
272
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
272
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-length-check.md
|
|
273
273
|
'unicorn/no-useless-length-check': 'error',
|
|
274
274
|
|
|
275
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
275
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-spread.md
|
|
276
276
|
'unicorn/no-useless-spread': 'error',
|
|
277
277
|
|
|
278
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
278
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-fallback-in-spread.md
|
|
279
279
|
'unicorn/no-useless-fallback-in-spread': 'error',
|
|
280
280
|
|
|
281
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
281
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-remove-event-listener.md
|
|
282
282
|
'unicorn/no-invalid-remove-event-listener': 'error',
|
|
283
283
|
|
|
284
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
284
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/template-indent.md
|
|
285
285
|
// prettier does that
|
|
286
286
|
'unicorn/template-indent': 'off',
|
|
287
287
|
|
|
288
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
288
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-empty-file.md
|
|
289
289
|
'unicorn/no-empty-file': 'off',
|
|
290
290
|
|
|
291
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
291
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-export-from.md
|
|
292
292
|
'unicorn/prefer-export-from': 'error',
|
|
293
|
+
|
|
294
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-code-point.md
|
|
295
|
+
'unicorn/prefer-code-point': 'error',
|
|
296
|
+
|
|
297
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md
|
|
298
|
+
'unicorn/no-await-expression-member': 'error',
|
|
293
299
|
},
|
|
294
300
|
|
|
295
301
|
overrides: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pob/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "48.0.4",
|
|
4
4
|
"description": "eslint config files",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Christophe Hurpeau <christophe@hurpeau.com> (http://christophe.hurpeau.com/)",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"homepage": "https://github.com/christophehurpeau/eslint-config-pob",
|
|
14
14
|
"type": "commonjs",
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": "^
|
|
16
|
+
"node": "^14.13.1 || >=16.0.0"
|
|
17
17
|
},
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"access": "public"
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
},
|
|
43
43
|
"pob": {},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"eslint": "^
|
|
46
|
-
"eslint-plugin-import": "^2.
|
|
45
|
+
"eslint": "^8.4.1",
|
|
46
|
+
"eslint-plugin-import": "^2.25.3",
|
|
47
47
|
"eslint-plugin-node": "^11.1.0",
|
|
48
|
-
"eslint-plugin-unicorn": "^
|
|
48
|
+
"eslint-plugin-unicorn": "^39.0.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
51
|
"eslint-plugin-import": {
|
|
@@ -59,12 +59,12 @@
|
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@pob/use-eslint-plugin": "^
|
|
63
|
-
"eslint-config-airbnb-base": "^
|
|
64
|
-
"eslint-config-prettier": "^8.
|
|
65
|
-
"eslint-plugin-import": "^2.
|
|
62
|
+
"@pob/use-eslint-plugin": "^48.0.0",
|
|
63
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
64
|
+
"eslint-config-prettier": "^8.3.0",
|
|
65
|
+
"eslint-plugin-import": "^2.25.3",
|
|
66
66
|
"eslint-plugin-node": "^11.1.0",
|
|
67
|
-
"eslint-plugin-unicorn": "^
|
|
67
|
+
"eslint-plugin-unicorn": "^39.0.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "0266a74455e1ee8efe7240748bf6b397767925f5"
|
|
70
70
|
}
|