Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tairosonloa opened this issue Jun 21, 2020 · 3 comments
Closed

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

tairosonloa opened this issue Jun 21, 2020 · 3 comments

Comments

@tairosonloa
Copy link

When running eslint --fix "**/*.{ts,tsx}" in a TypeScript project after upgrading. Before that everything was fine.

$ eslint --fix "**/*.{ts,tsx}

Oops! Something went wrong! :(

ESLint: 7.3.0

Error: .eslintrc.js » eslint-config-airbnb-typescript-prettier » eslint-config-airbnb » 
/my_project_path/node_modules/eslint-config-airbnb-base/index.js » 
/my_project_path/node_modules/eslint-config-airbnb-base/rules/imports.js:

        Configuration for rule "import/no-cycle" is invalid:
        Value null should be integer.

My eslintrc.js:

module.exports = {
  extends: ['airbnb-typescript-prettier'],
  rules: {
    'prettier/prettier': 'warn',
    'import/prefer-default-export': 0,
    'class-methods-use-this': 0,
    'import/no-extraneous-dependencies': 0,
    'react/jsx-props-no-spreading': 0,
  },
  env: {
    jest: true,
  },
}

It wasn't failing with versions:

  • eslint 7.2.0
  • eslint-config-airbnb-typescript-prettier 2.1.1

It started failed after update to:

  • eslint 7.3.0
  • eslint-config-airbnb-typescript-prettier 2.2.0
@toshi-toma
Copy link
Owner

@tairosonloa

Thank you for the Report.

It seems ESLint bug :(
airbnb/javascript#2245 (comment)

I'd suggest downgrading to eslint v7.2 for now.

@toshi-toma
Copy link
Owner

Fixed by ESLint 7.3.1 eslint/eslint#13435

@tairosonloa
Copy link
Author

I confirm it's working now with eslint 7.3.1 and eslint-config-airbnb-typescript-prettier 3.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants