-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
55 lines (54 loc) · 1.65 KB
/
Copy patheslint.config.js
File metadata and controls
55 lines (54 loc) · 1.65 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
const tseslint = require('@typescript-eslint/eslint-plugin');
const tsparser = require('@typescript-eslint/parser');
module.exports = [
{
files: ['src/**/*.ts'],
ignores: ['src/tui/**'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
}
},
plugins: { '@typescript-eslint': tseslint },
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/prefer-optional-chain': 'warn',
'no-console': 'off',
'no-debugger': 'error',
'no-empty': ['error', { allowEmptyCatch: true }],
'eqeqeq': ['error', 'always', { null: 'ignore' }],
}
},
{
files: ['src/tui/**/*.ts', 'src/tui/**/*.tsx'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
project: './tsconfig.tui.json',
tsconfigRootDir: __dirname,
}
},
plugins: { '@typescript-eslint': tseslint },
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
'no-console': 'off',
'no-debugger': 'error',
'no-empty': ['error', { allowEmptyCatch: true }],
'eqeqeq': ['error', 'always', { null: 'ignore' }],
}
},
{
ignores: ['dist/**', 'node_modules/**', 'coverage/**']
}
];