clutchski / coffeelint

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

Disallow "not x in y" and "not x of y" #625

Open DiThi opened 6 years ago

DiThi commented 6 years ago

After years of usage of coffee script I still write not x in y by mistake. Python interprets it as not (x in y) but coffee interprets it as (not x) in y which usually translates to false in y which is not what we want.

It should suggest to change it to x not in y or if it was what you wanted, !x in y or (not x) in y.

Same with not x of y.

boris-petrov commented 6 years ago

+1 for this one!