Skip to content

Commit e89cce4

Browse files
renovate[bot]burtek
andcommitted
feat(deps)!: update dependency eslint to v9 (#41)
* chore(deps): update dependency eslint to v9 * chore(deps): Update peerDependencies * feat!: package.json maintenance, imported eslint recommended config * chore(deps): Bump to eslint 9.4.0 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Bartosz <[email protected]>
1 parent 22c1363 commit e89cce4

File tree

3 files changed

+88
-1201
lines changed

3 files changed

+88
-1201
lines changed

configs/base.js

+4-52
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import js from '@eslint/js';
12
import stylisticPlugin from '@stylistic/eslint-plugin';
23
import * as importPlugin from 'eslint-plugin-import-x';
34
import promise from 'eslint-plugin-promise';
@@ -35,71 +36,44 @@ export function prepareConfig() {
3536
promise
3637
},
3738
rules: {
39+
...js.configs.recommended.rules,
3840
'accessor-pairs': 'error',
3941
'array-callback-return': 'error',
4042
'arrow-body-style': 'error',
4143
'block-spacing': 'error',
4244
'brace-style': 'error',
4345
'camelcase': 'error',
4446
'consistent-return': 'error',
45-
'constructor-super': 'error',
4647
'curly': 'error',
4748
'default-case': 'error',
4849
'default-case-last': 'error',
4950
'dot-notation': 'error',
5051
'eqeqeq': 'error',
51-
'for-direction': 'error',
5252
'func-names': 'error',
5353
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
54-
'getter-return': 'error',
5554
'grouped-accessor-pairs': 'error',
5655
'guard-for-in': 'error',
5756
'new-cap': 'error',
5857
'no-alert': 'error',
5958
'no-array-constructor': 'error',
60-
'no-async-promise-executor': 'error',
6159
'no-await-in-loop': 'error',
6260
'no-caller': 'error',
63-
'no-case-declarations': 'error',
64-
'no-class-assign': 'error',
65-
'no-compare-neg-zero': 'error',
6661
'no-cond-assign': ['error', 'always'],
6762
'no-console': 'error',
68-
'no-const-assign': 'error',
69-
'no-constant-binary-expression': 'error',
70-
'no-constant-condition': 'error',
7163
'no-constructor-return': 'error',
7264
'no-continue': 'error',
73-
'no-control-regex': 'error',
74-
'no-debugger': 'error',
75-
'no-delete-var': 'error',
7665
'no-div-regex': 'error',
77-
'no-dupe-args': 'error',
78-
'no-dupe-class-members': 'error',
79-
'no-dupe-else-if': 'error',
80-
'no-dupe-keys': 'error',
81-
'no-duplicate-case': 'error',
8266
'no-else-return': 'error',
8367
'no-empty': ['error', { allowEmptyCatch: true }],
84-
'no-empty-character-class': 'error',
8568
'no-empty-function': 'error',
86-
'no-empty-pattern': 'error',
87-
'no-empty-static-block': 'error',
8869
'no-eval': 'error',
89-
'no-ex-assign': 'error',
9070
'no-extend-native': 'error',
9171
'no-extra-bind': 'error',
92-
'no-extra-boolean-cast': 'error',
9372
'no-fallthrough': ['error', { allowEmptyCase: true }],
94-
'no-func-assign': 'error',
95-
'no-global-assign': 'error',
9673
'no-implicit-coercion': ['error', { allow: ['!!'] }],
9774
'no-implied-eval': 'error',
98-
'no-import-assign': 'error',
9975
'no-inner-declarations': 'error',
100-
'no-invalid-regexp': 'error',
10176
'no-invalid-this': 'error',
102-
'no-irregular-whitespace': 'error',
10377
'no-iterator': 'error',
10478
'no-labels': 'error',
10579
'no-lone-blocks': 'error',
@@ -115,46 +89,28 @@ export function prepareConfig() {
11589
ignoreDefaultValues: true
11690
}
11791
],
118-
'no-misleading-character-class': 'error',
11992
'no-multi-assign': 'error',
12093
'no-multi-str': 'error',
12194
'no-negated-condition': 'error',
12295
'no-nested-ternary': 'warn',
12396
'no-new': 'error',
12497
'no-new-func': 'error',
125-
'no-new-native-nonconstructor': 'error',
12698
'no-new-wrappers': 'error',
127-
'no-nonoctal-decimal-escape': 'error',
128-
'no-obj-calls': 'error',
12999
'no-object-constructor': 'error',
130-
'no-octal': 'error',
131100
'no-octal-escape': 'error',
132101
'no-param-reassign': 'error',
133102
'no-promise-executor-return': 'error',
134-
'no-redeclare': 'error',
135-
'no-regex-spaces': 'error',
136103
'no-return-assign': 'error',
137104
'no-script-url': 'error',
138-
'no-self-assign': 'error',
139105
'no-self-compare': 'error',
140106
'no-sequences': 'error',
141-
'no-setter-return': 'error',
142107
'no-shadow': 'error',
143-
'no-shadow-restricted-names': 'error',
144-
'no-sparse-arrays': 'error',
145108
'no-template-curly-in-string': 'warn',
146-
'no-this-before-super': 'error',
147109
'no-throw-literal': 'error',
148-
'no-undef': 'error',
149110
'no-undef-init': 'error',
150-
'no-unexpected-multiline': 'error',
151111
'no-unmodified-loop-condition': 'error',
152-
'no-unreachable': 'error',
153112
'no-unreachable-loop': 'error',
154-
'no-unsafe-finally': 'error',
155-
'no-unsafe-negation': 'error',
156113
'no-unused-expressions': 'error',
157-
'no-unused-labels': 'error',
158114
'no-unused-vars': [
159115
'error',
160116
{
@@ -165,17 +121,14 @@ export function prepareConfig() {
165121
],
166122
'no-use-before-define': ['error', { classes: true, functions: false, variables: true }],
167123
'no-useless-call': 'error',
168-
'no-useless-catch': 'error',
169124
'no-useless-computed-key': 'error',
170125
'no-useless-concat': 'error',
171126
'no-useless-constructor': 'error',
172-
'no-useless-escape': 'error',
173127
'no-useless-rename': 'error',
174128
'no-useless-return': 'error',
175129
'no-var': 'error',
176130
'no-void': ['error', { allowAsStatement: true }],
177131
'no-warning-comments': 'error',
178-
'no-with': 'error',
179132
'object-shorthand': 'error',
180133
'one-var': ['error', 'never'],
181134
'operator-assignment': 'error',
@@ -193,9 +146,7 @@ export function prepareConfig() {
193146
'radix': 'error',
194147
'require-atomic-updates': 'error',
195148
'require-await': 'error',
196-
'require-yield': 'error',
197149
'symbol-description': 'error',
198-
'use-isnan': 'error',
199150
'valid-typeof': ['error', { requireStringLiterals: true }],
200151
'yoda': ['error', 'never', { exceptRange: true }],
201152

@@ -346,14 +297,15 @@ export function prepareConfig() {
346297
'dot-notation': 'off',
347298
'no-array-constructor': 'off',
348299
'no-empty-function': 'off',
349-
'no--implicit-returns': 'off',
300+
'no-implicit-returns': 'off',
350301
'no-implied-eval': 'off',
351302
'no-invalid-this': 'off',
352303
'no-loop-func': 'off',
353304
'no-loss-of-precision': 'off',
354305
'no-magic-numbers': 'off',
355306
'no-shadow': 'off',
356307
'no-throw-literal': 'off', // extended by tseslint/only-throw-error
308+
'no-unsafe-optional-chaining': 'off',
357309
'no-unused-expressions': 'off',
358310
'no-unused-vars': 'off',
359311
'no-use-before-define': 'off',

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@
3535
},
3636
"devDependencies": {
3737
"@types/eslint": "^8.56.8",
38+
"@types/eslint__js": "^8.42.3",
3839
"@types/jest": "^29.5.12",
40+
"@types/node": "^20.14.2",
3941
"commit-and-tag-version": "^12.2.0",
40-
"eslint": "^8.57.0",
41-
"eslint-plugin-mdx": "^3.1.5",
42+
"eslint": "^9.4.0",
4243
"exit-code": "^1.0.2",
4344
"jest": "^29.7.0",
4445
"rimraf": "^5.0.5",
@@ -47,7 +48,7 @@
4748
"typescript": "~5.5.2"
4849
},
4950
"peerDependencies": {
50-
"eslint": "^8.56",
51+
"eslint": "^^9.4.0",
5152
"typescript": ">=4.7.4"
5253
},
5354
"private": false,

0 commit comments

Comments
 (0)