-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
60 lines (58 loc) · 1.49 KB
/
eslint.config.mjs
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import eslintRecommended from '@eslint/js';
import typeScriptEslintPlugin from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintImportPlugin from 'eslint-plugin-import';
import prettierPlugin from 'eslint-plugin-prettier';
import globals from 'globals';
import { importOrderConfig } from './config/eslint/import-order.config.mjs';
import { typescriptRules } from './config/eslint/typescript-rules.config.mjs';
export default [
eslintRecommended.configs.recommended,
eslintConfigPrettier,
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: typescriptParser,
parserOptions: {
project: './tsconfig.json',
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
...globals.node,
...globals.jest,
},
},
plugins: {
'@typescript-eslint': typeScriptEslintPlugin,
import: eslintImportPlugin,
prettier: prettierPlugin,
},
settings: {
'import/resolver': {
typescript: {
project: './tsconfig.json',
},
},
},
rules: {
...typescriptRules,
'import/order': importOrderConfig,
},
},
{
ignores: [
'**/dist/',
'**/build/',
'**/coverage/',
'**/node_modules/',
'node_modules/',
'*.config.{js,ts,mjs}',
],
},
];