简体   繁体   English

eslint-plugin-react-hooks 是否在启动时显示代码本身或终端上的错误?

[英]Does eslint-plugin-react-hooks displays the errors on the code itself or just the terminal when starting?

When using the package: https://www.npmjs.com/package/eslint-plugin-react-hooks Is it supposed to add visual yellow underline warnings on react component while using vscode?使用包时: https ://www.npmjs.com/package/eslint-plugin-react-hooks 是否应该在使用 vscode 时在反应组件上添加视觉黄色下划线警告? Or that just add the warnings when you are running the app on the terminal log?或者只是在终端日志上运行应用程序时添加警告?

Mine only display those hook warnings on the log and I am wondering how to enable that in the code itself我的只在日志上显示那些钩子警告,我想知道如何在代码本身中启用它

That won't work in vscode however, if you add a linter extension it should do the job you want to do.但是,这在 vscode 中不起作用,如果您添加一个 linter 扩展,它应该可以完成您想做的工作。

I couldn't suggest one as I don't use one but have a search in the extensions tab of vscode, there's bound to be something that suits.我不能推荐一个,因为我不使用一个,但是在 vscode 的扩展选项卡中搜索,肯定会有适合的东西。

我成功安装了 ESLint vscode 扩展

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 eslint-plugin-react-hooks 出现意外错误(react-hooks/exhaustive-deps) - eslint-plugin-react-hooks is giving unexpected errors (react-hooks/exhaustive-deps) React,ESLint:eslint-plugin-react-hooks 依赖于 object 中的 function - React, ESLint: eslint-plugin-react-hooks dependency on a function in an object 带有依赖列表和 eslint-plugin-react-hooks 的自定义钩子 - Custom hooks with dependency lists and eslint-plugin-react-hooks 为什么 eslint-plugin-react-hooks 在有条件地使用 React 钩子时不会发出警告? - Why eslint-plugin-react-hooks doesn't warn when using react hooks conditionally? 与useEffect一起使用时如何防止触发useCallback(并遵守eslint-plugin-react-hooks)? - How to prevent useCallback from triggering when using with useEffect (and comply with eslint-plugin-react-hooks)? Eslint React Hooks错误:eslint-plugin-react-hooks用尽详尽的警告警告useEffect中的功能依赖项 - Eslint React Hooks Error: eslint-plugin-react-hooks exhaustive deps warning for a function dependency in useEffect React,ESLint:eslint-plugin-react-hooks 显示不正确的“缺少依赖项” - React, ESLint: eslint-plugin-react-hooks shows incorrect “missing dependency” 如何让 `eslint-plugin-react-hooks` 对导出为 `default` 的功能组件进行 lint? - How can I get `eslint-plugin-react-hooks` to lint functional components that are exported as `default`? 在打字稿中启用react-hooks eslint插件。 tslint中没有插件 - enabling the react-hooks eslint plugin in typescript. no plugins in tslint React钩子使用eslint-plugin-react-hooks @ next附加不需要的值 - React hooks appends unwanted value with eslint-plugin-react-hooks@next
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM