Skip to content
This repository was archived by the owner on Oct 19, 2021. It is now read-only.

Add missing_parseint_radix rule#487

Open
cskeppstedt wants to merge 1 commit intoclutchski:masterfrom
cskeppstedt:master
Open

Add missing_parseint_radix rule#487
cskeppstedt wants to merge 1 commit intoclutchski:masterfrom
cskeppstedt:master

Conversation

@cskeppstedt
Copy link

Our QA team found a bug in IE8 caused by a parseInt without the radix argument, which unfortunately fell through our code review. It would be great to have a coffeelint rule for this.

In JSHint, there's no explicit rule for a missing radix argument, but there's a ES3 flag. It seems to me that most of the ES3 errors are already mitigated by the CoffeeScript transpiler (extra commas, get/set, reserved keywords, etc). That's why I think an explicit missing_parseint_radix rule seems reasonable, instead of a broader "ES3" rule.

I set the default level to warn. I personally think it makes sense, and it's recommended in the MDN developers reference to always specify the radix argument. I would be ok with ignore as well, if you think a warning is too invasive.

@zmillman
Copy link

Ditto. Any chance this could get reviewed or merged?

@UziTech
Copy link

UziTech commented Jan 14, 2020

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

This PR will be tracked at coffeelint/coffeelint#17

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants