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

ESLintBear doesn't fail although it should #730

Closed
sils opened this issue Aug 29, 2016 · 7 comments
Closed

ESLintBear doesn't fail although it should #730

sils opened this issue Aug 29, 2016 · 7 comments

Comments

@sils
Copy link
Member

sils commented Aug 29, 2016

when running eslint I get

Oops! Something went wrong! :(

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

1. If ESLint is installed globally, then make sure eslint-plugin-react 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-react@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.

but when I run it with coala with the config it doesn't fail.

type/bug

also interesting, this is exactly the command that coala runs:

lasse@lsx1 ~/somewhere (git)-[sils/coala] % eslint --no-ignore --no-color -f=json --stdin --config .eslintrc
asd
Failed to load plugin react: Cannot find module 'eslint-plugin-react'
Error: Failed to load plugin react: Cannot find module 'eslint-plugin-react'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.load (/usr/lib/node_modules/eslint/lib/config/plugins.js:114:26)
    at Array.forEach (native)
    at Object.loadAll (/usr/lib/node_modules/eslint/lib/config/plugins.js:136:21)
    at Object.load (/usr/lib/node_modules/eslint/lib/config/config-file.js:505:21)
    at loadConfig (/usr/lib/node_modules/eslint/lib/config.js:64:33)
    at new Config (/usr/lib/node_modules/eslint/lib/config.js:235:38)
@gitmate-bot
Copy link
Collaborator

Thanks for reporting this issue! A coalaian will look at it soon.

@AbdealiLoKo
Copy link
Contributor

Can you provide the .eslintrc for this ?

@sils
Copy link
Member Author

sils commented Aug 31, 2016

it had "plugins": ["react"] in it, I can't share the original rc.

@AbdealiLoKo
Copy link
Contributor

Could you provide the versions of:
node, npm, eslint, eslint-plugin-react ?
I seem to be getting UNMET PEER DEPENDENCY when I try to install both together - which I find weird.
I'm hoping to reproduce the exact versions you have to try it out

@sils
Copy link
Member Author

sils commented Aug 31, 2016

CC @oreqizer btw. ; I'll get more info tomorrow but I don't think this is version specific.

@AbdealiLoKo
Copy link
Contributor

I don't think it is versions specific either .. but I'm trying to get it installed to debug :P Seems like any version Im trying is clashing ^^
Not a JavaScript Ninja, so if I can get the versions I could easily get stuff installed (I hope)

@oreqizer
Copy link
Contributor

oreqizer commented Sep 1, 2016

'tis our config:

{
    "parser": "babel-eslint",
    "plugins": ["react", "flowtype"],
    "extends": "airbnb",
    "env": {
        "node": true,
        "browser": true
    },
    "rules": {
        // Flow
        // ---
        "flowtype/define-flow-type": "error", // teaches ESlint Flow types
        "no-duplicate-imports": "off", // we need to import types separately

        // Kiwi style
        // ---
        "semi": ["error", "never"],
        "indent": ["error", "tab"],
        "react/jsx-indent": ["error", "tab"],
        "react/jsx-indent-props": ["error", "tab"],
        "max-len": ["warn", { "code": 150 }], // will get reduced eventually
        "dot-notation": ["off"], // we use bracket notation for external inputs (API, url params, ...)
        "react/jsx-filename-extension": [1, { "extensions": [".js"] }],
        "new-cap": "off", // Because Immutable.js
        "no-underscore-dangle": "off", // __LOG
        // Strajk & Michael don't care
        "jsx-a11y/label-has-for": "off", // we put inputs into labels
        "one-var": ["off"], // we like this
        "one-var-declaration-per-line": ["off"], // we like this
        "no-else-return": ["off"], // everybody got his own taste
        "react/prop-types": ["off"],
        "import/prefer-default-export": ["off"],


        // known 'babel-eslint' bug
        // ---
        "generator-star-spacing": "off",


        // Fix gradually
        // ---
        "no-unused-expressions": "warn",
        "vars-on-top": "warn",
        "no-prototype-builtins": "warn",
        "no-unused-vars": "warn",
        "default-case": "warn",
        "radix": "warn", // Wanna use Number(…)
        "func-names": "warn",
        "no-mixed-operators": "warn",


        // Fix automatically someday
        // ---
        "object-shorthand": "off", // TODO: try `consistent-as-needed`
        "quotes": ["off", "double", "avoid-escape"],
        "no-trailing-spaces": "off",
        "no-var": "off",
        "quote-props": "off",
        "comma-dangle": "off",
        "object-curly-spacing": "off",
        "prefer-template": "off",
        "prefer-const": "off",
        "import/no-duplicates": "off",
        "padded-blocks": "off",
        "spaced-comment": "off",
        "import/imports-first": "off",
        "react/jsx-space-before-closing": "off",
        "jsx-a11y/img-has-alt": "off",
        "react/sort-comp": "off",
        "react/no-find-dom-node": "off",
        "react/no-string-refs": "off",
        // Codemod
        "react/prefer-stateless-function": "warn",
        "react/prefer-es6-class": "warn",
        "arrow-body-style": "off",
    },
}

AbdealiLoKo added a commit that referenced this issue Sep 3, 2016
In some cases, eslint fails. Because of this, the user can't see any
results, nor does the user see any warning that it failed. We now show
the stderr to the user as a WARNING.

Fixes #730
AbdealiLoKo added a commit that referenced this issue Sep 3, 2016
In some cases, eslint fails. Because of this, the user can't see any
results, nor does the user see any warning that it failed. We now show
the stderr to the user as a WARNING.

Fixes #730
gosom pushed a commit to gosom/coala-bears that referenced this issue Jul 15, 2017
In some cases, eslint fails. Because of this, the user can't see any
results, nor does the user see any warning that it failed. We now show
the stderr to the user as a WARNING.

Fixes coala#730
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants