-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
100 lines (100 loc) · 2.38 KB
/
.eslintrc.cjs
File metadata and controls
100 lines (100 loc) · 2.38 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
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
96
97
98
99
100
/** @type {import("@types/eslint").Linter.BaseConfig} */
module.exports = {
extends: [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:tailwindcss/recommended",
"prettier",
],
parserOptions: {
warnOnUnsupportedTypeScriptVersion: false,
},
plugins: ["@typescript-eslint", "simple-import-sort", "tailwindcss"],
rules: {
"no-restricted-imports": [
"error",
{
patterns: ["@/providers/*/*", "@/hooks/*", "@/redux/*/*", "@/types/*"],
},
],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
ignoreRestSiblings: true,
varsIgnorePattern: "^_",
argsIgnorePattern: "^_",
},
],
"@typescript-eslint/ban-types": [
"error",
{
types: {
Array: "Use T[] instead",
},
extendDefaults: true,
},
],
"import/no-extraneous-dependencies": [
"error",
{ devDependencies: ["**/*.config.{cjs,mjs,js,ts}", "**/*.test.ts"] },
],
// Doesn't really work with VSCode...
"import/no-unresolved": "off",
"import/no-named-as-default-member": "off",
"simple-import-sort/imports": "warn",
"simple-import-sort/exports": "warn",
"tailwindcss/no-custom-classname": "off",
"tailwindcss/classnames-order": "off",
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx", ".mjs", ".cjs", ".js"],
},
"import/resolver": {
typescript: {
alwaysTryTypes: true,
project: ["packages/*/tsconfig.json", "apps/*/tsconfig.json"],
},
},
next: {
rootDir: "apps/*",
},
},
ignorePatterns: [
// dependencies
"node_modules",
"!.ncurc.js",
".pnp",
".pnp.js",
"pnpm-lock.yaml",
// misc
".DS_Store",
"*.pem",
// debug
"npm-debug.log*",
"yarn-debug.log*",
"yarn-error.log*",
".pnpm-debug.log*",
// env
".env*",
// production
".vercel",
".next/",
"out/",
"build",
// coverage
"coverage",
// typescript
"*.tsbuildinfo",
"next-env.d.ts",
// others
"*.css",
"*.json",
],
};