简体   繁体   English

[eslint] src\App.js 第 2:8 行中的 React js 错误警告:'person' 已定义但从未使用过

[英]React js error WARNING in [eslint] src\App.js Line 2:8: 'person' is defined but never used

[.[I am facing this issue help me to solve this: it always gives me an error Line 2:8. [.[我面临这个问题帮我解决这个问题:它总是给我一个错误 Line 2:8。 'person' is defined but never used no-unused-vars.][1]][1] 'person' 已定义但从未使用 no-unused-vars。][1]][1]

You can go to the editor settings and search eslint and disable the checkbox of Controls whether eslint is enableed or not.您可以 go 到编辑器设置并搜索eslint并禁用Controls whether eslint is enableed or not. But that's not appritiated cause eslint gives you international code standard in some cases by applying eslint rule.但这并不是因为 eslint 在某些情况下通过应用 eslint 规则为您提供了国际代码标准。 If you want to know more please read eslint rules .如果您想了解更多信息,请阅读eslint 规则 在此处输入图像描述

In line 2 at the position 8, in the file App.js you declared a variable with the name "person" that you are not using in your code.在 position 8 的第 2 行中,在文件 App.js 中,您声明了一个名称为“person”的变量,您没有在代码中使用该变量。 Its a hint not an error,, by eslint. eslint 给出的提示不是错误。 Go to this position and delete the declaration. Go 到这个 position 并删除声明。

暂无
暂无

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

相关问题 反应错误“ ./src/App.js第7行:'APIKEY'被分配了一个值,但从未使用过no-unused-vars” - React error “./src/App.js Line 7: 'APIKEY' is assigned a value but never used no-unused-vars” 在./src/App.js'store'中的反应错误未定义 - react Error in ./src/App.js 'store' is not defined src\\App.js 'nav' 已定义但从未使用过 no-unused-vars - src\App.js 'nav' is defined but never used no-unused-vars React js:./src/App.js第22行:未定义'lastWinner'no-undef搜索关键字以了解有关每个错误的更多信息 - React js: ./src/App.js Line 22: 'lastWinner' is not defined no-undef Search for the keywords to learn more about each error ./src/App.js Line 6:19: 'Component' 未定义 no-undef - ./src/App.js Line 6:19: 'Component' is not defined no-undef 反应错误-./src/App.js第16行:解析错误:意外的令牌 - React error - ./src/App.js Line 16: Parsing error: Unexpected token 我定义了组件并使用它 App.js 但出现未定义的错误 - I defined component and used it App.js but getting undefined error 如何在React“ ./src/components/App.js'Layout','Home'中定义组件错误,未定义react / jsx-no-undef - How to fix component error in React "./src/components/App.js 'Layout', 'Home' is not defined react/jsx-no-undef 引用的错误:app.js第1行中未定义angular - Referenced Error: angular is not defined in app.js line 1 ESLint 警告事件已定义但从未使用过 - ESLint warning event is defined but never used
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM