forked from cobudget/cobudget
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
42 lines (42 loc) · 1.16 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
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
parser: "@typescript-eslint/parser",
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
// https://github.com/cobudget/cobudget/issues/602
//"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"prettier",
"plugin:cypress/recommended",
],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly",
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
sourceType: "module",
tsconfigRootDir: __dirname,
project: ["./ui/tsconfig.json"],
},
plugins: ["react", "@typescript-eslint"],
rules: {
// not having to import 'React' in every file to use jsx (next does that)
"react/react-in-jsx-scope": "off",
// don't require components to define prop types
"react/prop-types": "off",
// don't require components to have a display name
"react/display-name": "off",
// https://dev.to/wkrueger/never-ignore-the-exhaustive-deps-rule-2ap8
"react-hooks/exhaustive-deps": "error",
},
};