-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy patheslint.config.mjs
34 lines (32 loc) · 867 Bytes
/
eslint.config.mjs
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
/** @type {import('eslint').FlatConfig[]} */
import pluginJs from "@eslint/js";
import pluginJest from "eslint-plugin-jest";
import globals from "globals";
export default [
{
files: ["**/*.js"],
languageOptions: {
sourceType: "commonjs", // This is necessary to parse imports/exports
globals: {
...globals.browser,
...globals.es2021,
...globals.jest, // Add Jest globals
},
},
// Add any other specific rules here
},
pluginJs.configs.recommended,
{
plugins: {
jest: pluginJest,
},
rules: {
...pluginJest.configs.recommended.rules,
"no-unused-vars": "warn", // Change no-unused-vars to a warning
},
},
{
// Exclude test, tools, and lib directories from linting
ignores: ["test/**/*", "tools/*js", "src/lib/*"], // Exclude these files from linting
}
];