-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
52 lines (51 loc) · 1.55 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 path = require("path");
module.exports = {
env: {
browser: true,
es6: true,
"jest/globals": true,
},
extends: [
"airbnb",
"plugin:prettier/recommended", // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
plugins: ["react-hooks", "json", "markdown", "jest"],
rules: {
"import/no-extraneous-dependencies": [
"error",
{ devDependencies: [".storybook/**", "stories/**"] },
],
"react/jsx-filename-extension": [1, { extensions: [".js"] }],
"react/jsx-props-no-spreading": "off", // We use HOC, etc. & this will wreck havoc
"react/jsx-curly-newline": "off", // Clashes with prettier => prettier wins
"react/jsx-wrap-multilines": [
1,
{
declaration: "parens",
assignment: "parens",
return: "parens",
arrow: "parens",
condition: "ignore",
logical: "ignore",
prop: "ignore",
},
],
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
"no-unused-vars": "error",
},
settings: {
"import/resolver": {
"babel-module": {
alias: {
"@hurumap-ui/content": "./packages/content/src",
"@hurumap-ui/charts": "./packages/charts/src",
"@hurumap-ui/core": "./packages/core/src",
},
},
"eslint-import-resolver-lerna": {
packages: path.resolve(__dirname, "packages"),
},
},
},
};