-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
46 lines (44 loc) · 1.25 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
module.exports = {
extends: ["airbnb", "plugin:cypress/recommended", "prettier"],
plugins: ["react", "react-hooks", "jsx-a11y", "import"],
env: {
browser: true,
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
// Allow use of console.log()
"no-console": 0,
// Rules for React Hooks
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "error", // Checks effect dependencies
// A specific rule for Cypress tests that disallows committing code with cy.pause()
"cypress/no-pause": "error",
},
overrides: [
{
files: ["**/*.ts", "**/*.tsx"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.json",
},
extends: ["airbnb", "airbnb-typescript", "prettier"],
plugins: ["react", "react-hooks", "jsx-a11y", "import"],
rules: {
"no-console": 0,
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
},
},
],
};