简体   繁体   English

ESLint找不到插件“ eslint-plugin-angular”,但我没有使用Angular

[英]ESLint couldn't find the plugin “eslint-plugin-angular” but i'm not using Angular

i'm working on a React application using ES6. 我正在使用ES6开发一个React应用程序。 The application was created using the create-react-app wrapper. 该应用程序是使用create-react-app包装器create-react-app

I'm setting up the ESLint for that application but i'm getting the error ESLint couldn't find the plugin eslint-plugin-angular . 我正在为该应用程序设置ESLint,但出现错误ESLint couldn't find the plugin eslint-plugin-angular The thing is that i'm not using Angular anywhere as far as i know. 事实是,据我所知, 我没有在任何地方使用Angular Did you ever have an error like this? 您是否遇到过这样的错误?

Could be that the angular plugin is being required for some reason i'm not considering? 可能是出于我未考虑的某些原因而需要使用角度插件吗?

This is my package.json 这是我的package.json

{
  "name": "app",
  "version": "0.1.0",
  "private": true,
  "repository": {
    "type": "git",
    "url": "repo"
  },
  "devDependencies": {
    "autoprefixer": "6.5.1",
    "axios-mock-adapter": "^1.7.1",
    "babel-core": "6.17.0",
    "babel-eslint": "7.1.1",
    "babel-jest": "17.0.2",
    "babel-loader": "6.2.7",
    "babel-preset-react-app": "^2.0.1",
    "case-sensitive-paths-webpack-plugin": "1.1.4",
    "chalk": "1.1.3",
    "connect-history-api-fallback": "1.3.0",
    "cross-spawn": "4.0.2",
    "css-loader": "0.26.0",
    "detect-port": "1.0.1",
    "dotenv": "^4.0.0",
    "enzyme": "^2.7.0",
    "eslint": "3.8.1",
    "eslint-config-react-app": "^0.5.0",
    "eslint-loader": "1.6.0",
    "eslint-plugin-flowtype": "2.21.0",
    "eslint-plugin-import": "2.0.1",
    "eslint-plugin-jsx-a11y": "2.2.3",
    "eslint-plugin-react": "6.4.1",
    "extract-text-webpack-plugin": "1.0.1",
    "file-loader": "0.9.0",
    "filesize": "3.3.0",
    "fs-extra": "0.30.0",
    "gzip-size": "3.0.0",
    "html-webpack-plugin": "2.24.0",
    "http-proxy-middleware": "0.17.2",
    "jest": "17.0.2",
    "json-loader": "0.5.4",
    "node-sass": "^4.0.0",
    "object-assign": "4.1.0",
    "path-exists": "2.1.0",
    "postcss-loader": "1.0.0",
    "promise": "7.1.1",
    "react-addons-test-utils": "^15.4.1",
    "react-dev-utils": "^0.4.2",
    "react-test-renderer": "^15.4.1",
    "recursive-readdir": "2.1.0",
    "redux-mock-store": "^1.2.1",
    "sass-loader": "^4.1.0",
    "sinon": "^1.17.7",
    "socket.io": "^1.7.2",
    "strip-ansi": "3.0.1",
    "style-loader": "0.13.1",
    "url-loader": "0.5.7",
    "webpack": "1.14.0",
    "webpack-dev-server": "1.16.2",
    "webpack-manifest-plugin": "1.1.0",
    "whatwg-fetch": "1.0.0"
  },
  "dependencies": {
    "axios": "^0.15.3",
    "font-awesome": "^4.7.0",
    "immutable": "^3.8.1",
    "inuitcss": "^6.0.0-beta.4",
    "react": "^15.4.1",
    "react-dom": "^15.4.1",
    "react-redux": "^5.0.0",
    "react-router": "^3.0.0",
    "redux": "^3.6.0",
    "redux-thunk": "^2.1.0",
    "socket.io-client": "^1.7.2"
  },
  "scripts": {
    "start": "node scripts/start.js",
    "build": "node scripts/build.js",
    "test": "NODE_ENV=test node scripts/test.js --env=jsdom"
  },
  "jest": {
    "collectCoverageFrom": [
      "src/**/*.{js,jsx}"
    ],
    "setupFiles": [
      "<rootDir>/config/polyfills.js"
    ],
    "testPathIgnorePatterns": [
      "<rootDir>[/\\\\](build|docs|node_modules)[/\\\\]"
    ],
    "testEnvironment": "node",
    "testURL": "http://localhost",
    "transform": {
      "^.+\\.(js|jsx)$": "<rootDir>/node_modules/babel-jest",
      "^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
      "^(?!.*\\.(js|jsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
    },
    "transformIgnorePatterns": [
      "[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"
    ],
    "moduleNameMapper": {
      "^react-native$": "react-native-web"
    }
  }
}

This is my .eslintrc.json 这是我的.eslintrc.json

{
    "env": {
        "browser": true,
        "es6": true,
        "jest": true
    },
    "extends": ["eslint:recommended", "plugin:react/recommended"],
    "parserOptions": {
        "ecmaFeatures": {
            "experimentalObjectRestSpread": true,
            "jsx": true
        },
        "sourceType": "module"
    },
    "plugins": [
        "react"
    ],
    "rules": {
        "linebreak-style": [
            "error",
            "unix"
        ],
        "quotes": [
            "error",
            "single"
        ],
        "semi": [
            "error",
            "never"
        ]
    }
}

And my babel.rc file 还有我的babel.rc文件

{
  "presets": [
    "react-app"
  ]
}

Did you guys have this problem before? 你们以前有这个问题吗?

Thanks 谢谢

It looks like this might be a similar problem . 看来这可能是一个类似的问题 Is there a .eslinrc in your user folder? 您的用户文件夹中是否有一个.eslinrc? You could try removing it or installing the plugins globally. 您可以尝试将其删除或在全球范围内安装插件。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM