-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
58 lines (58 loc) · 1.53 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
module.exports = {
root: true,
parser: "babel-eslint",
extends: [
"standard",
"eslint:recommended",
"plugin:react/recommended",
"airbnb",
"prettier", // Turns off all rules that are unnecessary or might conflict with Prettier.
"plugin:storybook/recommended",
],
plugins: [
"react",
"babel",
"prettier", // Runs Prettier as an ESLint rule and reports differences as individual ESLint issues.
],
rules: {
"prettier/prettier": "error",
// Prettier rules must throw errors
"no-unused-expressions": "off",
"babel/no-unused-expressions": "error",
"react/jsx-filename-extension": "off",
"import/no-named-as-default-member": "off",
"react/destructuring-assignment": "off",
"react/require-default-props": "off",
"react/jsx-one-expression-per-line": "off",
"jsx-a11y/anchor-is-valid": "off",
"react/jsx-wrap-multilines": "off",
"react/no-array-index-key": "warn",
"react/forbid-prop-types": "warn",
"react/no-did-update-set-state": "warn",
"react/jsx-props-no-spreading": "off",
"consistent-return": [
"error",
{
treatUndefinedAsUnspecified: true,
},
],
"react/sort-comp": [
"error",
{
order: ["lifecycle", "everything-else", "render", "static-methods"],
},
],
},
overrides: [
{
files: "**/*.{test,story,testFramework}.js",
rules: {
"import/no-extraneous-dependencies": "off",
"react/button-has-type": "off",
},
},
],
env: {
browser: true,
},
};