-
-
Notifications
You must be signed in to change notification settings - Fork 395
Expand file tree
/
Copy patheslint.config.mjs
More file actions
59 lines (58 loc) · 1.51 KB
/
eslint.config.mjs
File metadata and controls
59 lines (58 loc) · 1.51 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
import { defineConfig } from "eslint/config";
import config from "eslint-config-webpack";
export default defineConfig([
{
ignores: [".changeset/", "types/"]
},
{
extends: [config],
rules: {
"no-new-func": "off"
}
},
{
files: ["test/**/*"],
languageOptions: {
parserOptions: {
ecmaVersion: 2018
}
}
},
{
// README code samples use `Function` and `Array<...>` to mirror the
// public `tapable.d.ts` types. Disable the strict TypeScript rules
// for README — they only activate when `typescript` is a direct
// devDependency (added for type generation in `lib/`).
files: ["**/*.md/*"],
rules: {
"@typescript-eslint/no-unsafe-function-type": "off",
"@typescript-eslint/array-type": "off"
}
},
{
files: ["benchmark/**/*"],
languageOptions: {
parserOptions: {
ecmaVersion: 2022
}
},
rules: {
"no-console": "off",
"import/namespace": "off",
"n/hashbang": "off",
"n/no-unsupported-features/es-syntax": "off",
"n/no-unsupported-features/node-builtins": "off",
"n/no-process-exit": "off",
// Benchmark files predate strict JSDoc rules and use loose JSDoc.
// The strict rules only activate when `typescript` is a direct
// devDependency (added for type generation in `lib/`).
"jsdoc/require-jsdoc": "off",
"jsdoc/require-param-description": "off",
"jsdoc/require-returns-description": "off",
"jsdoc/no-restricted-syntax": "off",
"jsdoc/reject-function-type": "off",
"jsdoc/type-formatting": "off",
"jsdoc/tag-lines": "off"
}
}
]);