-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
52 lines (51 loc) · 1.14 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
const { alias } = require("./config/shared");
module.exports = {
extends: [
"airbnb",
"plugin:prettier/recommended",
"prettier/react",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:react-hooks/recommended"
],
parser: "babel-eslint",
plugins: ["babel", "react", "emotion"],
env: {
browser: true,
jest: true
},
settings: {
"import/resolver": {
alias: {
map: Object.entries(alias),
extensions: [".js", ".jsx", ".json"]
}
},
react: {
pragma: "React",
version: "detect"
}
},
rules: {
// See: https://github.com/benmosher/eslint-plugin-import/issues/496
"import/no-extraneous-dependencies": 0,
"no-console": ["warn"],
"no-unused-vars": ["error", { ignoreRestSiblings: true }],
"no-param-reassign": 0,
"react/no-danger": 0,
"react/jsx-props-no-spreading": 0,
"react/forbid-prop-types": [
"error",
{
forbid: ["any", "array"],
checkContextTypes: true,
checkChildContextTypes: true
}
],
"react/prefer-stateless-function": 0,
"react/static-property-placement": 0,
"react/state-in-constructor": 0,
"import/prefer-default-export": 0,
"class-methods-use-this": 0
}
};