This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.js
71 lines (70 loc) · 1.83 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
const path = require("path");
module.exports = {
settings: {
react: {
version: "detect", // Tells eslint-plugin-react to automatically detect the version of React to use
},
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx"],
},
"eslint-import-resolver-lerna": {
packages: path.resolve(__dirname, "packages"),
},
},
},
root: true,
extends: ["@vericus/vericus-base"],
env: {
es6: true,
browser: true,
},
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"prettier/prettier": "error",
"react/jsx-filename-extension": [1, { extensions: [".js", ".tsx", "jsx"] }],
"react/destructuring-assignment": 0,
"prettier/prettier": "error",
"jsx-a11y/click-events-have-key-events": 0,
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{ args: "after-used", argsIgnorePattern: "^_" },
],
"no-unused-vars": ["warn", { args: "after-used", argsIgnorePattern: "^_" }],
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: [
"**/test/**/*.js",
"**/test/**/*.ts",
"**/test/**/*.tsx",
],
peerDependencies: true,
},
],
"import/prefer-default-export": 0,
"react/prop-types": 0,
"react/button-has-type": 0,
"no-console": "warn",
},
overrides: [
{
files: ["packages/**/test/**/*.js"],
env: { jest: true },
parser: "babel-eslint",
},
{
files: ["packages/**/test/**/*.ts", "packages/**/test/**/*.tsx"],
env: { jest: true },
},
{
files: ["stories/**/*.js"],
parser: "babel-eslint",
rules: {
"import/no-extraneous-dependencies": 0,
},
},
],
};