mthadley / linter-liferay

Atom linter plugin for Liferay's coding standards.
https://atom.io/packages/linter-liferay
MIT License
1 stars 1 forks source link

Add the possibility to disable rules in the configuration panel #4

Closed Vrakfall closed 8 years ago

Vrakfall commented 8 years ago

Hello,

Even tho I like this package a lot and the formatting it implies, I'd like to be able to disable some of the rules either I disagree with or I don't want to use.

Would it be possible, considering this is fetching the formatting from another repo?

mthadley commented 8 years ago

Hey @Vrakfall

One way you can currently disable some rules is by adding comments that contain options for eslint (which is what check-source-formatting uses under the hood):

/* eslint-disable comma-dangle */

const myArray = [
  '1',
  '2', // <-- this line should stop showing warnings now
];

You can take a look at the various options here.

There is an upcoming version of check-source-formatting that will expand the API for passing configuration, so I'll take a look at integrating that when it is released. Thanks for the feedback!

Vrakfall commented 8 years ago

So, is check-source-formatting only relying on a custom set of eslint rules?

Because I have also linter-eslint and then if it's true, I don't see the point of using both.

mthadley commented 8 years ago

@Vrakfall That is correct, it is a tool that is mostly used by Liferay employees or contributors. For most people, it probably makes more sense to use something like linter-eslint.

Vrakfall commented 8 years ago

Alright, I see the point and purpose of it now. ;D

I think I'll keep going with a custom linter-eslint. But anyway, your package is nice and might interest other people outside Liferay.

Have a nice coding time! :D