-
-
Notifications
You must be signed in to change notification settings - Fork 510
Expand file tree
/
Copy patheslint.config.mjs
More file actions
45 lines (44 loc) · 1.05 KB
/
eslint.config.mjs
File metadata and controls
45 lines (44 loc) · 1.05 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
import { defineConfig, globalIgnores } from "eslint/config";
import config from "eslint-config-webpack";
import configs from "eslint-config-webpack/configs.js";
export default defineConfig([
globalIgnores([
// Ignore some test files
"lib/**/*",
"public/**/*",
"test/src/**/*",
"test/dev-server/**/*",
"test/bundles/**/*",
"test/stats/**/*",
"test/output/**/*",
]),
{
ignores: ["client/**/*", "src/tree/**/*", "src/sizeUtils.js"],
extends: [config],
rules: {
// We use babel so it will be applied by default
strict: "off",
},
},
{
files: ["src/bin/**/*"],
rules: {
"no-console": "off",
"n/hashbang": "off",
"n/no-process-exit": "off",
"unicorn/prefer-top-level-await": "off",
},
},
{
files: ["src/tree/**/*", "src/sizeUtils.js"],
extends: [configs["node-recommended-module"]],
},
{
files: ["client/**/*"],
extends: [configs["browser-recommended"]],
rules: {
// TODO fix me in future
"react/no-deprecated": "off",
},
},
]);