javascript icon indicating copy to clipboard operation
javascript copied to clipboard

Configuration for rule "import/no-cycle" is invalid

Open aachauhan2009 opened this issue 6 years ago • 23 comments

Oops! Something went wrong! :(

ESLint: 7.0.0

Error: .eslintrc » eslint-config-airbnb » /node_modules/eslint-config-airbnb-base/index.js » /node_modules/eslint-config-airbnb-base/rules/imports.js: Configuration for rule "import/no-cycle" is invalid: Value "∞" should be integer.

My package json devDependency.

    "@babel/core": "7.9.6",
    "@babel/runtime": "7.9.6",
    "@react-native-community/eslint-config": "0.0.5",
    "@testing-library/jest-native": "3.1.0",
    "@testing-library/react-native": "5.0.3",
    "babel-eslint": "10.1.0",
    "babel-jest": "24.8.0",
    "babel-plugin-inline-import": "3.0.0",
    "eslint": "7.0.0",
    "eslint-config-airbnb": "18.1.0",
    "eslint-config-prettier": "6.10.0",
    "eslint-import-resolver-react-native": "0.2.0",
    "eslint-plugin-import": "2.20.1",
    "eslint-plugin-jsx-a11y": "6.2.3",
    "eslint-plugin-prettier": "3.1.2",
    "eslint-plugin-react": "7.19.0",

This has started occurring from today only. It was working last week.

aachauhan2009 avatar Nov 09 '20 08:11 aachauhan2009

Sadly i believe react-scripts fails to properly use ^ semver ranges, and so is unable to automatically receive bugfixes and security updates.

ljharb avatar Aug 01 '21 19:08 ljharb

I have updated eslint-plugin-import to version 2.22.1. Then removed node_modules - rm -rf ./node_modules Then installed them - npm i It worked for me. Thank you!

I have updated eslint-plugin-import to version 2.22.1. Then removed node_modules - rm -rf ./node_modules Then installed them - npm i It worked for me. Thank you!

This worked for me. Earlier face the issue of eslint version but later following the above steps, it got resolved. Thanks :)

rupenshethXeb avatar Feb 13 '24 13:02 rupenshethXeb