-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy patheslint.config.js
More file actions
85 lines (83 loc) · 2.48 KB
/
eslint.config.js
File metadata and controls
85 lines (83 loc) · 2.48 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
85
/* istanbul ignore file */
import { fileURLToPath } from "node:url";
import { defineConfig } from "eslint/config";
import { includeIgnoreFile } from "@eslint/compat";
import baseConfig from "./src/index.js";
import testConfig from "./src/test-config.js";
import browserTestConfig from "./src/browser-test-config.js";
import tsConfig from "./src/ts-config.js";
import tsTestConfig from "./src/ts-test-config.js";
import ignorePrettierRulesConfig from "./src/ignore-prettier-rules-config.js";
const gitignorePath = fileURLToPath(new URL(".gitignore", import.meta.url));
export default defineConfig([
includeIgnoreFile(gitignorePath),
{
extends: [
baseConfig({
ignores: ["**/__fixtures__/**"], // dummy files for testing
}),
testConfig({
ignores: ["**/__fixtures__/**"], // dummy files for testing
rules: {
"jest/no-large-snapshots": ["off"], // for snapshot of eslint config
"inclusive-language/use-inclusive-words": ["off"], // for snapshot of eslint config
},
})
],
},
// needed for this repo but not One App module repos
{
files: ["**/*.js"],
ignores: ["**/__fixtures__/**"], // dummy files for testing
rules: {
"import/extensions": [
"error",
"ignorePackages",
{
js: "always",
},
],
},
},
{
extends: [ignorePrettierRulesConfig({
ignores: ["**/__fixtures__/**"], // dummy files for testing
})],
},
// apply to dummy file so we can take snapshot of calculated config
{
extends: [baseConfig({
files: ['__fixtures__/index.input.js'],
})],
},
// apply to dummy file so we can take snapshot of calculated config
{
extends: [testConfig({
files: ['__fixtures__/test-config.input.js'],
})],
},
// apply to dummy file so we can take snapshot of calculated config
{
extends: [tsConfig({
files: ["__fixtures__/ts-config.input.ts"],
})],
},
// apply to dummy file so we can take snapshot of calculated config
{
extends: [tsTestConfig({
files: ["__fixtures__/ts-test-config.input.ts"],
})],
},
// apply to dummy file so we can take snapshot of calculated config
{
extends: [browserTestConfig({
files: ["__fixtures__/browser-test-config.input.js"],
})],
},
// apply to dummy file so we can take snapshot of calculated config
{
extends: [ignorePrettierRulesConfig({
files: ["__fixtures__/ignore-prettier-rules-config.input.js"],
})],
},
]);