chore: 简化eslint配置
This commit is contained in:
parent
c2249d531f
commit
45c2e3aebe
@ -1,3 +1,4 @@
|
|||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
public
|
public
|
||||||
|
package.json
|
13
.eslintrc.js
13
.eslintrc.js
@ -1,19 +1,8 @@
|
|||||||
// * https://zhuanlan.zhihu.com/p/388703150
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
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'],
|
extends: ['plugin:vue/vue3-recommended', 'plugin:prettier/recommended'],
|
||||||
plugins: ['prettier'],
|
|
||||||
rules: {
|
rules: {
|
||||||
'prettier/prettier': 'error',
|
'prettier/prettier': 'warn',
|
||||||
'vue/valid-template-root': 'off',
|
'vue/valid-template-root': 'off',
|
||||||
'vue/no-multiple-template-root': 'off',
|
'vue/no-multiple-template-root': 'off',
|
||||||
'vue/multi-word-component-names': [
|
'vue/multi-word-component-names': [
|
||||||
|
22
.vscode/settings.json
vendored
22
.vscode/settings.json
vendored
@ -3,28 +3,8 @@
|
|||||||
"path-intellisense.mappings": {
|
"path-intellisense.mappings": {
|
||||||
"@/": "${workspaceRoot}/src"
|
"@/": "${workspaceRoot}/src"
|
||||||
},
|
},
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
"eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
|
||||||
"[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"],
|
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll.eslint": true
|
"source.fixAll.eslint": true
|
||||||
},
|
},
|
||||||
"editor.formatOnSave": true
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user