Browse Source

fix: improve global type detection of vue files (#4455)

pull/4461/head
Vben 1 year ago
committed by GitHub
parent
commit
bc625ee710
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      internal/lint-configs/eslint-config/src/configs/javascript.ts
  2. 16
      internal/lint-configs/eslint-config/src/configs/vue.ts
  3. 1
      packages/effects/common-ui/src/ui/about/about.vue

2
internal/lint-configs/eslint-config/src/configs/javascript.ts

@ -147,7 +147,7 @@ export async function javascript(): Promise<Linter.Config[]> {
'no-template-curly-in-string': 'error', 'no-template-curly-in-string': 'error',
'no-this-before-super': 'error', 'no-this-before-super': 'error',
'no-throw-literal': 'error', 'no-throw-literal': 'error',
'no-undef': 'error', 'no-undef': 'off',
'no-undef-init': 'error', 'no-undef-init': 'error',
'no-unexpected-multiline': 'error', 'no-unexpected-multiline': 'error',
'no-unmodified-loop-condition': 'error', 'no-unmodified-loop-condition': 'error',

16
internal/lint-configs/eslint-config/src/configs/vue.ts

@ -15,6 +15,22 @@ export async function vue(): Promise<Linter.Config[]> {
{ {
files: ['**/*.vue'], files: ['**/*.vue'],
languageOptions: { languageOptions: {
// globals: {
// computed: 'readonly',
// defineEmits: 'readonly',
// defineExpose: 'readonly',
// defineProps: 'readonly',
// onMounted: 'readonly',
// onUnmounted: 'readonly',
// reactive: 'readonly',
// ref: 'readonly',
// shallowReactive: 'readonly',
// shallowRef: 'readonly',
// toRef: 'readonly',
// toRefs: 'readonly',
// watch: 'readonly',
// watchEffect: 'readonly',
// },
parser: parserVue, parser: parserVue,
parserOptions: { parserOptions: {
ecmaFeatures: { ecmaFeatures: {

1
packages/effects/common-ui/src/ui/about/about.vue

@ -52,7 +52,6 @@ const {
license, license,
version, version,
// vite inject-metadata // vite inject-metadata
// eslint-disable-next-line no-undef
} = __VBEN_ADMIN_METADATA__ || {}; } = __VBEN_ADMIN_METADATA__ || {};
const vbenDescriptionItems: DescriptionItem[] = [ const vbenDescriptionItems: DescriptionItem[] = [

Loading…
Cancel
Save