Skip to content

Configuration for rule "no-else-return" is invalid #1599

@krazyjakee

Description

@krazyjakee

I get this error on save with atom. I've tried to fiddle around with versions and re-install everything. Looks like there is a bad config option in the eslint-config-airbnb-base.
node_modules/eslint-config-airbnb-base/rules/best-practices.js: Configuration for rule "no-else-return" is invalid: Value "[object Object]" should NOT have more than 0 items.

The rule in best-practices.js looks like this:

    // disallow else after a return in an if
    // https://eslint.org/docs/rules/no-else-return
    // TODO: semver-major, set allowElseIf to false
    'no-else-return': ['error', { allowElseIf: true }],

My dependencies:

"devDependencies": {
    "babel-eslint": "^8.0.1",
    "eslint": "^4.9.0",
    "eslint-config-airbnb": "^16.1.0",
    "eslint-plugin-import": "^2.7.0",
    "eslint-plugin-jsx-a11y": "^6.0.2",
    "eslint-plugin-meteor": "^4.1.4",
    "eslint-plugin-react": "^7.4.0"
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions