1
0
mirror of https://gitee.com/h_mo/uniapp-vue3-vite-ts-template synced 2025-04-06 03:58:03 +08:00

perf-eslint配置优化

This commit is contained in:
Huang 2022-10-09 17:32:23 +08:00
parent 54b5a1c8d0
commit 5d6fb89c92
3 changed files with 20 additions and 26 deletions

@ -5,10 +5,8 @@ module.exports = {
},
parser: 'vue-eslint-parser',
extends: [
'eslint:recommended',
'plugin:vue/essential',
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-essential',
'prettier',
],
parserOptions: {
@ -78,7 +76,6 @@ module.exports = {
},
],
'space-before-function-paren': 'off',
'vue/attributes-order': 'off',
'vue/v-on-event-hyphenation': 'off',
'vue/multi-word-component-names': 'off',
@ -89,23 +86,12 @@ module.exports = {
'vue/singleline-html-element-content-newline': 'off',
'vue/attribute-hyphenation': 'off',
'vue/require-default-prop': 'off',
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'never',
component: 'always',
},
svg: 'always',
math: 'always',
},
],
},
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
uni: 'readonly',
},
};

@ -1,5 +1,6 @@
module.exports = {
printWidth: 100,
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/prettier'],
printWidth: 80,
semi: true,
vueIndentScriptAndStyle: true,
singleQuote: true,
@ -7,4 +8,5 @@ module.exports = {
proseWrap: 'never',
htmlWhitespaceSensitivity: 'strict',
endOfLine: 'auto',
arrowParens: 'avoid',
};

24
pnpm-lock.yaml generated

@ -25,6 +25,7 @@ specifiers:
'@types/qs': ^6.9.7
'@typescript-eslint/eslint-plugin': ^5.39.0
'@typescript-eslint/parser': ^5.39.0
'@vue/eslint-config-prettier': ^7.0.0
autoprefixer: ^10.4.12
crypto-js: ^4.1.1
echarts: ^5.4.0
@ -85,6 +86,7 @@ devDependencies:
'@types/qs': 6.9.7
'@typescript-eslint/eslint-plugin': 5.39.0_cfd7h3iktziq6hcwahu2qxhjhy
'@typescript-eslint/parser': 5.39.0_z4bbprzjrhnsfa24uvmcbu7f5q
'@vue/eslint-config-prettier': 7.0.0_znq2sm4m5bonjw4qqm6mwhbe2q
autoprefixer: 10.4.12_postcss@8.4.17
eslint: 8.25.0
eslint-config-prettier: 8.5.0_eslint@8.25.0
@ -1416,6 +1418,18 @@ packages:
resolution: {integrity: sha512-Ku31WzpOV/8cruFaXaEZKF81WkNnvCSlBY4eOGtz5WMSdJvX1v1WWlSMGZeqUwPtQ27ZZz7B62erEMq8JDjcXw==}
dev: false
/@vue/eslint-config-prettier/7.0.0_znq2sm4m5bonjw4qqm6mwhbe2q:
resolution: {integrity: sha512-/CTc6ML3Wta1tCe1gUeO0EYnVXfo3nJXsIhZ8WJr3sov+cGASr6yuiibJTL6lmIBm7GobopToOuB3B6AWyV0Iw==}
peerDependencies:
eslint: '>= 7.28.0'
prettier: '>= 2.0.0'
dependencies:
eslint: 8.25.0
eslint-config-prettier: 8.5.0_eslint@8.25.0
eslint-plugin-prettier: 4.2.1_hvbqyfstm4urdpm6ffpwfka4e4
prettier: 2.7.1
dev: true
/@vue/reactivity-transform/3.2.40:
resolution: {integrity: sha512-HQUCVwEaacq6fGEsg2NUuGKIhUveMCjOk8jGHqLXPI2w6zFoPrlQhwWEaINTv5kkZDXKEnCijAp+4gNEHG03yw==}
dependencies:
@ -4492,14 +4506,6 @@ packages:
optionalDependencies:
fsevents: 2.3.2
/rollup/2.79.1:
resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==}
engines: {node: '>=10.0.0'}
hasBin: true
optionalDependencies:
fsevents: 2.3.2
dev: true
/run-async/2.4.1:
resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==}
engines: {node: '>=0.12.0'}
@ -5180,7 +5186,7 @@ packages:
'@rollup/pluginutils': 4.2.1
'@types/eslint': 8.4.6
eslint: 8.25.0
rollup: 2.79.1
rollup: 2.78.1
vite: 3.1.6_sass@1.55.0+terser@5.15.1
dev: true