EsLint no longer showing up


#1

Hi Everyone,

A couple days ago I broke my linter and I have been having severe difficulty trying to fix it.

I have done the following:

  • Uninstalled/reinstalled atom

  • I installed the following packages.

atom-ternjs
file-icons
language-ejs
linter
linter-erb
linter-eslint
linter-htmlhint
linter-js-yaml
linter-ruby
open-in-browser
ruby-block

  • I opened my .eslintrc file using atom ~/.eslintrc and added the following code.

{ "env": { "browser": true, "commonjs": true, "es6": true, "node": true }, "extends": "eslint:recommended", "globals": { "angular": true, "$": true }, "parserOptions": { "sourceType": "module" }, "rules": { "brace-style": "error", "camelcase": ["error", { "properties": "never" }], "comma-dangle": ["error", "never"], "func-call-spacing": ["error", "never"], "eqeqeq": "warn", "indent": [ "error", 2, { "SwitchCase": 1 } ], "key-spacing": [ "error", { "beforeColon": false } ], "no-console": "off", "no-fallthrough": "warn", "prefer-const": "error", "quotes": [ "error", "single", { "allowTemplateLiterals": true } ], "semi": [ "error", "always" ] } }

Any ideas for troubleshooting this in order to get my linter back?

Thanks


#2

Do you remember what happened shortly before the linter started to seem broken?


#3

Hi,

I ran the following in my command line.

npm install -g eslint-config-standard eslint-config-standard-react eslint-plugin-standard eslint-plugin-promise eslint-plugin-import eslint-plugin-node eslint-plugin-react

After the linter broke I ran:

npm uninstall -g eslint-config-standard eslint-config-standard-react eslint-plugin-standard eslint-plugin-promise eslint-plugin-import eslint-plugin-node eslint-plugin-react

to try and reverse the changes.


#4

Before that, what eslint packages did you have installed?


#5

These were all the linter packages I had installed when the linter was working:

linter
linter-erb
linter-eslint
linter-htmlhint
linter-js-yaml
linter-ruby

#6

You said that it broke because you installed NPM packages to enhance eslint. What set of NPM packages did you have installed when eslint was working? Just eslint?

What happens when you use eslint -v from the command line?


#7

Yeah, it was just eslint I had installed. Typing eslint -v returns v4.19.1


#8

And linter still works for the other languages you have installed?


#9

Just tested it and it’s broken for other languages as well


#10

Just checking out my config.cson file and I notice it doesn’t reference eslint anymore. I think it did previously. Could that be it?


#11

It doesn’t seem likely to me that installing some eslint configuration packages would break the sources that the other linter providers rely on, and eslint works fine, so it probably wasn’t your installing packages that broke the linting. Can you think of anything else that might have happened?


#12

In order for me to tell you that, I would have to know what the reference was. A reference in "*".core.disabledPackages is different from "*"."linter-eslint".


#13
"*":
  core:
    telemetryConsent: "limited"
    themes: [
      "one-light-ui"
      "one-light-syntax"
    ]
  "exception-reporting":
    userId: "53a7b8bd-a1d2-4463-8f88-291259d3a94c"

Well, this is what my package.cson file looks like now. I’m pretty sure there was a line in here referencing “*”.“linter-eslint”


#14

That just means that you don’t have any custom settings on the linter-eslint package.

Try downloading atom-ide-ui and disabling linter. The atom-ide-ui diagnostics pane should work with all linter packages (though at least one will complain if you don’t have linter because of how its dependencies are declared; it should still work).