-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
82 lines (81 loc) · 2.2 KB
/
eslint.config.mjs
File metadata and controls
82 lines (81 loc) · 2.2 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
import importPlugin from 'eslint-plugin-import-x';
import eslintConfigPrettier from 'eslint-config-prettier';
export default [
{
ignores: [
'out/**',
'dist/**',
'**/*.d.ts',
'coverage/**',
'node_modules/**',
],
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
languageOptions: {
parser: tsparser,
parserOptions: {
project: './tsconfig.eslint.json',
sourceType: 'module',
},
ecmaVersion: 2020,
sourceType: 'module',
globals: {
console: 'readonly',
process: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
module: 'readonly',
require: 'readonly',
exports: 'readonly',
Buffer: 'readonly',
},
},
plugins: {
'@typescript-eslint': tseslint,
import: importPlugin,
},
rules: {
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-empty-interface': 'warn',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/prefer-for-of': 'warn',
'@typescript-eslint/triple-slash-reference': 'error',
'@typescript-eslint/unified-signatures': 'warn',
'no-param-reassign': 'error',
'import/no-unassigned-import': 'warn',
'comma-dangle': ['error', 'only-multiline'],
'constructor-super': 'error',
eqeqeq: ['warn', 'always'],
'no-cond-assign': 'error',
'no-duplicate-case': 'error',
'no-duplicate-imports': 'error',
'no-empty': [
'error',
{
allowEmptyCatch: true,
},
],
'spaced-comment': 'error',
'no-invalid-this': 'error',
'no-new-wrappers': 'error',
'no-redeclare': 'error',
'no-sequences': 'error',
'no-shadow': [
'error',
{
hoist: 'all',
},
],
'no-throw-literal': 'error',
'no-unsafe-finally': 'error',
'no-unused-labels': 'error',
'no-var': 'warn',
'prefer-const': 'warn',
},
},
eslintConfigPrettier,
];