chore: 简化eslint配置
This commit is contained in:
parent
c2249d531f
commit
45c2e3aebe
@ -1,3 +1,4 @@
|
||||
node_modules
|
||||
dist
|
||||
public
|
||||
public
|
||||
package.json
|
13
.eslintrc.js
13
.eslintrc.js
@ -1,19 +1,8 @@
|
||||
// * https://zhuanlan.zhihu.com/p/388703150
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
browser: true, // browser global variables
|
||||
node: true,
|
||||
es2021: true, // adds all ECMAScript 2021 globals and automatically sets the ecmaVersion parser option to 12.
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
},
|
||||
parser: 'vue-eslint-parser',
|
||||
extends: ['plugin:vue/vue3-recommended', 'plugin:prettier/recommended'],
|
||||
plugins: ['prettier'],
|
||||
rules: {
|
||||
'prettier/prettier': 'error',
|
||||
'prettier/prettier': 'warn',
|
||||
'vue/valid-template-root': 'off',
|
||||
'vue/no-multiple-template-root': 'off',
|
||||
'vue/multi-word-component-names': [
|
||||
|
22
.vscode/settings.json
vendored
22
.vscode/settings.json
vendored
@ -3,28 +3,8 @@
|
||||
"path-intellisense.mappings": {
|
||||
"@/": "${workspaceRoot}/src"
|
||||
},
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[html]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[css]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[markdown]": {
|
||||
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
|
||||
},
|
||||
"eslint.validate": ["javascript", "javascriptreact", "typescript"],
|
||||
"eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true
|
||||
},
|
||||
"editor.formatOnSave": true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user