-
Notifications
You must be signed in to change notification settings - Fork 592
/
.eslintrc
92 lines (92 loc) · 3.27 KB
/
.eslintrc
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
{
"env": {
"es6": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": ["@alifd/eslint-config-next", "plugin:@typescript-eslint/recommended", "prettier"],
"plugins": ["@typescript-eslint", "eslint-plugin-tsdoc"],
"settings": {
"react": {
"pragma": "React",
"version": "18"
}
},
"overrides": [
{
"files": ["./components/**/__tests__/**/*.ts", "./components/**/__tests__/**/*.tsx"],
"extends": ["plugin:cypress/recommended"],
"plugins": ["cypress"]
},
{
"files": ["./components/**"],
"extends": ["./a11y.eslintrc"],
"excludedFiles": ["**/__tests__/**", "**/__docs__/**"]
}
],
"rules": {
"tsdoc/syntax": "error",
"valid-jsdoc": "off",
"max-statements": "off",
"max-len": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["warn", {"ignoreRestSiblings": true}],
"import/prefer-default-export": "off",
"@typescript-eslint/no-explicit-any": ["error", { "ignoreRestArgs": true }],
"@typescript-eslint/ban-ts-comment": "error",
"import/export": "off",
"@typescript-eslint/consistent-type-exports": "warn",
"@typescript-eslint/consistent-type-imports": "warn",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "error",
"react/no-deprecated": "error",
"react/no-unsafe": "error",
"react/jsx-filename-extension": ["error", { "extensions": [".tsx", ".jsx"] }],
"react/prefer-stateless-function": "off",
"react/sort-comp": [
"warn",
{
"order": [
"static-variables",
"static-methods",
"instance-variables",
"lifecycle",
"everything-else",
"render"
],
"groups": {
"lifecycle": [
"displayName",
"propTypes",
"defaultProps",
"contextTypes",
"childContextTypes",
"mixins",
"statics",
"constructor",
"getDefaultProps",
"state",
"getInitialState",
"getChildContext",
"getDerivedStateFromProps",
"componentWillMount",
"UNSAFE_componentWillMount",
"componentDidMount",
"componentWillReceiveProps",
"UNSAFE_componentWillReceiveProps",
"shouldComponentUpdate",
"componentWillUpdate",
"UNSAFE_componentWillUpdate",
"getSnapshotBeforeUpdate",
"componentDidUpdate",
"componentDidCatch",
"componentWillUnmount"
]
}
}
]
}
}