-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
54 lines (52 loc) · 2.06 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
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.json",
sourceType: "module",
},
plugins: ["react-hooks"],
extends: ["eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended", "plugin:import/typescript"],
rules: {
"@typescript-eslint/no-floating-promises": 2,
"@typescript-eslint/triple-slash-reference": [2, { path: "never", types: "never", lib: "never" }],
"@typescript-eslint/no-unnecessary-qualifier": 2,
"@typescript-eslint/no-unnecessary-condition": [2, { ignoreRhs: true }],
"@typescript-eslint/unified-signatures": 2,
"no-undef": 0,
"no-redeclare": 0,
"import/export": 0,
"import/named": 0,
"import/no-unresolved": 0,
"import/namespace": 0,
"@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/no-namespace": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-empty-interface": 0,
"@typescript-eslint/camelcase": 0,
"react/prop-types": 0,
"@typescript-eslint/no-unnecessary-qualifier": 0,
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
},
settings: {
react: {
createClass: "createReactClass", // Regex for Component Factory to use,
pragma: "React", // Pragma to use, default to "React"
version: "detect", // React version. "detect" automatically picks the version you have installed.
},
propWrapperFunctions: [
// The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped.
"forbidExtraProps",
{ property: "freeze", object: "Object" },
{ property: "myFavoriteWrapper" },
],
linkComponents: [
// Components used as alternatives to <a> for linking, eg. <Link to={ url } />
"Hyperlink",
{ name: "Link", linkAttribute: "to" },
],
},
};