-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy patheslint.config.js
More file actions
48 lines (39 loc) · 963 Bytes
/
eslint.config.js
File metadata and controls
48 lines (39 loc) · 963 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
47
48
const { defineConfig } = require("eslint/config");
const globals = require("globals");
const vitest = require("@vitest/eslint-plugin");
const js = require("@eslint/js");
const { FlatCompat } = require("@eslint/eslintrc");
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
module.exports = defineConfig([{
files: ["src/**/*.js"],
languageOptions: {
globals: {
...globals.node,
},
ecmaVersion: 2018,
sourceType: "module",
parserOptions: {},
},
// extends: compat.extends("eslint:recommended", "plugin:prettier/recommended"),
extends: compat.extends("eslint:recommended"),
plugins: {
vitest,
},
rules: {
"no-unused-vars": [2, {
args: "all",
argsIgnorePattern: "^_",
}],
...vitest.configs.recommended.rules,
},
ignores: [
"flow-typed/",
"lib/",
"node_modules/",
"dist/",
],
}]);