Skip to content

Commit 5a729c3

Browse files
committed
chore: move to eslint 10 and typescript-eslint 8 with flat config
1 parent 510ca85 commit 5a729c3

9 files changed

Lines changed: 557 additions & 776 deletions

File tree

.eslintrc.cjs

Lines changed: 0 additions & 31 deletions
This file was deleted.

eslint.config.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import tseslint from 'typescript-eslint'
4+
import prettier from 'eslint-config-prettier'
5+
6+
export default tseslint.config(
7+
{
8+
ignores: ['dist', 'coverage', 'node_modules', '**/*.config.ts', '**/*.config.js'],
9+
},
10+
js.configs.recommended,
11+
...tseslint.configs.recommended,
12+
...tseslint.configs.recommendedTypeChecked,
13+
prettier,
14+
{
15+
languageOptions: {
16+
parserOptions: {
17+
project: './tsconfig.json',
18+
ecmaVersion: 2022,
19+
sourceType: 'module',
20+
},
21+
globals: {
22+
...globals.browser,
23+
...globals.node,
24+
},
25+
},
26+
rules: {
27+
'@typescript-eslint/no-unused-vars': [
28+
'error',
29+
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
30+
],
31+
'@typescript-eslint/consistent-type-imports': 'error',
32+
'@typescript-eslint/no-floating-promises': 'error',
33+
'@typescript-eslint/no-misused-promises': 'error',
34+
'@typescript-eslint/no-explicit-any': 'error',
35+
'@typescript-eslint/explicit-function-return-type': ['warn', { allowExpressions: true }],
36+
'no-console': ['warn', { allow: ['warn', 'error'] }],
37+
eqeqeq: ['error', 'always'],
38+
'prefer-const': 'error',
39+
'no-var': 'error',
40+
},
41+
},
42+
)

0 commit comments

Comments
 (0)