ESLint Plugin Issues


#1

I am using the react eslint plugin and I get an error saying that “Definition for rule react/ not found”.

How can I get eslint plugins working?


#2

Hey @jeffshaver :slightly_smiling:,

I found this guys eslint-plugin-react if it helps:

https://c9.io/burnnat/eslint-plugin-react

:books: :snail:


#3

@mikeumus That is the plugin I am using that isn’t working at the moment. I installed it via npm, have it in .eslintrc as a plugin, but it still isn’t working. Outside of the C9 environment, it works fine.


#4

Anyone have info on this?


#5

@admins can anyone provide some insight into this?


#6

Bumping this issue. Getting the same error. Any idea how to fix this?


#7

@benjaminkitt react plugin issue should be fixed now see https://github.com/c9/core/issues/251.
Could you show exact error message, or give code snippet eslint config, or tell on which workspace do you see the issue?


#8

@harutyun My workspace: https://ide.c9.io/benjaminkitt/engine

My error is different but I assume it has the same root cause.

Definition for rule 'babel/arrow-parens' was not found
Definition for rule 'no-console-log/no-console log' was not found

These errors relate to the eslint-plugin-babel and eslint-plugin-no-console-log plugins. My assumption was that the Cloud9 IDE would look for plugins in the local project. That does not appear to be the case. Here is my .eslintrc:

{
  "parser": "babel-eslint",
  "extends": "standard",
  "plugins": [
    "babel",
    "no-console-log"
  ],
  "rules": {
    "arrow-parens": 0,
    "babel/arrow-parens": 1,
    "no-console-log/no-console-log": 1
  }
}

I’m using the following packages:

"babel-eslint": "^6.0.0-beta.6",
"eslint": "^2.4.0",
"eslint-config-standard": "^5.1.0",
"eslint-plugin-babel": "^3.1.0",
"eslint-plugin-no-console-log": "^2.0.0",
"eslint-plugin-promise": "^1.1.0",
"eslint-plugin-standard": "^1.3.2"

FWIW, running eslint from the terminal does not give me those errors, which leads me to believe the problem is with the Cloud9 specific eslint implementation.

Thanks for your help,
Benjamin


#9

The default linter in Cloud9 IDE uses a browser copy of eslint that does not support parsers or plug-ins in the way you might expect, I wrote this plugin to fix the issues I had been having personally and it supports eslint properly like if you were using the eslint cli.