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

初次拉取项目,使用vscodeeslint报错 #953

Closed
2 tasks done
skyline523 opened this issue Mar 4, 2024 · 9 comments
Closed
2 tasks done

初次拉取项目,使用vscodeeslint报错 #953

skyline523 opened this issue Mar 4, 2024 · 9 comments
Labels
good issue 💯 有帮助的提问 has workaround 有解决办法

Comments

@skyline523
Copy link
Contributor

描述问题 (Describe the problem)

文档无记录eslint相关问题或文章,已安装项目推荐vscode插件,问题仍然存在

如何复现该问题 (How to reproduce the problem)

克隆项目安装依赖eslint报错

操作系统和浏览器信息 (Operating system and browser information)

No response

验证 (Verify)

  • 是否仔细阅读过 文档 (Have you read documentation carefully)
  • 检查是否存在相同或类似的问题 issues (Check for the same or similar issues)
@xiaoxian521
Copy link
Member

参考以往issues哈 这种问题我们没法复现 需要自己研究下哈
可以参考这种做法:
先安装依赖 然后执行pnpm lint 没问题再执行 pnpm typecheck
上面两个命令执行下来 没有报错 说明非代码问题 而是你vscode的配置问题 自行研究下哈

@skyline523
Copy link
Contributor Author

能康康你的vscode配置吗

@xiaoxian521
Copy link
Member

正常情况下不需要特别的配置

image

这个文件就是我的配置

@skyline523
Copy link
Contributor Author

好的,感谢

@skyline523
Copy link
Contributor Author

问题已解决,项目使用的配置文件是eslint.config.ts,当前版本e's'lin'teslint不支持该格式配置文件,需要在vscode配置中打开以下配置:
image

@xiaoxian521 xiaoxian521 changed the title #952问题 初次拉取项目,使用vscodeeslint报错 Mar 4, 2024
@xiaoxian521 xiaoxian521 added the has workaround 有解决办法 label Mar 4, 2024
@skyline523
Copy link
Contributor Author

也建议作者有时间可以把类似配置文件都改成如.eslintrc.js格式的文件,以防止这种错误发生

@xiaoxian521
Copy link
Member

怎么说呢 多看看代码或者记录哈 改掉都是有原因的 我们仓库非常新
.eslintrc.js配置文件将在eslint v9废弃 https://zh-hans.eslint.org/docs/latest/use/configure/configuration-files
#786

@skyline523
Copy link
Contributor Author

哈哈哈好的

@xiaoxian521 xiaoxian521 added the good issue 💯 有帮助的提问 label Mar 4, 2024
@xiaoxian521
Copy link
Member

该提问已加入 保姆文档-常见问题 感谢 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good issue 💯 有帮助的提问 has workaround 有解决办法
Projects
None yet
Development

No branches or pull requests

2 participants