-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: add lint rules banning new
-ing of Object, String, Number and Boolean
#17432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the motivation of doing that? I somehow feel unhappy that we need to bring a whole new set of litn rules int our repo for that 😞
The same changes were just proposed for The reason for doing the change is that there is no value brought from using these constructors, they all are less performant and/or more code than using the primitives directly. In terms of having to bring in another set of lint rules, banning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I agree with @devversion that this seems redundant, considering that it hasn't come up before on this repo. |
Is there a downside to having these? I don't see it ever coming up, but I don't see a cost to having them anyway |
I don't mind much. I was mostly asking for the motivation of doing this. The downside is that we add more packages which aren't necessarily needed. Also FYI: lint rules like this, visit each identifier most likely and cause overall IDE slow-down (if implemented badly; just in general here). |
That's fair. I personally turn off tslint in my IDE because it's waaaaay too aggressive while I'm in the middle of writing something. Like, I know the identifier is unused, I just wrote it 2 seconds ago. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.