-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
43 lines (39 loc) · 1.28 KB
/
Copy patheslint.config.js
File metadata and controls
43 lines (39 loc) · 1.28 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
import js from "@eslint/js";
import tseslint from "typescript-eslint";
export default [
js.configs.recommended,
...tseslint.configs.recommended,
{
ignores: [
"**/dist/**",
"**/build/**",
"**/.turbo/**",
"**/.next/**",
"**/node_modules/**",
"**/*.config.ts",
"**/*.config.js",
"**/next-env.d.ts"
],
},
{
files: ["**/*.ts"],
// We remove `project: true` here so it doesn't crash on files
// that aren't perfectly mapped in a tsconfig.json during setup.
// You can enable it later once your monorepo tsconfigs are perfectly linked!
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/no-unsafe-function-type": "warn",
"@typescript-eslint/ban-ts-comment": "warn"
},
},
{
// Tests often need to do "unsafe" things like mock 'any' objects
files: ["**/__tests__/**/*.ts"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-function-type": "off",
}
}
];