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

ESLint can't find the plugin #1

Open
joepio opened this issue Feb 7, 2017 · 1 comment
Open

ESLint can't find the plugin #1

joepio opened this issue Feb 7, 2017 · 1 comment

Comments

@joepio
Copy link

joepio commented Feb 7, 2017

#Hi Alex, thanks for all your hard work!

Unfortunately, I can't seem to get this to work. I keep getting this error when I try to run my linter:

ESLint couldn't find the plugin "eslint-plugin-import-order-autofix". This can happen for a couple different reasons:

1. If ESLint is installed globally, then make sure eslint-plugin-import-order-autofix is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.

2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm i eslint-plugin-import-order-autofix@latest --save-dev

If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Of course, I've made sure to check the suggestions.

The eslint plugin is installed and present in node_modules:

// in package.json

    "eslint": "^3.14.1",
    "eslint-config-airbnb": "^14.0.0",
    "eslint-import-resolver-webpack": "^0.8.1",
    "eslint-plugin-import": "^2.2.0",
    "eslint-plugin-import-order-autofix": "^0.8.3",
    "eslint-plugin-jsx-a11y": "^3.0.2",
    "eslint-plugin-react": "^6.9.0",

The rule is added to the ESlint config:

// in .esintrc

{
  "plugins": [
    "react",
    "jsx-a11y",
    "import-order-autofix"
  ],
  "rules": {
    "react/no-array-index-key": 1,
    "import-order-autofix/order": 1
  }
}

I've made sure to run the local ESlint:

./node_modules/.bin/eslint --fix --ext .jsx,.js .

I've tried removing the node_modules folder. I've also tried installing ESlint and this plugin globally, but keep getting the same error.

Do you perhaps know something else I can try?

@machineghost
Copy link

machineghost commented Aug 2, 2017

The problem likely is that the package requires ESLint 2/3, but you (and anyone else using ESlint nowadays) are running ESLint 4. You can check if this is a problem by trying to re-install the plug-in; if you see:

warning "[email protected]" has incorrect peer dependency "[email protected] - 3.x".

then you know that's the issue.

As for a fix, it's possible the library author can just update his package.json to require the newer version of ESLint, but it's likely that the new version breaks the plug-in and the author will have to address that issue (or issues) also.

... but since (unfortunately) it seems like this project may be dead/abandoned, I wouldn't hold my breath waiting.

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