-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
40 lines (38 loc) · 1.08 KB
/
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
import js from "@eslint/js";
import globals from "globals";
import eslintConfigPrettier from "eslint-config-prettier";
export default [
//继承eslint的推荐规则
js.configs.recommended,
eslintConfigPrettier,
{
//语言选项
languageOptions: {
//es6
ecmaVersion: 2022,
//普通的脚本
sourceType: "module",
//全局变量
globals: {
...globals.jquery,
...globals.browser,
...globals.es2015,
"Quicktab":true
}
},
plugins: {
// compat
},
//具体规则
rules: {
"no-var": 2, // 不能使用 var 定义变量
//临时关闭未使用变量报错
"no-unused-vars": 0
}
},
// eslint flat类型的配置 已经不支持.eslintignore这个配置文件,只支持从eslint.config.mjs或者cli上指定--ignore-pattern配置忽略文件
//https://github.com/eslint/eslint/issues/17831
{
ignores: []
}
];