Skip to content

Config for rule "import/extensions" is invalid #386

@efueger

Description

@efueger

Actual Behavior

When using Code Climate's eslint-4 channel, with the following dependencies in the package.json:

With this in the .eslintrc file:

"import/extensions": [
      "error",
      "ignorePackages",
      {
        "js": "never",
        "jsx": "never",
      }
    ],

The eslint plugin fails with the following error:

/usr/src/app/lib/validate_config.js:18
throw e;
^

Error: /code/.eslintrc:
Configuration for rule "import/extensions" is invalid:
Value ["ignorePackages",{"js":"never","jsx":"never"}] should NOT have more than 1 items.
Value ["ignorePackages",{"js":"never","jsx":"never"}] should NOT have more than 1 items.
Value "ignorePackages" should be equal to one of the allowed values.
Value ["ignorePackages",{"js":"never","jsx":"never"}] should match some schema in anyOf.


Possibly resolved by bumping our eslint-plugin-import version. (we're at 2.8.0)


Relevant links

Metadata

Metadata

Assignees

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