chore: 简化eslint配置

This commit is contained in:
张传龙 2022-05-06 22:34:55 +08:00
parent c2249d531f
commit 45c2e3aebe
3 changed files with 4 additions and 34 deletions

View File

@ -1,3 +1,4 @@
node_modules
dist
public
public
package.json

View File

@ -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
View File

@ -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
}