@pplancq/eslint-config 2.3.0 → 3.0.1

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 CHANGED
@@ -1,3 +1,26 @@
1
+ ## @pplancq/eslint-config [3.0.1](https://github.com/pplancq/dev-tools/compare/@pplancq/eslint-config@3.0.0...@pplancq/eslint-config@3.0.1) (2024-10-15)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **deps:** update dependency @vitest/eslint-plugin to ^1.1.6 ([e17e044](https://github.com/pplancq/dev-tools/commit/e17e044dd7f9ccf73513eeab855394a5121df0b8))
6
+ * **deps:** update dependency @vitest/eslint-plugin to ^1.1.7 ([c9eba23](https://github.com/pplancq/dev-tools/commit/c9eba238a5c8ab3647ddbff68542f901fb154e81))
7
+ * **deps:** update dependency eslint-plugin-import to ^2.31.0 ([74e1c9f](https://github.com/pplancq/dev-tools/commit/74e1c9f098dae47e1d3fc46b484a2c1533cf49df))
8
+ * **deps:** update dependency eslint-plugin-react to ^7.37.1 ([98e26d5](https://github.com/pplancq/dev-tools/commit/98e26d5998f5738a8402949d8634335c02c6723f))
9
+ * **deps:** update typescript-eslint packages to ^8.8.0 ([fc92bb3](https://github.com/pplancq/dev-tools/commit/fc92bb35795f1aba90d8ccfe180e2121513fe9c5))
10
+ * **deps:** update typescript-eslint packages to ^8.8.1 ([23d9c82](https://github.com/pplancq/dev-tools/commit/23d9c8290b1cba9f549f0e14b168d6f046bad016))
11
+
12
+ ## @pplancq/eslint-config [3.0.0](https://github.com/pplancq/dev-tools/compare/@pplancq/eslint-config@2.3.0...@pplancq/eslint-config@3.0.0) (2024-09-16)
13
+
14
+ ### ⚠ BREAKING CHANGES
15
+
16
+ * **eslint-config:** Node.js engine requirement to >=18.18.0 or >=20.9.0 or >=21.1.0
17
+
18
+ ### Features
19
+
20
+ * **eslint-config:** bump @typescript-eslint/eslint-plugin and @typescript-eslint/parser 7.17.0 to 8.3.0 ([61beba7](https://github.com/pplancq/dev-tools/commit/61beba79c480f2fd5dce39559b301194b8b6efa5))
21
+ * **eslint-config:** bump eslint-plugin-vitest 0.5.4 to @vitest/eslint-plugin 1.1.4 ([9a1af23](https://github.com/pplancq/dev-tools/commit/9a1af239bdcf249bec444ce757babf478fdbd900))
22
+ * **eslint-config:** update Node.js engine requirement to >=18.18.0 or >=20.9.0 or >=21.1.0 ([4239b0d](https://github.com/pplancq/dev-tools/commit/4239b0dd419c8eb1cfbd9ad881ed64c9dd56894a))
23
+
1
24
  ## @pplancq/eslint-config [2.3.0](https://github.com/pplancq/dev-tools/compare/@pplancq/eslint-config@2.2.0...@pplancq/eslint-config@2.3.0) (2024-08-27)
2
25
 
3
26
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pplancq/eslint-config",
3
- "version": "2.3.0",
3
+ "version": "3.0.1",
4
4
  "license": "MIT",
5
5
  "description": "pplancq eslint config",
6
6
  "author": "pplancq <paul.plancq@outlook.fr>",
@@ -27,19 +27,18 @@
27
27
  "config"
28
28
  ],
29
29
  "dependencies": {
30
- "@typescript-eslint/eslint-plugin": "^7.17.0",
31
- "@typescript-eslint/parser": "^7.18.0",
32
- "eslint-import-resolver-typescript": "^3.6.1",
33
- "eslint-plugin-import": "^2.29.0",
34
- "eslint-plugin-jest": "^28.8.0",
30
+ "@typescript-eslint/eslint-plugin": "^8.8.1",
31
+ "@typescript-eslint/parser": "^8.8.1",
32
+ "@vitest/eslint-plugin": "^1.1.7",
33
+ "eslint-import-resolver-typescript": "^3.6.3",
34
+ "eslint-plugin-import": "^2.31.0",
35
+ "eslint-plugin-jest": "^28.8.3",
35
36
  "eslint-plugin-jest-dom": "^5.4.0",
36
37
  "eslint-plugin-jest-extended": "^2.4.0",
37
- "eslint-plugin-jsx-a11y": "^6.9.0",
38
- "eslint-plugin-react": "^7.35.0",
38
+ "eslint-plugin-jsx-a11y": "^6.10.0",
39
+ "eslint-plugin-react": "^7.37.1",
39
40
  "eslint-plugin-react-hooks": "^4.6.2",
40
- "eslint-plugin-testing-library": "^6.3.0",
41
- "eslint-plugin-vitest": "^0.5.4",
42
- "eslint-plugin-vitest-globals": "^1.5.0"
41
+ "eslint-plugin-testing-library": "^6.3.0"
43
42
  },
44
43
  "peerDependencies": {
45
44
  "eslint": "^8.57.0",
@@ -55,7 +54,7 @@
55
54
  }
56
55
  },
57
56
  "engines": {
58
- "node": "^18.18.0 || >=20.0.0"
57
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
59
58
  },
60
59
  "volta": {
61
60
  "extends": "../../package.json"
package/rules/vitest.js CHANGED
@@ -2,10 +2,7 @@ module.exports = {
2
2
  overrides: [
3
3
  {
4
4
  files: ['*.{test,spec,steps}.{js,jsx,ts,tsx}'],
5
- plugins: ['vitest', 'vitest-globals'],
6
- env: {
7
- 'vitest-globals/env': true,
8
- },
5
+ plugins: ['@vitest'],
9
6
  rules: {
10
7
  // eslint-plugin-import https://github.com/import-js/eslint-plugin-import
11
8
 
@@ -17,215 +14,215 @@ module.exports = {
17
14
 
18
15
  // Require .spec test file pattern
19
16
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
20
- 'vitest/consistent-test-filename': 'off',
17
+ '@vitest/consistent-test-filename': 'off',
21
18
 
22
19
  // Enforce using test or it but not both
23
20
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-it.md
24
- 'vitest/consistent-test-it': 'off',
21
+ '@vitest/consistent-test-it': 'off',
25
22
 
26
23
  // Enforce having expectation in test body
27
24
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
28
- 'vitest/expect-expect': 'off',
25
+ '@vitest/expect-expect': 'off',
29
26
 
30
27
  // Enforce a maximum number of expect per test
31
28
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
32
- 'vitest/max-expects': 'off',
29
+ '@vitest/max-expects': 'off',
33
30
 
34
31
  // Require describe block to be less than set max value or default value
35
32
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-nested-describe.md
36
- 'vitest/max-nested-describe': 'off',
33
+ '@vitest/max-nested-describe': 'off',
37
34
 
38
35
  // Disallow alias methods
39
36
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-alias-methods.md
40
- 'vitest/no-alias-methods': 'off',
37
+ '@vitest/no-alias-methods': 'off',
41
38
 
42
39
  // Disallow commented out tests
43
40
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-commented-out-tests.md
44
- 'vitest/no-commented-out-tests': 'off',
41
+ '@vitest/no-commented-out-tests': 'off',
45
42
 
46
43
  // Disallow conditional expects
47
44
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md
48
- 'vitest/no-conditional-expect': 'error',
45
+ '@vitest/no-conditional-expect': 'error',
49
46
 
50
47
  // Disallow conditional tests
51
48
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-in-test.md
52
- 'vitest/no-conditional-in-test': 'off',
49
+ '@vitest/no-conditional-in-test': 'off',
53
50
 
54
51
  // Disallow conditional tests
55
52
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-tests.md
56
- 'vitest/no-conditional-tests': 'off',
53
+ '@vitest/no-conditional-tests': 'off',
57
54
 
58
55
  // Disallow disabled tests
59
56
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-disabled-tests.md
60
- 'vitest/no-disabled-tests': 'off',
57
+ '@vitest/no-disabled-tests': 'off',
61
58
 
62
59
  // Disallow using a callback in asynchronous tests and hooks
63
60
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-done-callback.md
64
- 'vitest/no-done-callback': 'off',
61
+ '@vitest/no-done-callback': 'off',
65
62
 
66
63
  // Disallow duplicate hooks and teardown hooks
67
64
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-duplicate-hooks.md
68
- 'vitest/no-duplicate-hooks': 'off',
65
+ '@vitest/no-duplicate-hooks': 'off',
69
66
 
70
67
  // Disallow focused tests
71
68
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-focused-tests.md
72
- 'vitest/no-focused-tests': 'off',
69
+ '@vitest/no-focused-tests': 'off',
73
70
 
74
71
  // Disallow setup and teardown hooks
75
72
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-hooks.md
76
- 'vitest/no-hooks': 'off',
73
+ '@vitest/no-hooks': 'off',
77
74
 
78
75
  // Disallow identical titles
79
76
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-identical-title.md
80
- 'vitest/no-identical-title': 'error',
77
+ '@vitest/no-identical-title': 'error',
81
78
 
82
79
  // Disallow importing node:test
83
80
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-import-node-test.md
84
- 'vitest/no-import-node-test': 'off',
81
+ '@vitest/no-import-node-test': 'off',
85
82
 
86
83
  // Disallow string interpolation in snapshots
87
84
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-interpolation-in-snapshots.md
88
- 'vitest/no-interpolation-in-snapshots': 'error',
85
+ '@vitest/no-interpolation-in-snapshots': 'error',
89
86
 
90
87
  // Disallow large snapshots
91
88
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-large-snapshots.md
92
- 'vitest/no-large-snapshots': 'off',
89
+ '@vitest/no-large-snapshots': 'off',
93
90
 
94
91
  // Disallow importing from mocks directory
95
92
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-mocks-import.md
96
- 'vitest/no-mocks-import': 'error',
93
+ '@vitest/no-mocks-import': 'error',
97
94
 
98
95
  // Disallow the use of certain matchers
99
96
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-matchers.md
100
- 'vitest/no-restricted-matchers': 'off',
97
+ '@vitest/no-restricted-matchers': 'off',
101
98
 
102
99
  // Disallow specific vi. methods
103
100
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-vi-methods.md
104
- 'vitest/no-restricted-vi-methods': 'off',
101
+ '@vitest/no-restricted-vi-methods': 'off',
105
102
 
106
103
  // Disallow using expect outside of it or test blocks
107
104
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-standalone-expect.md
108
- 'vitest/no-standalone-expect': 'off',
105
+ '@vitest/no-standalone-expect': 'off',
109
106
 
110
107
  // Disallow using test as a prefix
111
108
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-prefixes.md
112
- 'vitest/no-test-prefixes': 'off',
109
+ '@vitest/no-test-prefixes': 'off',
113
110
 
114
111
  // Disallow return statements in tests
115
112
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md
116
- 'vitest/no-test-return-statement': 'off',
113
+ '@vitest/no-test-return-statement': 'off',
117
114
 
118
115
  // Enforce using toBeCalledWith() or toHaveBeenCalledWith()
119
116
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md
120
- 'vitest/prefer-called-with': 'error',
117
+ '@vitest/prefer-called-with': 'error',
121
118
 
122
119
  // Enforce using the built-in comparison matchers
123
120
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-comparison-matcher.md
124
- 'vitest/prefer-comparison-matcher': 'off',
121
+ '@vitest/prefer-comparison-matcher': 'off',
125
122
 
126
123
  // Enforce using each rather than manual loops
127
124
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-each.md
128
- 'vitest/prefer-each': 'off',
125
+ '@vitest/prefer-each': 'off',
129
126
 
130
127
  // Enforce using the built-in quality matchers
131
128
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-equality-matcher.md
132
- 'vitest/prefer-equality-matcher': 'off',
129
+ '@vitest/prefer-equality-matcher': 'off',
133
130
 
134
131
  // Enforce using expect assertions instead of callbacks
135
132
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-assertions.md
136
- 'vitest/prefer-expect-assertions': 'off',
133
+ '@vitest/prefer-expect-assertions': 'off',
137
134
 
138
135
  // Enforce using expect().resolves over expect(await ...) syntax
139
136
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-resolves.md
140
- 'vitest/prefer-expect-resolves': 'off',
137
+ '@vitest/prefer-expect-resolves': 'off',
141
138
 
142
139
  // Enforce having hooks in consistent order (vitest/prefer-hooks-in-order)
143
140
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-in-order.md
144
- 'vitest/prefer-hooks-in-order': 'off',
141
+ '@vitest/prefer-hooks-in-order': 'off',
145
142
 
146
143
  // Enforce having hooks before any test cases
147
144
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md
148
- 'vitest/prefer-hooks-on-top': 'off',
145
+ '@vitest/prefer-hooks-on-top': 'off',
149
146
 
150
147
  // Enforce lowercase titles
151
148
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-lowercase-title.md
152
- 'vitest/prefer-lowercase-title': 'off',
149
+ '@vitest/prefer-lowercase-title': 'off',
153
150
 
154
151
  // Enforce mock resolved/rejected shorthands for promises
155
152
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md
156
- 'vitest/prefer-mock-promise-shorthand': 'off',
153
+ '@vitest/prefer-mock-promise-shorthand': 'off',
157
154
 
158
155
  // Enforce including a hint with external snapshots
159
156
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md
160
- 'vitest/prefer-snapshot-hint': 'off',
157
+ '@vitest/prefer-snapshot-hint': 'off',
161
158
 
162
159
  // Enforce using vi.spyOn
163
160
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-spy-on.md
164
- 'vitest/prefer-spy-on': 'off',
161
+ '@vitest/prefer-spy-on': 'off',
165
162
 
166
163
  // Enforce strict equal over equal
167
164
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-equal.md
168
- 'vitest/prefer-strict-equal': 'error',
165
+ '@vitest/prefer-strict-equal': 'error',
169
166
 
170
167
  // Enforce using toBe()
171
168
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be.md
172
- 'vitest/prefer-to-be': 'off',
169
+ '@vitest/prefer-to-be': 'off',
173
170
 
174
171
  // Enforce using toBeFalsy()
175
172
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-falsy.md
176
- 'vitest/prefer-to-be-falsy': 'error',
173
+ '@vitest/prefer-to-be-falsy': 'error',
177
174
 
178
175
  // Enforce using toBeObject()
179
176
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-object.md
180
- 'vitest/prefer-to-be-object': 'error',
177
+ '@vitest/prefer-to-be-object': 'error',
181
178
 
182
179
  // Enforce using toBeTruthy
183
180
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-truthy.md
184
- 'vitest/prefer-to-be-truthy': 'error',
181
+ '@vitest/prefer-to-be-truthy': 'error',
185
182
 
186
183
  // Enforce using toContain()
187
184
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-contain.md
188
- 'vitest/prefer-to-contain': 'error',
185
+ '@vitest/prefer-to-contain': 'error',
189
186
 
190
187
  // Enforce using toHaveLength()
191
188
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md
192
- 'vitest/prefer-to-have-length': 'error',
189
+ '@vitest/prefer-to-have-length': 'error',
193
190
 
194
191
  // Enforce using test.todo
195
192
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-todo.md
196
- 'vitest/prefer-todo': 'off',
193
+ '@vitest/prefer-todo': 'off',
197
194
 
198
195
  // Require setup and teardown to be within a hook
199
196
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
200
- 'vitest/require-hook': 'off',
197
+ '@vitest/require-hook': 'off',
201
198
 
202
199
  // Require local Test Context for concurrent snapshot tests
203
200
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
204
- 'vitest/require-local-test-context-for-concurrent-snapshots': 'off',
201
+ '@vitest/require-local-test-context-for-concurrent-snapshots': 'off',
205
202
 
206
203
  // Require toThrow() to be called with an error message
207
204
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md
208
- 'vitest/require-to-throw-message': 'off',
205
+ '@vitest/require-to-throw-message': 'off',
209
206
 
210
207
  // Enforce that all tests are in a top-level describe
211
208
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-top-level-describe.md
212
- 'vitest/require-top-level-describe': 'off',
209
+ '@vitest/require-top-level-describe': 'off',
213
210
 
214
211
  // Enforce unbound methods are called with their expected scope
215
212
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/unbound-method.md
216
- 'vitest/unbound-method': 'off',
213
+ '@vitest/unbound-method': 'off',
217
214
 
218
215
  // Enforce valid describe callback
219
216
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-describe-callback.md
220
- 'vitest/valid-describe-callback': 'error',
217
+ '@vitest/valid-describe-callback': 'error',
221
218
 
222
219
  // Enforce valid expect() usage
223
220
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-expect.md
224
- 'vitest/valid-expect': 'error',
221
+ '@vitest/valid-expect': 'error',
225
222
 
226
223
  // Enforce valid titles
227
224
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md
228
- 'vitest/valid-title': 'warn',
225
+ '@vitest/valid-title': 'warn',
229
226
  },
230
227
  },
231
228
  ],