forked from keybase/client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
108 lines (108 loc) · 3.6 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
module.exports = {
env: { es6: true },
parser: "babel-eslint",
extends: ["standard", "standard-react"],
overrides: [
{
files: ["*.tsx", "*.ts", "*.d.ts"],
parser: "babel-eslint",
rules: {
"no-undef": "off", // ts itself will catch this
"no-unused-vars": "off" // ts itself will catch this
}
}
],
parserOptions: {
ecmaVersion: 6,
sourceType: "module",
ecmaFeatures: { jsx: true },
babelOptions: {
configFile: __dirname + "/shared/babel.config.js"
}
},
globals: {
requestAnimationFrame: "function",
cancelAnimationFrame: "function",
__DEV__: false,
__STORYBOOK__: false,
__STORYSHOT__: false
},
plugins: ["filenames", "babel", "import", "flowtype", "react-hooks"],
settings: {
"import/core-modules": ["electron", "react-native"],
"import/resolver": {
webpack: "webpack.config.base.js"
}
},
rules: {
"babel/func-params-comma-dangle": "off",
"babel/no-unused-expressions": "off",
camelcase: "off",
"comma-dangle": ["error", "always-multiline"],
curly: "off",
"filenames/match-regex": [
"error",
"^[0-9a-z-.]+(\\.desktop|\\.native|\\.ios|\\.android)?$"
],
"flowtype/define-flow-type": "error",
"flowtype/delimiter-dangle": "off",
"flowtype/generic-spacing": "off",
"flowtype/no-dupe-keys": "off",
"flowtype/object-type-delimiter": "off",
"flowtype/require-valid-file-annotation": "off",
"flowtype/semi": "off",
"flowtype/space-after-type-colon": "off",
"flowtype/space-before-generic-bracket": "off",
"flowtype/union-intersection-spacing": "off",
"flowtype/use-flow-type": "off",
"flowtype/valid-syntax": "off",
"generator-star-spacing": "off",
"import/export": "error",
"import/imports-first": "error",
"import/named": "error",
"import/no-duplicates": "error",
"import/no-extraneous-dependencies": "error",
"import/no-mutable-exports": "error",
"import/no-named-as-default": "error",
"import/no-named-as-default-member": "error",
indent: "off",
"jsx-quotes": "off",
"no-duplicate-imports": "off",
"no-mixed-operators": "off",
"no-unused-expressions": "off",
"react/jsx-boolean-value": ["error", "always"],
"react/jsx-curly-spacing": "off",
"react/jsx-equals-spacing": "error",
"react/jsx-indent": "off",
"react/jsx-indent-props": "off",
"react/jsx-key": "error",
"react/jsx-no-bind": ["error", { allowArrowFunctions: true }],
"react/jsx-no-duplicate-props": "error",
"react/jsx-no-undef": "error",
"react/jsx-pascal-case": "error",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/jsx-space-before-closing": "off",
"react/no-danger": "error",
"react/no-did-mount-set-state": "error",
"react/no-did-update-set-state": "off",
"react/no-direct-mutation-state": "error",
"react/no-is-mounted": "error",
"react/no-unknown-property": "error",
"react/no-unused-prop-types": "off",
"react/prop-types": "off",
"react/react-in-jsx-scope": "error",
"react/require-render-return": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"sort-keys": ["error", "asc", { caseSensitive: true, natural: false }],
"space-before-function-paren": "off",
"standard/array-bracket-even-spacing": "off",
"standard/computed-property-even-spacing": ["error", "never"],
"standard/no-callback-literal": "off",
"object-curly-spacing": "off",
"object-curly-even-spacing": "off",
strict: ["error", "global"],
"yield-star-spacing": "off"
}
};