-
-
Notifications
You must be signed in to change notification settings - Fork 360
/
Copy patheslint.config.mjs
42 lines (40 loc) · 930 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
35
36
37
38
39
40
41
42
// @ts-check
import eslint from "@eslint/js";
import eslintPluginJest from "eslint-plugin-jest";
import json from "eslint-plugin-json";
import globals from "globals";
export default [
{
name: "base",
ignores: ["**/node_modules/**", "**/dist/**", "**/built/**"],
},
{
name: "eslint/recommended-with-overrides",
files: ["**/*.js"],
languageOptions: {
globals: {
...globals.node,
...globals.jest,
},
},
rules: {
...eslint.configs.recommended.rules,
"no-unused-vars": "warn",
"no-undef": "warn",
},
},
{
name: "jest/recommended",
files: ["**/*.test.{js,ts}"],
ignores: ["**/*.json"],
...eslintPluginJest.configs["flat/recommended"],
},
{
name: "json/recommended-with-comments",
files: ["**/*.json"],
...json.configs["recommended"],
rules: {
"json/*": ["warn", { allowComments: false }],
},
},
];