This repository has been archived by the owner on Jan 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
83 lines (83 loc) · 2.36 KB
/
.eslintrc.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
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:import/recommended",
"plugin:prettier/recommended",
"prettier",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: "module",
},
plugins: ["react", "@typescript-eslint", "prettier"],
rules: {
camelcase: 0,
"prettier/prettier": "error",
"object-curly-spacing": "off",
"no-unused-vars": "off",
"import/extensions": 0,
"import/prefer-default-export": 0,
"no-plusplus": 0,
"no-param-reassign": 0,
"no-shadow": "off",
"import/no-cycle": [1, { maxDepth: 1 }],
"no-nested-ternary": 0,
"no-use-before-define": "off",
"max-classes-per-file": ["error", 2],
"no-underscore-dangle": ["error", { allowAfterSuper: true, allowAfterThis: true }],
"dot-notation": 0,
"no-restricted-syntax": 1,
"no-unused-expressions": [1, { allowShortCircuit: false, allowTernary: false }],
"no-void": [1, { allowAsStatement: true }],
"no-console": ["error", { allow: ["warn", "error", "info"] }],
"react/react-in-jsx-scope": 0,
"react/prop-types": 0,
"react/jsx-filename-extension": [1, { extensions: [".ts", ".tsx"] }],
"react/jsx-props-no-spreading": 0,
"react/require-default-props": 0,
"react/function-component-definition": 0,
"react/jsx-no-constructed-context-values": 0,
"react/no-array-index-key": 0,
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-non-null-asserted-optional-chain": 0,
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-use-before-define": ["error", { variables: false }],
"import/order": [
"error",
{
pathGroups: [
{
pattern: "@/**",
group: "parent",
position: "before",
},
],
},
],
},
settings: {
react: {
version: "detect",
},
"import/resolver": {
alias: {
map: [["~", "./src"]],
extensions: [".ts", ".tsx", ".js", ".jsx", ".json"],
},
},
},
};