Victor Ferreira
Victor Ferreira

Reputation: 6449

Can't get Atom Linter to work

I'm new to Atom, the text edit, and I installed many packages, including Linter

https://github.com/AtomLinter/Linter

But it's not showing errors or highlighting code, it's just getting ignored.

Do any of you know what I should do to get this to work?

Upvotes: 53

Views: 55466

Answers (7)

alewitt
alewitt

Reputation: 71

I had to add the path of my project's node_modules dir to the Atom's eslint package settings, as well as create an .eslinterc.json file in my project. After doing both those, I had to restart Atom (I started it from the command line $ atom .) and it started working.

Upvotes: 0

eversMcc
eversMcc

Reputation: 1146

When I start Atom up, the small UI panel in bottom left is present, but shows zero values for the 3 severities.

If I then do a CTRL-s/save (even with no changes), it starts working..

In my package settings, I have "Lint on Open" (which doesn't seem to work at all) and "Lint on Change" (which is "only for supported providers" so could be that) ticked.

Upvotes: 2

VityaSchel
VityaSchel

Reputation: 708

My problem with linter-eslint was because I accidentally installed eslint 8 which is not yet supported by atom linter or linter-eslint. After I installed eslint ^7.32.0 and typed npm i, restarted Atom and changed ecmaversion from 13 to 12 everything started working fine!

Upvotes: 2

Priyanshu Tiwari
Priyanshu Tiwari

Reputation: 311

Here is my .eslintrc. Hope it helps.

module.exports = {
  root: true,
  "parserOptions": {
      "ecmaVersion": 7,
      "sourceType": "module",
      "ecmaFeatures": {
          "jsx": true,
      }
  },
  "extends" : "rallycoding",
  "rules": {
    "react/require-extension": "off"
  }
};

Upvotes: 0

geistwc
geistwc

Reputation: 404

You have to additionally install a linter package for your desired language.

Here is a list: https://atomlinter.github.io/

Upvotes: 28

DC IT
DC IT

Reputation: 221

Instead of opening atom from the terminal like I normally do, I opened it from the application icon. Then atom asks if it was ok to install linter dependencies and presto it was working.

Hope this helps.

Upvotes: 4

rofrol
rofrol

Reputation: 15226

I needed to remove atom config and start from scratch to make linter working

mv ~/.atom ~/.atom.bak

Upvotes: 8

Related Questions