问题
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?
回答1:
You have to additionally install a linter package for your desired language.
Here is a list: https://atomlinter.github.io/
回答2:
I needed to remove atom config and start from scratch to make linter working
mv ~/.atom ~/.atom.bak
回答3:
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.
回答4:
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.
回答5:
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. Hope this helps someone.
回答6:
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"
}
};
来源:https://stackoverflow.com/questions/29712232/cant-get-atom-linter-to-work