Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

feat(rome_js_analyze): noCommaOperator #4019

Merged
merged 3 commits into from
Dec 15, 2022
Merged

feat(rome_js_analyze): noCommaOperator #4019

merged 3 commits into from
Dec 15, 2022

Conversation

Conaclos
Copy link
Contributor

@Conaclos Conaclos commented Dec 8, 2022

Summary

Closes: #3932

This implements ESlint's rule no-sequences.

In contrast to ESLint, we do not support the option allowInParentheses (enabled by default in ESLint ; disabled in Rome).

I am wondering whether we should rename the rule to noComaOperator?

Test Plan

Unit and doc tests included (copied from ESLint).

@Conaclos Conaclos requested review from leops, ematipico, xunilrj and a team as code owners December 8, 2022 19:11
@netlify
Copy link

netlify bot commented Dec 8, 2022

Deploy Preview for docs-rometools ready!

Name Link
🔨 Latest commit 127b948
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/639ae78aa82d760008106f35
😎 Deploy Preview https://deploy-preview-4019--docs-rometools.netlify.app/playground
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@Conaclos Conaclos changed the title feat(rome_js_analyze): noSequences feat(rome_js_analyze): noSequences Dec 8, 2022
@xunilrj
Copy link
Contributor

xunilrj commented Dec 9, 2022

Nice! Thanks.
Given that our node is named JsSequenceExpression I would keep the noSequences. Although I am not sure about the plural now.

Copy link
Contributor

@leops leops left a comment

Choose a reason for hiding this comment

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

I personally think we should rename the rule to noCommaOperator since "sequence" is used internally as the name of the AST node but may not be clear to the end-user (this can be seen in the documentation for the ESLint rule using the name "comma operator" more prominently than the term "sequence")

@Conaclos Conaclos changed the title feat(rome_js_analyze): noSequences feat(rome_js_analyze): noComaOperator Dec 12, 2022
@Conaclos Conaclos changed the title feat(rome_js_analyze): noComaOperator feat(rome_js_analyze): noCommaOperator Dec 12, 2022
@Conaclos Conaclos requested review from leops and removed request for ematipico December 13, 2022 11:42
@MichaReiser MichaReiser merged commit ed01c0e into rome:main Dec 15, 2022
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.

📎 Implement ESLint's rule no-sequences
4 participants