ricardofbarros / linter-js-standard

Atom linter plugin for JavaScript, using JavaScript Standard Style
https://atom.io/packages/linter-js-standard
MIT License
99 stars 48 forks source link

Option to filter out Warnings (or keywords) #107

Closed QAnders closed 7 years ago

QAnders commented 8 years ago

Thanks for an awesome package!

I'd love to see an option to filter out certain warnings, eg. the "Extra semicolon", etc. I work with different runtimes, some core Node.js while other is like an "embedded" Node.js runtime (GatewayScript in IBM DataPower). The embedded runtime has some "quirks" that are not standard Node.js (or JavaScript) as well as pre-defined objects, e.g. "console", "session", etc.

I get tons of warnings for these not being declared (as I don't need to declare them) so being able to filter these out would be an awesome addition to your package...

ricardofbarros commented 7 years ago

Hey @QAnders, you could disable some rules with comments. http://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments

Also it seems your problems is with global variables. You can define them in your package.json like so:


{
   "standard": {
      "globals": ["console", "session"]
    } 
}