-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.cjs
112 lines (110 loc) · 3.61 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
module.exports = {
plugins: [
'@typescript-eslint',
'@stylistic'
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking'
],
env: {
es6: true,
browser: true
},
ignorePatterns: [
'**/dist/**/*.js',
'**/dist/**/*.ts'
],
overrides: [
{
files: ['**/*.cjs', 'rollup.config.js'],
env: {
node: true
},
parserOptions: {
sourceType: 'module',
project: null
}
}
],
rules: {
'@typescript-eslint/no-unused-vars': ['error', {'args': 'after-used', 'varsIgnorePattern': '__.*$'}],
'@typescript-eslint/ban-types': ['error', {
extendDefaults: true,
types: {
'{}': false
}
}],
'@typescript-eslint/no-explicit-any': ['error', {'ignoreRestArgs': true}],
'no-constant-condition': ['error', {'checkLoops': false}],
'@stylistic/array-bracket-spacing': ['error', 'never'],
'@stylistic/comma-dangle': ['error', 'always-multiline'],
'@stylistic/comma-spacing': ['error'],
'@stylistic/comma-style': ['error'],
'@stylistic/eol-last': ['error', 'always'],
'eqeqeq': ['warn'],
'@stylistic/func-call-spacing': ['error', 'never'],
'@stylistic/indent': ['error', 4, {'SwitchCase': 1}],
'@stylistic/key-spacing': ['error', {
beforeColon: false,
afterColon: true,
mode: 'strict'
}],
'@stylistic/keyword-spacing': ['error', {
before: true,
after: true
}],
'@stylistic/max-len': [1, {
code: 120,
tabWidth: 4,
ignoreUrls: true,
ignoreTemplateLiterals: true
}],
'@stylistic/new-parens': ['error'],
'@stylistic/newline-per-chained-call': ['error'],
'no-console': ['error'],
'@stylistic/no-mixed-operators': ['error'],
'@stylistic/no-multiple-empty-lines': ['error', {
max: 2,
maxBOF: 0,
maxEOF: 0
}],
'no-throw-literal': ['error'],
'@stylistic/no-trailing-spaces': ['error', {skipBlankLines: true}],
'no-unneeded-ternary': ['error'],
'@stylistic/object-curly-spacing': ['error'],
'@stylistic/object-property-newline': ['error', {
allowMultiplePropertiesPerLine: true
}],
'@stylistic/operator-linebreak': ['error', 'after'],
'prefer-const': ['error'],
'@stylistic/quotes': ['error', 'single', {
allowTemplateLiterals: true,
avoidEscape: true
}],
'@stylistic/semi': ['error', 'always'],
'@stylistic/semi-spacing': ['error'],
'@stylistic/space-before-function-paren': ['error', 'never'],
'@stylistic/space-in-parens': ['error'],
'@stylistic/space-infix-ops': ['error'],
'@stylistic/space-unary-ops': ['error'],
'@stylistic/member-delimiter-style': ['error'],
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/no-unescaped-entities': 'off',
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: false
}
],
'require-yield': 'off'
},
parserOptions: {
'ecmaVersion': 11,
'sourceType': 'module',
'parser': '@typescript-eslint/parser',
'project': './tsconfig.json'
}
};