-
Notifications
You must be signed in to change notification settings - Fork 27
/
.eslintrc.js
95 lines (95 loc) · 2.19 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"turbo",
"plugin:prettier/recommended",
],
plugins: ["@typescript-eslint", "unused-imports"],
overrides: [
{
files: ["*.ts", "*.tsx"],
parser: "@typescript-eslint/parser",
extends: [
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
},
{
files: [
"packages/trpc/**/*",
"packages/payments/**/*",
"packages/prisma/**/*",
"scripts/**/*",
],
rules: {
"no-restricted-syntax": "off",
},
},
{
files: ["packages/**/*"],
rules: {
"@next/next/no-html-link-for-pages": "off",
},
},
],
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./apps/*/tsconfig.json", "./packages/*/tsconfig.json"],
},
settings: {
next: {
rootDir: ["apps/*/", "packages/*/"],
},
},
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
disallowTypeAnnotations: false,
},
],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: {
attributes: false,
},
},
],
"no-restricted-syntax": [
"error",
{
selector:
"ImportDeclaration[importKind!='type'][source.value=/@quenti\\u002Fprisma\\u002Fclient/]",
message:
"Must use 'import type' when importing from @quenti/prisma/client. Database schemas are exposed to the client!",
},
],
"no-restricted-imports": [
"warn",
{
paths: [
{
name: "@chakra-ui/react",
importNames: ["Link"],
message: "Use { Link } from @quenti/components instead.",
},
],
},
],
"no-unused-vars": [
"error",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
},
],
"unused-imports/no-unused-imports": "error",
},
};