-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
52 lines (52 loc) · 1.76 KB
/
.eslintrc.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true
},
extends: [
'@nuxtjs',
'@nuxtjs/eslint-config-typescript',
'@unocss',
'eslint:recommended',
'plugin:vue/vue3-essential',
'prettier',
'plugin:nuxt/recommended',
'plugin:vue/vue3-recommended',
'plugin:prettier/recommended',
'plugin:promise/recommended',
'plugin:import/recommended',
'standard-with-typescript'
],
parser: 'vue-eslint-parser',
parserOptions: {
ecmaVersion: 13,
sourceType: 'module',
project: ['./tsconfig.json'],
extraFileExtensions: ['.vue']
},
plugins: ['prettier', '@typescript-eslint', 'nuxt', 'promise', 'import', 'vue'],
rules: {
'prettier/prettier': 'error',
'vue/multi-word-component-names': 'off', // 禁用对 组件名字检查
'@typescript-eslint/no-unused-vars': ['off'], // 禁用对 js 的 var 检查
'@typescript-eslint/semi': 'off', // 禁用对函数最后的 ; 检查
'@typescript-eslint/space-before-function-paren': 'off', // 禁用对 函数前面空一格检查
'no-console': 'off', // 禁用对 console 的检查
'@typescript-eslint/member-delimiter-style': 'off', // 禁用对 ; 检查
"@typescript-eslint/no-floating-promises": "off", // 禁用每个方法都需要async await
"@typescript-eslint/strict-boolean-expressions": "off", // 禁用不能直接 undefined
"@typescript-eslint/prefer-function-type": "off",
'no-lonely-if': "off", // 取消if但是没有else
'eqeqeq': 'off', // 取消用 ==,
"@unocss/blocklist": "warn", // or "error"
"array-callback-return": "off"
},
overrides: [{
files: ['./src/**/*.{js,ts,vue}', './src/*.{js,ts,vue}'],
rules: {
'vue/multi-word-component-names': 'off'
}
}]
};