-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.mjs
More file actions
38 lines (34 loc) · 1.16 KB
/
eslint.config.mjs
File metadata and controls
38 lines (34 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { defineConfig, globalIgnores } from 'eslint/config';
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import prettierPlugin from 'eslint-plugin-prettier';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import prettierConfig from 'eslint-config-prettier';
export default defineConfig([
globalIgnores(['dist/*']),
{
files: ['./src/**/*.ts', './src/**/*.tsx'],
languageOptions: {
parser: tsParser,
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: {
'@typescript-eslint': tsPlugin,
prettier: prettierPlugin,
'simple-import-sort': simpleImportSort, // ✅ MUST MATCH RULE PREFIX
},
rules: {
...tsPlugin.configs.recommended.rules,
...prettierConfig.rules,
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'sort-imports': 'off',
'import/order': 'off',
'prettier/prettier': 'error',
},
},
]);