-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
56 lines (55 loc) · 1.68 KB
/
eslint.config.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import typescriptPlugin from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import tsDocPlugin from 'eslint-plugin-tsdoc';
import stylisticTs from '@stylistic/eslint-plugin-ts';
import pluginJest from 'eslint-plugin-jest';
export default [
{
ignores: ['docs', 'node_modules', 'dist', 'coverage'],
},
{
plugins: {
'@typescript-eslint': typescriptPlugin,
'@stylistic/ts': stylisticTs,
'jest': pluginJest,
'tsdoc': tsDocPlugin,
},
},
{
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
},
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'capitalized-comments': ['warn', 'always'],
'dot-notation': 'warn',
'prefer-destructuring': ['error', { object: true, array: false }],
'quotes': ['error', 'single'],
'@stylistic/ts/indent': ['error', 2],
'@stylistic/ts/semi': ['error', 'always'],
'object-curly-spacing': ['error', 'always'],
'sort-imports': 'warn',
'callback-return': 'warn',
'global-require': 'warn',
'handle-callback-err': 'warn',
'no-buffer-constructor': 'error',
'no-mixed-requires': ['warn', { grouping: true, allowCall: true }],
'no-new-require': 'error',
'no-path-concat': 'error',
'no-process-exit': 'warn',
'@typescript-eslint/no-unused-vars': ['error'],
"tsdoc/syntax": "warn",
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
},
},
];