-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
60 lines (59 loc) · 1.46 KB
/
eslint.config.js
File metadata and controls
60 lines (59 loc) · 1.46 KB
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
const js = require("@eslint/js");
const globals = require("globals");
const reactRefresh = require("eslint-plugin-react-refresh");
const tseslint = require("typescript-eslint");
const eslintPluginPrettierRecommended = require("eslint-plugin-prettier/recommended");
module.exports = tseslint.config(
{
ignores: ["**/prisma/client/**"],
},
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-empty-object-type": "off",
},
},
{
files: ["**/*.{tsx}"],
plugins: {
"react-refresh": reactRefresh,
},
rules: {
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
},
eslintPluginPrettierRecommended,
{
files: [`packages/backend/**/*.ts`],
languageOptions: {
parserOptions: {
tsconfigRootDir: "packages/backend",
},
},
},
{
files: [`packages/frontend/**/*.{ts,tsx}`],
languageOptions: {
parserOptions: {
tsconfigRootDir: "packages/frontend",
},
},
},
{
files: [`packages/backend/**/*.{ts,tsx}`],
rules: {
"@typescript-eslint/no-unused-vars": "off",
},
},
);