-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
67 lines (57 loc) · 1.4 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
const path = require("path");
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["react", "react-hooks"],
ignorePatterns: [
".eslintrc.js",
"codegen.ts",
"tsup.config.ts",
"vite.config.mjs",
],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
parserOptions: {
sourceType: "module",
project: path.resolve(__dirname + "/tsconfig.json"),
},
env: {
browser: true,
es2022: true,
},
overrides: [
{
files: ["**/__{mocks,tests}__/**/*.{ts,tsx}"],
rules: {
"no-empty": ["error", { allowEmptyCatch: true }],
},
},
{
files: ["*.d.ts"],
rules: {
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/no-unused-vars": "off",
},
},
{
files: ["clients/**/src/graphql/**/*.{ts,tsx}"],
rules: {
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-explicit-any": "off",
},
},
],
rules: {
"no-implicit-coercion": "error",
"no-param-reassign": "error",
"no-var": "error",
"object-shorthand": "warn",
"prefer-const": "error",
"no-extra-boolean-cast": "off",
"react/jsx-boolean-value": ["error", "always"],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
},
};