clutchski/coffeelint

Option for prefer_english_operator preferring non-english operators

Closed this issue · 2 comments

Couldn't find if this has already been discussed...

If I prefer to use && over and, is it possible to make coffeelint enforce that? If not, is it something that you'd consider adding or be open to someone adding? Thanks 👍

it something that you'd consider adding or be open to someone adding?

I'm not sure about adding it to the core, but this is why I built a 3rd party rule system. You don't need my approval at all. This is not an immediate rejection. I just think we need to figure out the right way to do it. Here are some of my thoughts

  1. I don't think it seems like a good idea to have intentionally conflicting rules that can both be turned on. We already have prefer_english_operator, so I'm hesitant to add prefer_symbolic_operator next to it.
  2. I suppose prefer_english_operator could have an option to invert the rule, but that also seems awkward: prefer_english_operator: { level: "warn", invert: true }
  3. It might be less awkward to rename the rule prefer_operator: { level: "warn", type: "symbolic" } but there is no system right now for renaming a rule, it would break people's configs.

What are your thoughts? What are you willing to put into making this go?

Hey @AsaAyers thanks for taking the time to think through the ramifications to adding this!

I agree with your assessment and think option 2, while slightly awkward, would be useful enough as to be Acceptably Awkward to me.

I'd be more than happy to implement this option (well, to try)