forked from dwaring87/rtm-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
35 lines (34 loc) · 855 Bytes
/
eslint.config.js
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
const globals = require("globals");
const jestPlugin = require("eslint-plugin-jest");
const js = require("@eslint/js"); // Assuming the recommended config is imported from @eslint/js
module.exports = [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
...globals.commonjs,
...globals.es2021
}
},
rules: {
// Add your rules here
}
},
{
files: ["**/*.test.js", "**/__tests__/**/*.js"], // Apply Jest configurations to test files
languageOptions: {
globals: {
...globals.jest, // Merging Jest globals
},
},
plugins: {
jest: jestPlugin,
},
rules: {
...jestPlugin.configs.recommended.rules, // Use recommended rules from eslint-plugin-jest
}
}
];