53

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?

Victor Ferreira
  • 6,151
  • 13
  • 64
  • 120
  • Are you sure that you have "Lint on Edit" on? As far as I remember, it won't automatically lint without enabling that feature. – Liam Marshall Apr 18 '15 at 02:38
  • everything was checked – Victor Ferreira Apr 18 '15 at 03:04
  • 1
    I have the same thing. I have installed linter-pyflakes, and set the pyflakes executable path as described in the README but nothing's happening. Maybe linter can't resolve the path to the executable on Windows – blokeley Apr 23 '15 at 07:00

7 Answers7

28

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

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

JustCarty
  • 3,839
  • 5
  • 31
  • 51
geistwc
  • 404
  • 4
  • 3
  • 6
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Ian Kemp Apr 25 '15 at 10:22
  • Thanks for the feedback. This is actually what I was going for. The link is just there for convenience (and reference) but the first sentence is the actual answer. Should I have included information about how to find and install a specific linter directly in Atom maybe? – geistwc Apr 25 '15 at 10:49
  • I tried php-linter for atom but it is requiring php executable path. I am using vagrant and i don't have php installed in my host machine. How can i get this running ? – Raheel Nov 28 '15 at 11:28
  • 3
    I setup a `.eslintrc.js` file but its still not working, restarting atom didn't work either :( – SSH This Jul 25 '16 at 21:17
  • I'm shocked that so many Atom linting packages fail to mention that they're extensions of this base package. The devs need to make this clear in their documentation. – Brian Cugelman Feb 05 '22 at 20:09
8

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

mv ~/.atom ~/.atom.bak
rofrol
  • 14,438
  • 7
  • 79
  • 77
  • 4
    Deleting all entries referring to linter in ~/.atom/config.cson did the trick for me. – Francesc Rosas Oct 17 '16 at 12:16
  • 5
    This really solved it for me. The issue was not that i did not have a plugin installed. But it just did not work. So i did the above and installed the linter and eslint first before any other package. One assumes one of the packages caused the issue? or maybe it was the incorrect lunar cycle when I installed eslint or that my room mate would not let me sacrifice that lamb. – xam Mar 29 '17 at 08:50
  • 2
    this appears to have removed all of my settings and packages from atom... – jacoballenwood Aug 18 '17 at 18:05
  • 2
    @jakeaaron you settings are backed in ~/.atom.bak. You can copy them one by one. Or do what Fransesc do. Or better use vscode – rofrol Aug 19 '17 at 02:56
  • Oh boy. This is the sledgehammer method. There is so much other config in that directory that will be lost just to resolve an issue with a single aspect. – Brandon Durham Dec 08 '21 at 16:57
4

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.

DC IT
  • 221
  • 2
  • 5
  • When I closed and then opened atom via the icon, it started to install extra dependancies for linter. Not sure why they weren't installed during the initial installation. – Andrew Mar 25 '19 at 13:53
2

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.

Yun
  • 3,056
  • 6
  • 9
  • 28
eversMcc
  • 1,086
  • 11
  • 15
2

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!

VityaSchel
  • 579
  • 7
  • 18
  • Thank you so much! Took me hours to find this. Problem solved. – rttmax Feb 24 '22 at 16:01
  • @rttmax actually since the time I wrote this answer, I decided Atom linter has too old version for me, so I switched to VSCode :D Pretty much everything that was in Atom + a lot more features is here but it is definitely slower – VityaSchel Feb 26 '22 at 08:35
0

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.

Yun
  • 3,056
  • 6
  • 9
  • 28
alewitt
  • 71
  • 4
0

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"
  }
};