Skip to content

Commit

Permalink
🌈 fix: eslint rules typescript error
Browse files Browse the repository at this point in the history
  • Loading branch information
pdsuwwz committed Aug 14, 2024
1 parent 9bc4006 commit d125754
Show file tree
Hide file tree
Showing 7 changed files with 1,760 additions and 1,393 deletions.
33 changes: 15 additions & 18 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export default defineFlatConfig([
'@stylistic/no-extra-semi': 'error',
'@stylistic/template-curly-spacing': ['error', 'always'],
'@stylistic/space-before-blocks': ['error', 'always'],
'@stylistic/indent': ['error', 2],
'@stylistic/indent': ['error', 2, {
SwitchCase: 1
}],
'@stylistic/object-curly-newline': ['error', {
'ObjectExpression': {
// 如果对象有属性,则要求换行。空对象则忽略
Expand All @@ -66,7 +68,17 @@ export default defineFlatConfig([
}
}
}],
'@stylistic/no-trailing-spaces': ['error']
'@stylistic/no-trailing-spaces': ['error'],
'@stylistic/member-delimiter-style': ['error', {
multiline: {
delimiter: 'none',
requireLast: false
},
singleline: {
delimiter: 'semi',
requireLast: true
}
}]
}
},
{
Expand Down Expand Up @@ -355,27 +367,12 @@ export default defineFlatConfig([
}
),
...pluginTypeScript.configs.recommended.rules,
'@typescript-eslint/indent': ['error', 2, {
SwitchCase: 1
}],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 1,
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'none',
requireLast: false
},
singleline: {
delimiter: 'semi',
requireLast: true
}
}
],
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-empty-object-type': 0,
'@typescript-eslint/consistent-type-imports': ['error', {
fixStyle: 'separate-type-imports',
disallowTypeAnnotations: false
Expand Down
60 changes: 30 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,65 +59,65 @@
"@vicons/material": "^0.12.0",
"@vicons/tabler": "^0.12.0",
"@vicons/utils": "^0.1.4",
"@vueuse/core": "^10.11.0",
"axios": "1.7.2",
"@vueuse/core": "^10.11.1",
"axios": "1.7.4",
"echarts": "^5.5.1",
"js-cookie": "^3.0.5",
"lodash-es": "^4.17.21",
"naive-ui": "^2.39.0",
"nprogress": "^0.2.0",
"pinia": "^2.1.7",
"pinia": "^2.2.1",
"uuid": "^10.0.0",
"vue": "^3.4.33",
"vue-router": "^4.4.0"
"vue": "^3.4.37",
"vue-router": "^4.4.3"
},
"devDependencies": {
"@babel/core": "^7.24.9",
"@babel/preset-env": "^7.24.8",
"@iconify/json": "^2.2.230",
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@iconify/json": "^2.2.237",
"@iconify/vue": "^4.1.2",
"@stylistic/eslint-plugin": "^2.3.0",
"@stylistic/stylelint-plugin": "^2.1.2",
"@stylistic/eslint-plugin": "^2.6.2",
"@stylistic/stylelint-plugin": "^3.0.0",
"@types/js-cookie": "^3.0.6",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.14.11",
"@types/node": "^22.2.0",
"@types/nprogress": "^0.2.3",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@vitejs/plugin-vue": "^5.0.5",
"@typescript-eslint/eslint-plugin": "^8.1.0",
"@typescript-eslint/parser": "^8.1.0",
"@vitejs/plugin-vue": "^5.1.2",
"@vitejs/plugin-vue-jsx": "^4.0.0",
"@vitest/coverage-v8": "^2.0.3",
"@vue/compiler-sfc": "^3.4.33",
"@vitest/coverage-v8": "^2.0.5",
"@vue/compiler-sfc": "^3.4.37",
"@vue/test-utils": "2.4.6",
"babel-plugin-transform-vite-meta-env": "^1.0.3",
"cross-env": "^7.0.3",
"eslint": "^9.7.0",
"eslint": "^9.9.0",
"eslint-define-config": "^2.1.0",
"eslint-plugin-html": "8.1.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-vue": "^9.27.0",
"globals": "^15.8.0",
"husky": "^9.1.1",
"globals": "^15.9.0",
"husky": "^9.1.4",
"identity-obj-proxy": "^3.0.0",
"jsdom": "^24.1.1",
"lint-staged": "^15.2.7",
"postcss": "^8.4.39",
"lint-staged": "^15.2.9",
"postcss": "^8.4.41",
"postcss-html": "^1.7.0",
"postcss-scss": "^4.0.9",
"rollup": "^4.19.0",
"rollup": "^4.20.0",
"sass": "^1.77.8",
"stylelint": "^16.7.0",
"stylelint": "^16.8.1",
"stylelint-config-recommended-scss": "14.1.0",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^36.0.1",
"stylelint-config-standard-scss": "13.1.0",
"sucrase": "^3.35.0",
"typescript": "^5.5.3",
"unocss": "0.61.5",
"unplugin-auto-import": "^0.18.0",
"unplugin-icons": "^0.19.0",
"unplugin-vue-components": "^0.27.3",
"vite": "^5.3.4",
"vitest": "^2.0.3"
"typescript": "^5.5.4",
"unocss": "0.62.1",
"unplugin-auto-import": "^0.18.2",
"unplugin-icons": "^0.19.2",
"unplugin-vue-components": "^0.27.4",
"vite": "^5.4.0",
"vitest": "^2.0.5"
}
}
Loading

0 comments on commit d125754

Please sign in to comment.