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: improve global type detection of vue files #4455

Merged
merged 1 commit into from
Sep 21, 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
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export async function javascript(): Promise<Linter.Config[]> {
'no-template-curly-in-string': 'error',
'no-this-before-super': 'error',
'no-throw-literal': 'error',
'no-undef': 'error',
'no-undef': 'off',
'no-undef-init': 'error',
'no-unexpected-multiline': 'error',
'no-unmodified-loop-condition': 'error',
Expand Down
16 changes: 16 additions & 0 deletions internal/lint-configs/eslint-config/src/configs/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ export async function vue(): Promise<Linter.Config[]> {
{
files: ['**/*.vue'],
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',
// },
anncwb marked this conversation as resolved.
Show resolved Hide resolved
parser: parserVue,
parserOptions: {
ecmaFeatures: {
Expand Down
1 change: 0 additions & 1 deletion packages/effects/common-ui/src/ui/about/about.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ const {
license,
version,
// vite inject-metadata 插件注入的全局变量
// eslint-disable-next-line no-undef
} = __VBEN_ADMIN_METADATA__ || {};

const vbenDescriptionItems: DescriptionItem[] = [
Expand Down