-
Notifications
You must be signed in to change notification settings - Fork 4
/
eslint.config.js
136 lines (134 loc) · 3.62 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
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
// @ts-check
import js from '@eslint/js';
import ts from 'typescript-eslint';
import security from 'eslint-plugin-security';
import prettierConfig from 'eslint-config-prettier';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import globals from 'globals';
import stylistic from '@stylistic/eslint-plugin';
export default ts.config(
js.configs.recommended,
security.configs.recommended,
prettierConfig,
...ts.configs.recommended,
{
plugins: {
'@typescript-eslint': ts.plugin,
security: security,
'simple-import-sort': simpleImportSort,
'@stylistic': stylistic,
},
rules: {
'arrow-body-style': 0,
'class-methods-use-this': 0,
'consistent-return': 0,
curly: 0,
'default-case': 1,
'default-param-last': 0,
eqeqeq: 2,
'import/no-cycle': 0,
'import/no-extraneous-dependencies': 0,
'import/order': 0,
'import/prefer-default-export': 0,
'sort-imports': 0,
'max-classes-per-file': 0,
'no-await-in-loop': 0,
'no-case-declarations': 0,
'no-cond-assign': ['warn', 'except-parens'],
'no-continue': 0,
'no-control-regex': 0,
'no-console': 0,
'no-duplicate-imports': 1,
'no-nested-ternary': 0,
'no-return-assign': 0,
'no-restricted-syntax': 0,
'no-multi-assign': [
'warn',
{
ignoreNonDeclaration: true,
},
],
'no-param-reassign': 0,
'no-restricted-globals': 0,
'no-throw-literal': 0,
'no-trailing-spaces': 0,
'no-underscore-dangle': 0,
'no-unsafe-finally': 0,
'no-unsafe-optional-chaining': [
'error',
{
disallowArithmeticOperators: false,
},
],
'no-useless-catch': 0,
'no-var': 2,
'prefer-const': 1,
'prefer-destructuring': 0,
'prefer-promise-reject-errors': 1,
'prefer-rest-params': 0,
'require-await': 0,
'simple-import-sort/imports': 'warn',
'simple-import-sort/exports': 'warn',
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/naming-convention': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-this-alias': 0,
'@typescript-eslint/no-unused-expressions': 0,
'@typescript-eslint/no-unused-vars': [
'error',
{
caughtErrors: 'none',
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/no-var-requires': 0,
'security/detect-non-literal-fs-filename': 0,
'security/detect-non-literal-regexp': 0,
'security/detect-object-injection': 0,
'security/detect-possible-timing-attacks': 0,
'@stylistic/arrow-parens': 0,
'@stylistic/function-paren-newline': 0,
'@stylistic/implicit-arrow-linebreak': 0,
'@stylistic/linebreak-style': 0,
'@stylistic/max-len': 0,
'@stylistic/no-mixed-spaces-and-tabs': 0,
'@stylistic/no-tabs': [
'warn',
{
allowIndentationTabs: true,
},
],
'@stylistic/nonblock-statement-body-position': 0,
'@stylistic/object-curly-newline': 0,
'@stylistic/operator-linebreak': 0,
'@stylistic/comma-dangle': 0,
'@stylistic/indent': 0,
'@stylistic/object-curly-spacing': 0,
'@stylistic/space-before-blocks': 0,
},
languageOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
globals: {
...globals.es2020,
...globals.node,
...globals.mocha,
__: true,
},
parser: ts.parser,
parserOptions: {
ecmaVersion: 2020,
project: true,
},
},
},
{
ignores: ['.yarn/', 'app/', 'initpage', '**/build/', '**/dist/', '**/eslint.config.js', '**/eslint.config.mjs'],
}
);