clutchski / coffeelint

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

Fix conditional printing of context #644

Closed jacksonrayhamilton closed 4 years ago

jacksonrayhamilton commented 5 years ago

Hello,

I noticed that the “; context: …” string printed by the checkstyle reporter might not list a context, which can make the error messages look awkward.

e.g., error messages like this will be printed:

Line contains tab indentation; context: 

Is there a reason “; context: ” is always printed there? It made me think that the tool was broken at first.

Assuming that string isn’t serving a purpose when it’s blank, this PR removes it in that case.

Also, can this please be backported to coffeelint@1 and published under 1.16.3 branched from the last @1 release? Our projects still use CoffeeScript 1 and coffeelint@2 seems to have a rough time with our files because of that, so I would need the change deployed on version 1 in order to use it via the usual NPM channel.

Thanks, Jackson

jacksonrayhamilton commented 5 years ago

Hi @swang, any chance we can work together to get this merged and backported? Just let me know, thanks.

UziTech commented 4 years ago

@jacksonrayhamilton further development on coffeelint will happen on https://github.com/coffeelint/coffeelint as @coffeelint/cli

If you need to use coffeelint@1 your best bet is to fork it into your own npm package.

This will be added to @coffeelint/cli in https://github.com/coffeelint/coffeelint/pull/12. Thanks!

jacksonrayhamilton commented 4 years ago

@UziTech would you be willing to do a 1.x release with this change in it under your package name @coffeelint/cli?

UziTech commented 4 years ago

It would be easiest for you to just fork it and create your own package on npm.

There is a lot to do to get 2.x up to date so I won't have time to release a 1.x anytime soon.

jacksonrayhamilton commented 4 years ago

If you’re willing to add me as a collaborator on the GitHub repo and even the NPM org, I could help with releasing a 1.6.3 patch release.

UziTech commented 4 years ago

I invited you to the GitHub organization. What is your npm username so I can send the invite for the organization?

jacksonrayhamilton commented 4 years ago

Thanks, it’s jacksonrayhamilton on npm as well.

UziTech commented 4 years ago

I sent the invites. Welcome aboard 😀🎉✨

jacksonrayhamilton commented 4 years ago

Migrating this to https://github.com/coffeelint/coffeelint/pull/42.

jacksonrayhamilton commented 4 years ago

This fix is now available via:

yarn global add @coffeelint/cli@1

Or:

npm i -g @coffeelint/cli@1