Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐹 fix: error of eslint & stylistic #15

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .eslintrc-auto-import.json
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@
"onWatcherCleanup": true,
"useId": true,
"useModel": true,
"useTemplateRef": true
"useTemplateRef": true,
"DirectiveBinding": true,
"MaybeRef": true,
"MaybeRefOrGetter": true
}
}
5 changes: 3 additions & 2 deletions auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,13 @@ declare global {
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef, App, ComponentInternalInstance, GlobalComponents, SetupContext } from 'vue'
export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef, App, ComponentInternalInstance, GlobalComponents, SetupContext } from 'vue'
import('vue')
// @ts-ignore
export type { RouteRecordRaw, RouteLocationRaw } from 'vue-router'
import('vue-router')
}

// for vue template auto import
import { UnwrapRef } from 'vue'
declare module 'vue' {
Expand Down Expand Up @@ -616,4 +617,4 @@ declare module 'vue' {
readonly watchWithFilter: UnwrapRef<typeof import('@vueuse/core')['watchWithFilter']>
readonly whenever: UnwrapRef<typeof import('@vueuse/core')['whenever']>
}
}
}
32 changes: 14 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,26 +367,10 @@ export default defineFlatConfig([
}
),
...pluginTypeScript.configs.recommended.rules,
'@typescript-eslint/indent': ['error', 2, {
SwitchCase: 1
}],
'@typescript-eslint/ban-ts-comment': 'off',
'@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/consistent-type-imports': ['error', {
Expand Down
72 changes: 36 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,71 +27,71 @@
"url": "https://github.com/pdsuwwz/chatgpt-vue3-light-mvp/issues"
},
"dependencies": {
"@vueuse/core": "^11.1.0",
"@vueuse/core": "^11.2.0",
"axios": "1.7.7",
"dompurify": "^3.1.6",
"dompurify": "^3.2.0",
"js-cookie": "^3.0.5",
"lodash-es": "^4.17.21",
"marked": "^14.1.2",
"naive-ui": "^2.39.0",
"marked": "^15.0.1",
"naive-ui": "^2.40.1",
"nprogress": "^0.2.0",
"pinia": "^2.2.2",
"uuid": "^10.0.0",
"pinia": "^2.2.6",
"uuid": "^11.0.3",
"vfile": "^6.0.3",
"vue": "^3.5.6",
"vue": "^3.5.13",
"vue-router": "^4.4.5"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.4",
"@eslint/js": "^9.10.0",
"@iconify/json": "^2.2.250",
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@eslint/js": "^9.15.0",
"@iconify/json": "^2.2.273",
"@iconify/vue": "^4.1.2",
"@stylistic/eslint-plugin": "^2.8.0",
"@stylistic/stylelint-plugin": "^3.0.1",
"@stylistic/eslint-plugin": "^2.11.0",
"@stylistic/stylelint-plugin": "^3.1.1",
"@types/js-cookie": "^3.0.6",
"@types/lodash-es": "^4.17.12",
"@types/markdown-it": "^14.1.2",
"@types/node": "^22.5.5",
"@types/node": "^22.9.0",
"@types/nprogress": "^0.2.3",
"@typescript-eslint/eslint-plugin": "^8.6.0",
"@typescript-eslint/parser": "^8.6.0",
"@unocss/preset-icons": "^0.62.4",
"@unocss/preset-rem-to-px": "^0.62.4",
"@vitejs/plugin-vue": "^5.1.4",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"@unocss/preset-icons": "^0.64.1",
"@unocss/preset-rem-to-px": "^0.64.1",
"@vitejs/plugin-vue": "^5.2.0",
"@vitejs/plugin-vue-jsx": "^4.1.0",
"@vue/babel-plugin-jsx": "^1.2.5",
"@vue/compiler-sfc": "^3.5.6",
"@vue/compiler-sfc": "^3.5.13",
"cross-env": "^7.0.3",
"eslint": "^9.10.0",
"eslint": "^9.15.0",
"eslint-define-config": "^2.1.0",
"eslint-plugin-html": "8.1.1",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-vue": "^9.28.0",
"globals": "^15.9.0",
"eslint-plugin-html": "8.1.2",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-vue": "^9.31.0",
"globals": "^15.12.0",
"highlight.js": "^11.10.0",
"identity-obj-proxy": "^3.0.0",
"katex": "^0.16.11",
"markdown-it": "^14.1.0",
"markdown-it-highlightjs": "^4.2.0",
"postcss": "^8.4.47",
"postcss": "^8.4.49",
"postcss-html": "^1.7.0",
"postcss-scss": "^4.0.9",
"prismjs": "^1.29.0",
"rollup": "^4.21.3",
"sass": "1.78.0",
"stylelint": "^16.9.0",
"rollup": "^4.27.3",
"sass": "1.81.0",
"stylelint": "^16.10.0",
"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",
"typescript": "^5.6.2",
"ua-parser-js": "^1.0.39",
"unocss": "^0.62.4",
"unplugin-auto-import": "^0.18.3",
"unplugin-icons": "^0.19.3",
"typescript": "^5.6.3",
"ua-parser-js": "^2.0.0",
"unocss": "^0.64.1",
"unplugin-auto-import": "^0.18.5",
"unplugin-icons": "^0.20.1",
"unplugin-vue-components": "^0.27.4",
"vite": "^5.4.6",
"vite": "^5.4.11",
"vite-raw-plugin": "^1.0.2",
"vue-eslint-parser": "^9.4.3"
}
Expand Down
Loading
Loading