diff --git a/package.json b/package.json index 9b889f6b..5106166b 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ } }, "lint-staged": { - "*.{js,jsx,ts,tsx}": [ + "{src,mock}/**/*.{vue,ts,js,tsx,jsx}": [ "eslint --fix", "prettier --write" ], diff --git a/src/hooks/web/useI18n.ts b/src/hooks/web/useI18n.ts index 4b0a510a..cd75d7ae 100644 --- a/src/hooks/web/useI18n.ts +++ b/src/hooks/web/useI18n.ts @@ -1,7 +1,7 @@ import i18n, { availableLocales } from '@/locales/index'; import zh_Cn from 'element-plus/lib/locale/lang/zh-cn'; import en from 'element-plus/lib/locale/lang/en'; -import { computed } from '@vue/reactivity'; +import { computed } from 'vue'; export const useI18n = () => i18n.global; diff --git a/stylelint.config.js b/stylelint.config.js index 0ff4f086..29546970 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -1,28 +1,28 @@ module.exports = { - plugins: ['stylelint-scss', 'stylelint-order'], - customSyntax: 'postcss-html', - extends: ['stylelint-config-standard', 'stylelint-config-prettier'], - rules: { - indentation: 2, // 缩进2个空格 - 'at-rule-no-unknown': [ - true, - { - ignoreAtRules: ['mixin', 'extend', 'content', 'include'], - }, - ], - 'no-descending-specificity': null, // 禁止特异性较低的选择器在特异性较高的选择器之后重写 - 'no-empty-source': null, - 'selector-pseudo-class-no-unknown': [ - true, - { - ignorePseudoClasses: ['export'], - }, - ], - // 关闭禁用位置属性,这个对scss导出变量有问题 - 'property-no-unknown': null, - // https://github.com/kristerkari/stylelint-scss scsslint规范配置 - 'scss/comment-no-loud': true, // 禁止使用/*注释 - 'scss/comment-no-empty': true, // 禁止空注释 - }, - ignoreFiles: ['**/*.js', '**/*.ts'], -} + plugins: ['stylelint-scss', 'stylelint-order'], + customSyntax: 'postcss-html', + extends: ['stylelint-config-standard', 'stylelint-config-prettier'], + rules: { + indentation: 2, // 缩进2个空格 + 'at-rule-no-unknown': [ + true, + { + ignoreAtRules: ['mixin', 'extend', 'content', 'include'], + }, + ], + 'no-descending-specificity': null, // 禁止特异性较低的选择器在特异性较高的选择器之后重写 + 'no-empty-source': null, + 'selector-pseudo-class-no-unknown': [ + true, + { + ignorePseudoClasses: ['export'], + }, + ], + // 关闭禁用位置属性,这个对scss导出变量有问题 + 'property-no-unknown': null, + // https://github.com/kristerkari/stylelint-scss scsslint规范配置 + 'scss/comment-no-loud': true, // 禁止使用/*注释 + 'scss/comment-no-empty': true, // 禁止空注释 + }, + ignoreFiles: ['**/*.js', '**/*.ts'], +};