Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable a specific linter rule in Atom (for js-standard)

How do I tell an Atom linter, specifically js-standard, to ignore a rule? I want it ignored project-wide, and I thought that I could achieve this with a package.json or a .eslintrc but I can't get either to work. The rule I want to disable is camelcase

I should be able to do this in a package.json file, because the js-standard linter has an option called honorStyleSettings:

Honors style settings defined in package.json.

Current style settings supported:

ignore
parser

What's the syntax of these settings?

like image 753
Greg Avatar asked May 25 '16 01:05

Greg


1 Answers

For the record, here's how to use js-standard in Atom while selectively disabling a certain rule.

  1. Disable the linter-js-standard Atom package

  2. Install linter-eslint

  3. Add an .eslintrc file:

     {
       "extends": ["standard"],
       "rules": {
         "camelcase": 0
       }
     }
    

You may also need to install standard and eslint via npm, if you don't have them already.

like image 62
Greg Avatar answered Sep 28 '22 09:09

Greg