在使用了eslint-airbnb之后,发现了如下错误,完全无法理解意思

Compiled with warnings.

./src/index.js
Line 1: Definition for rule 'jsx-a11y/href-no-hash' was not found jsx-a11y/href-no-hash

./src/App.js
Line 1: Definition for rule 'jsx-a11y/href-no-hash' was not found jsx-a11y/href-no-hash

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

不知道该如何解决

阅读 7.6k
2 个回答

不知道你第一行到底写了什么……
报错里说'jsx-a11y/href-no-hash'这个东西它没找着,
给了个临时解决方案,是在上一行加个// eslint-disable-next-line注释,直接忽略掉这一行的lint就行。

依赖没有装好, 删除node_modules 重新安装。 最好clean一下cache

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题