-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
112 lines (106 loc) · 3.37 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 = {
root: true,
env: {browser: true, es2021: true},
extends: [
"airbnb-base",
"airbnb-typescript/base",
"plugin:prettier/recommended",
"plugin:sonarjs/recommended",
"plugin:unicorn/recommended",
"plugin:perfectionist/recommended-natural",
'eslint:recommended'
],
ignorePatterns: ["dist", "node_modules"],
parser: "@typescript-eslint/parser",
plugins: [
"import",
"react-refresh",
"perfectionist",
"prettier",
"sonarjs",
"unicorn",
],
settings: {
"import/resolver": {
"node": {
"paths": ["src"]
}
},
},
rules: {
"prettier/prettier": ["warn", {endOfLine: "auto"}],
"no-console": "off",
"no-debugger": "warn",
"import/prefer-default-export": "off",
"import/no-default-export": "off",
"import/no-extraneous-dependencies": "off",
'import/extensions': 'off',
"perfectionist/sort-classes": "off",
"unicorn/filename-case": [
"error",
{
cases: {
camelCase: true,
pascalCase: true,
kebabCase: true,
},
},
],
"unicorn/no-null": "off",
"unicorn/prefer-node-protocol": "off",
"unicorn/prefer-ternary": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-lonely-if": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-nested-ternary": "off",
"unicorn/prevent-abbreviations": [
"error",
{
replacements: {
props: false,
ref: false,
env: false,
},
},
],
"unicorn/consistent-destructuring": "off",
"unicorn/no-unused-properties": "error",
"unicorn/prefer-json-parse-buffer": "error",
"unicorn/require-post-message-target-origin": "error",
"unicorn/no-for-loop": 'off',
"@typescript-eslint/semi": "off",
"@typescript-eslint/quotes": "off",
"@typescript-eslint/comma-dangle": "off",
"@typescript-eslint/no-param-reassign": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
args: "none",
ignoreRestSiblings: true,
},
],
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-use-before-define": "off",
"sonarjs/max-switch-cases": ["error", 10],
"sonarjs/no-inverted-boolean-check": "error",
"sonarjs/elseif-without-else": "error",
"getter-return": ["warn", {allowImplicit: true}],
"class-methods-use-this": "off",
"max-lines": ["warn", 1000],
"no-restricted-exports": ["error",
{restrictDefaultExports: {defaultFrom: false}}],
"max-len": ["error", {code: 150}],
"object-curly-newline": "off",
"arrow-body-style": "off",
"operator-linebreak": "off",
"implicit-arrow-linebreak": "off",
"no-param-reassign": "off",
},
parserOptions: {
parser: "@typescript-eslint/parser",
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
ecmaVersion: "latest",
sourceType: "module",
},
}