-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheslint.config.js
More file actions
46 lines (43 loc) · 906 Bytes
/
eslint.config.js
File metadata and controls
46 lines (43 loc) · 906 Bytes
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
const js = require("@eslint/js");
const prettier = require("eslint-config-prettier");
const nodeGlobals = {
__dirname: "readonly",
Buffer: "readonly",
console: "readonly",
global: "readonly",
module: "readonly",
process: "readonly",
require: "readonly",
};
const jestGlobals = {
afterAll: "readonly",
afterEach: "readonly",
beforeAll: "readonly",
beforeEach: "readonly",
describe: "readonly",
expect: "readonly",
it: "readonly",
jest: "readonly",
test: "readonly",
};
module.exports = [
{
ignores: ["coverage/**", "dest/**", "node_modules/**"],
},
js.configs.recommended,
{
files: ["**/*.js"],
languageOptions: {
ecmaVersion: 2023,
sourceType: "commonjs",
globals: nodeGlobals,
},
},
{
files: ["test/**/*.js", "**/*.test.js", "**/*.spec.js"],
languageOptions: {
globals: jestGlobals,
},
},
prettier,
];