-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypescript.js
38 lines (37 loc) · 1.03 KB
/
typescript.js
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 ts from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
export default [
{
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaFeatures: { modules: true },
ecmaVersion: 'latest',
project: './tsconfig.json',
},
},
plugins: {
'@typescript-eslint': ts,
},
rules: {
...ts.configs['eslint-recommended'].rules,
...ts.configs['recommended'].rules,
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{ 'ts-expect-error': 'off' },
],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
'@typescript-eslint/no-namespace': ['error', { allowDeclarations: true }],
},
},
];