forked from dydxprotocol/v4-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
104 lines (104 loc) · 2.99 KB
/
.eslintrc.json
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
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"airbnb",
"airbnb-typescript",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"prettier"
],
"overrides": [],
"parserOptions": {
"project": "./tsconfig.json",
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "prettier"],
"parser": "@typescript-eslint/parser",
"rules": {
"class-methods-use-this": "off",
"import/extensions": "off",
// let prettier handle
"import/order": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["./scripts/*.js", "./__tests__/**/*.ts", "./src/**/__test__/**/*.ts"]
}
],
"import/no-named-as-default": "off",
"import/prefer-default-export": "off",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/no-static-element-interactions": "warn",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/alt-text": "warn",
"no-continue": "off",
"no-console": ["error"],
"no-lonely-if": "off",
"no-multi-assign": "off",
"no-nested-ternary": "off",
"no-param-reassign": ["error", { "props": false }],
"no-return-assign": "off",
"no-return-await": "off",
"no-underscore-dangle": "off",
"no-use-before-define": "off",
"prefer-destructuring": "off",
"prefer-object-spread": "off",
"prettier/prettier": "error",
"react/display-name": "off",
"react/forbid-prop-types": "off",
"react/function-component-definition": [
"error",
{ "namedComponents": "arrow-function", "unnamedComponents": "arrow-function" }
],
"react/jsx-curly-newline": "off",
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx", ".ts", ".tsx"] }],
"react/jsx-fragments": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-wrap-multilines": "off",
"react/jsx-indent": "off",
"react/no-danger": "off",
"react/no-unknown-property": ["error", { "ignore": ["tw", "css"] }],
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
"react/sort-comp": "off",
"react/jsx-pascal-case": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/comma-dangle": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
},
"multilineDetection": "brackets"
}
],
"@typescript-eslint/semi": "off"
},
"globals": {
"fetch": true,
"window": true,
"document": true,
"globalThis": true
},
"settings": {
"import/resolver": {
"typescript": {
"project": "./tsconfig.json"
}
}
}
}