clutchski / coffeelint

Lint your CoffeeScript.
http://www.coffeelint.org
Other
1.18k stars 172 forks source link

colon_assignment_spacing: add optional properties min_left, min_right #594

Open ghost opened 7 years ago

ghost commented 7 years ago

Usage:

    spacing:
        min_left: 1
        min_right: 2

This means that the space to the left of the assignment-colon has to be at least 1 whitespace; and the space to the right of the assignment-colon has to be at least 2 whitespaces.

The left and right are ignored if min_left and min_right are non-negative. By default, min_left and min_right are ignored as they are set to -1 by default.

Also, the code of the rule was simplified. And finally, a test case was added as well.

ghost commented 7 years ago

This solves issue #593 (which I submitted).

ghost commented 7 years ago

Any comment on this? Any reaction? Any chance it will be merged?

swang commented 7 years ago

Hi.

Thank you for putting time into a PR. I know it takes some effort to write and submit a PR. Also apologizes on the delay.

Unfortunately due to my lack of time available to this project, I am not accepting any PRs for new features/new properties. Only bug fixes and maintenance issues. The reasoning for this is that supporting new features requires me to maintain said features for the rest of the lifespan of this library. And given what little time I have available at the moment I am hesitant to accept these kind of PRs.

Since no one can dedicate the time/resources to this library at the moment, I won't be merging this PR. But I would suggest publishing it out as a third party rule for now.

UziTech commented 4 years ago

Further development on coffeelint will be on coffeelint/coffeelint and will be released as @coffeelint/cli.

This PR will be tracked at https://github.com/coffeelint/coffeelint/pull/22