-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
69 lines (69 loc) · 2.15 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
module.exports = {
parser: "@typescript-eslint/parser",
root: true,
extends: [
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"airbnb-typescript",
"prettier",
],
plugins: ["prettier", "import", "autofix"],
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
ecmaVersion: 2018,
sourceType: "module",
},
rules: {
// important
"prettier/prettier": [1],
"no-restricted-globals": [0],
"no-return-await": [0],
"no-unused-expressions": [0],
"consistent-return": [0],
"max-classes-per-file": [0],
"no-nested-ternary": [1],
"no-useless-escape": [1],
"no-underscore-dangle": [0],
"no-plusplus": [0],
"no-return-assign": [2],
"default-case": [0],
"class-methods-use-this": [0],
"import/order": [
"error",
{
alphabetize: {
order: "asc",
},
},
],
"import/prefer-default-export": [0],
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: [".storybook/**", "stories/**"],
optionalDependencies: false,
peerDependencies: false,
},
],
"import/no-cycle": [0],
"react/prop-types": [0],
"react/no-unused-prop-types": [0],
"react/static-property-placement": [0],
"react/jsx-props-no-spreading": [0],
"react/no-array-index-key": [0],
"react/no-did-update-set-state": [1],
"react/require-default-props": [0],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/interface-name-prefix": [0],
"@typescript-eslint/no-throw-literal": [0],
"@typescript-eslint/no-useless-constructor": [1],
"@typescript-eslint/no-use-before-define": [1],
"@typescript-eslint/explicit-module-boundary-types": [0],
"@typescript-eslint/no-unused-expressions": [1, { allowShortCircuit: true, allowTernary: true }],
"@typescript-eslint/explicit-function-return-type": [0],
"@typescript-eslint/member-ordering": [1],
"no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"],
},
};