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

Bug: ts 全局类型声明,在 *.vue 文件中eslint报: no-undef, *.ts文件中则不报错 #4418

Closed
5 tasks done
elkon028 opened this issue Sep 17, 2024 · 0 comments · Fixed by #4455
Closed
5 tasks done
Labels
bug Something isn't working

Comments

@elkon028
Copy link

elkon028 commented Sep 17, 2024

Version

Vben Admin V5

Describe the bug?

@typescript-eslint/eslint-plugin 或者 @typescript-eslint/parser 工作不正常?

不能自动把全局的类型声明添加到 eslint 的 global 里?

必须配置 eslint 规则 'no-undef': 'off',???

  • apps/web-arco/src/types/global.d.ts
image - apps/web-arco/tsconfig.json image - apps/web-arco/src/api/core/logs.ts image - apps/web-arco/src/views/features/socket/index.vue image

Reproduction

如上

System Info

System:
    OS: macOS 14.6.1
    CPU: (14) arm64 Apple M3 Max
    Memory: 515.97 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.16.0 - /usr/local/bin/node
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 9.10.0 - /usr/local/bin/pnpm
    Watchman: 2024.09.02.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 128.0.6613.138
    Safari: 17.6

Relevant log output

No response

Validations

@elkon028 elkon028 changed the title Bug: *.vue文件中 eslint 不支持 typescript?? Bug: ts 全局类型声明,在 *.vue 文件中eslint报: no-undef, *.ts文件中则不报错 Sep 17, 2024
@anncwb anncwb added the bug Something isn't working label Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants