Skip to content

Commit f0a22b1

Browse files
chore: Use typescript-eslint v6 features (#36)
* chore: Use typescript-eslint v6 features * Remove overrides
1 parent 961e601 commit f0a22b1

3 files changed

Lines changed: 63 additions & 63 deletions

File tree

.eslintrc.cjs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
/** @type {import('eslint').Linter.Config} */
44
const config = {
55
root: true,
6+
reportUnusedDisableDirectives: true,
67
parser: '@typescript-eslint/parser',
78
plugins: ['@typescript-eslint', 'import'],
89
extends: [
9-
'plugin:@typescript-eslint/eslint-recommended',
10+
'eslint:recommended',
1011
'plugin:@typescript-eslint/recommended',
12+
'plugin:@typescript-eslint/stylistic',
1113
'plugin:import/recommended',
1214
'plugin:import/typescript',
1315
'prettier',
@@ -18,7 +20,7 @@ const config = {
1820
},
1921
parserOptions: {
2022
tsconfigRootDir: __dirname,
21-
project: './tsconfig.json',
23+
project: true,
2224
sourceType: 'module',
2325
ecmaVersion: 2020,
2426
},
@@ -34,9 +36,14 @@ const config = {
3436
},
3537
},
3638
rules: {
39+
'@typescript-eslint/array-type': 'off',
3740
'@typescript-eslint/ban-types': 'off',
3841
'@typescript-eslint/ban-ts-comment': 'off',
39-
'@typescript-eslint/consistent-type-imports': 'error',
42+
'@typescript-eslint/consistent-type-definitions': 'off',
43+
'@typescript-eslint/consistent-type-imports': [
44+
'error',
45+
{ prefer: 'type-imports' },
46+
],
4047
'@typescript-eslint/explicit-module-boundary-types': 'off',
4148
'@typescript-eslint/no-empty-interface': 'off',
4249
'@typescript-eslint/no-explicit-any': 'off',
@@ -76,16 +83,9 @@ const config = {
7683

7784
'no-redeclare': 'off',
7885
'no-shadow': 'error',
86+
'no-undef': 'off',
7987
'sort-imports': ['error', { ignoreDeclarationSort: true }],
8088
},
81-
overrides: [
82-
{
83-
files: ['**/*.test.{ts,tsx}'],
84-
rules: {
85-
'@typescript-eslint/no-unnecessary-condition': 'off',
86-
},
87-
},
88-
],
8989
}
9090

9191
module.exports = config

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@
9595
"@types/semver": "^7.5.6",
9696
"@types/stream-to-array": "^2.3.3",
9797
"@types/v8flags": "^3.1.3",
98-
"@typescript-eslint/eslint-plugin": "^6.19.0",
99-
"@typescript-eslint/parser": "^6.19.0",
98+
"@typescript-eslint/eslint-plugin": "^6.20.0",
99+
"@typescript-eslint/parser": "^6.20.0",
100100
"eslint": "^8.56.0",
101101
"eslint-config-prettier": "^9.1.0",
102102
"eslint-import-resolver-typescript": "^3.6.1",

pnpm-lock.yaml

Lines changed: 50 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)