Skip to content

Commit ff21153

Browse files
committed
chore: support eslint flat config
1 parent 2ade8fc commit ff21153

6 files changed

Lines changed: 416 additions & 1956 deletions

File tree

.eslintignore

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

eslint.config.mjs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import js from '@eslint/js';
2+
import gitignore from 'eslint-config-flat-gitignore';
3+
import prettierConfig from 'eslint-config-prettier';
4+
import globals from 'globals';
5+
import tseslint from 'typescript-eslint';
6+
7+
export default tseslint.config(
8+
{ files: ['**/*.ts'] },
9+
gitignore(),
10+
{ ignores: ['samples'] },
11+
js.configs.recommended,
12+
...tseslint.configs.recommended,
13+
{
14+
languageOptions: { globals: { ...globals.node, ...globals.es2020 } },
15+
rules: {
16+
eqeqeq: 'error',
17+
'no-param-reassign': 'error',
18+
'object-shorthand': ['error', 'always'],
19+
'prefer-template': 'error',
20+
'@typescript-eslint/consistent-type-imports': 'error',
21+
'@typescript-eslint/no-explicit-any': 'off',
22+
'@typescript-eslint/no-require-imports': 'off',
23+
},
24+
},
25+
prettierConfig,
26+
);

0 commit comments

Comments
 (0)