-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy patheslint.testconfig.js
More file actions
84 lines (83 loc) · 2.06 KB
/
eslint.testconfig.js
File metadata and controls
84 lines (83 loc) · 2.06 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
import { defineConfig } from "eslint/config";
import depend from "eslint-plugin-depend";
import globals from "globals";
import { flatConfigs as importX } from "eslint-plugin-import-x";
import js from "@eslint/js";
import packageJson from "eslint-plugin-package-json";
export default defineConfig([
{
ignores: ["**/*.min.js"]
},
{
files: ["**/*.js"],
languageOptions: {
ecmaVersion: "latest",
globals: {
...globals.browser,
...globals.node,
config: "readonly",
Log: "readonly",
MM: "readonly",
Module: "readonly",
moment: "readonly",
Temporal: "readonly"
}
},
linterOptions: {
reportUnusedDisableDirectives: "off"
},
plugins: { js },
extends: [importX.recommended, "js/recommended"],
rules: {
"import-x/no-unresolved": "off",
"no-prototype-builtins": "off",
"no-redeclare": "off",
"no-undef": "off"
}
},
{
files: ["**/*.mjs"],
languageOptions: {
ecmaVersion: "latest",
globals: {
...globals.browser,
...globals.node,
Temporal: "readonly"
},
sourceType: "module"
},
linterOptions: {
reportUnusedDisableDirectives: "off"
},
plugins: { js },
extends: [importX.recommended, "js/recommended"],
rules: {
"import-x/no-unresolved": "off"
}
},
{
files: ["**/package.json"],
plugins: { depend, packageJson },
extends: ["packageJson/recommended"],
rules: {
"depend/ban-dependencies": ["error", { allowed: ["lint-staged", "moment"] }],
"package-json/order-properties": "off",
"package-json/require-exports": "off",
"package-json/require-files": "off",
"package-json/require-sideEffects": "off",
"package-json/sort-collections": [
"error",
[
"config",
"dependencies",
"devDependencies",
"exports",
"optionalDependencies",
"overrides",
"peerDependencies",
"peerDependenciesMeta"
]
]
}
}
]);