Skip to content

feat(linter): Implement eslint/no-object-constructor#7345

Merged
camc314 merged 8 commits intooxc-project:mainfrom
azihsoyn:feat/eslint-no-object-constructor
Nov 23, 2024
Merged

feat(linter): Implement eslint/no-object-constructor#7345
camc314 merged 8 commits intooxc-project:mainfrom
azihsoyn:feat/eslint-no-object-constructor

Conversation

@azihsoyn
Copy link
Copy Markdown
Contributor

@azihsoyn azihsoyn commented Nov 18, 2024

Hello, again!

I added eslint rule eslint/no-object-constructor
https://eslint.org/docs/latest/rules/no-object-constructor

Notes

A test case for new Object() has been commented out:

This is due to the test configuration specifying globals: { Object: "off" }.
This approach follows the example set by the no_new_wrappers rule. Reference Code

@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app Bot commented Nov 18, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions Bot added A-linter Area - Linter C-enhancement Category - New feature or request labels Nov 18, 2024
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Nov 18, 2024

CodSpeed Performance Report

Merging #7345 will not alter performance

Comparing azihsoyn:feat/eslint-no-object-constructor (f69bc3b) with main (59e7e46)

Summary

✅ 30 untouched benchmarks

Copy link
Copy Markdown
Contributor

@no-yan no-yan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!
Since the team seem to be focusing on other tasks, I’ve added comments on smaller points to help keep things moving efficiently.

Comment thread crates/oxc_linter/src/rules/eslint/no_object_constructor.rs Outdated
Comment thread crates/oxc_linter/src/rules/eslint/no_object_constructor.rs
@Boshen Boshen requested a review from camc314 November 21, 2024 08:16
@azihsoyn azihsoyn requested a review from no-yan November 23, 2024 14:52
@camc314 camc314 self-assigned this Nov 23, 2024
Copy link
Copy Markdown
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! apologies for the delay reviewing!

@camc314 camc314 merged commit 00060ca into oxc-project:main Nov 23, 2024
@azihsoyn azihsoyn deleted the feat/eslint-no-object-constructor branch November 24, 2024 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants