-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
49 lines (48 loc) · 1.43 KB
/
.eslintrc.cjs
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
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['standard', 'prettier', 'eslint:recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'simple-import-sort'],
ignorePatterns: [],
globals: {
JSX: true,
},
rules: {
'comma-dangle': ['error', 'always-multiline'],
'space-before-function-paren': [
'error',
{
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
},
],
'no-useless-constructor': 'off',
'no-unused-vars': 'off',
'no-extra-semi': 'off',
'@typescript-eslint/no-useless-constructor': ['error'],
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'simple-import-sort/imports': 'error',
// To support TS overloads
// https://github.com/typescript-eslint/typescript-eslint/blob/6fd476c32c4757cb9f4c442f0cd92875671eed30/packages/eslint-plugin/docs/rules/no-redeclare.md
'no-redeclare': 'off',
'@typescript-eslint/no-redeclare': ['error'],
complexity: ['error', { max: 20 }],
},
overrides: [
{
files: ['src/*.test.ts'],
env: {},
},
],
}