Rei*_*lly 4 javascript javascript-intellisense reactjs visual-studio-code
当在 Windows 上使用 Visual Studio Code 开发 Angular 应用程序时,我记得如果删除导入语句,vscode 几乎会立即在引用这些工件的所有位置用红色下划线。
然而,现在我正在 Mac 上的 vscode 中开发 React 应用程序,我注意到如果删除 import 语句,我不会像以前那样得到任何红色下划线。
关于如何恢复此功能有什么想法吗?我想这是因为我在以前的工作空间中安装了一个 Angular 软件包,但现在我不再拥有它了。
@Matt Bierner 给出了一个很好的建议来检查说明,但读完后我可以说最好的选择是jsconfig.json通过添加来创建或修改"checkJs": true
{
"compilerOptions": {
"checkJs": true,
},
"exclude": ["node_modules", "**/node_modules/*"]
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6986 次 |
| 最近记录: |