热门标签 | HotTags
当前位置:  开发笔记 > 前端 > 正文

Atom&eslint:Cannotfindmodule'eslint-config-react-app'

如何解决《Atom&eslint:Cannotfindmodule'eslint-config-react-app'》经验,请帮忙看看怎么搞?

Since I reinstalled my NPM dependencies in my create-react-app project, Atom's eslint gives me this error on the top of every file :

Error while running ESLint: Cannot find module 'eslint-config-react-app'.

While react-scripts's eslint doesn't raise any warning or error. By the way, the package eslint-config-react-app is installed in node_modules. I tried to reinstall linter-eslint, atom, the NPM dependencies, etc. Nothing worked.

Has anyone an idea ?

Here is my .eslintrc :

{
  "extends": "react-app",
  "rules": {
    "jsx-a11y/anchor-is-valid": 0,
    "react/jsx-no-comment-textnodes": 0,
    "no-unused-vars": ["warn", {
      args: "all",
      ignoreRestSiblings: false,
      argsIgnorePattern: "^_$"
    }]
  }
}

Edit : I don't know why, but all of the sudden, the error changed and now it's this one on top of every js file :

Error while running ESLint: Invalid regular expression flags

EDIT 2

None of the given solutions worked in my case. The problem with linter-eslint is not solved. But I found a workaround for now : using fast-eslint instead of linter-eslint. Works just fine.


推荐阅读
author-avatar
雯雯2046
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有