-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.js
52 lines (49 loc) · 1.35 KB
/
eslint.config.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
// @ts-check
import payloadEsLintConfig from "@payloadcms/eslint-config";
export const defaultESLintIgnores = [
"**/.temp",
"**/.*", // ignore all dotfiles
"**/.git",
"**/next-env.d.ts",
"**/jest.config.js",
"**/eslint.config.js",
"**/payload-types.ts",
"dev/src/app/(payload)/",
"**/dist/",
"**/build/",
"**/node_modules/",
"**/temp/",
];
export default [
...payloadEsLintConfig,
{
// Modify any rules from payload's config that you want to override/disable
rules: {
"no-restricted-exports": "off",
"perfectionist/sort-union-types": "off",
"perfectionist/sort-objects": "off",
"perfectionist/sort-interfaces": "off",
"perfectionist/sort-object-types": "off",
"perfectionist/sort-imports": "off",
"perfectionist/sort-jsx-props": "off",
},
},
// TODO: Bring in '@payloadcms/eslint-plugin' for 'payload/proper-payload-logger-usage' rule
{
ignores: defaultESLintIgnores,
},
{
languageOptions: {
parserOptions: {
sourceType: "module",
ecmaVersion: "latest",
projectService: {
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING: 40,
allowDefaultProject: ["scripts/*.ts", "*.js", "*.mjs", "*.spec.ts", "*.d.ts"],
},
// projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
];