Skip to content

eslint: require trailing comma on multiline objects and arrays #1110

Merged
outdooracorn merged 1 commit into
mainfrom
eslint-comma-dangle
Mar 27, 2026
Merged

eslint: require trailing comma on multiline objects and arrays #1110
outdooracorn merged 1 commit into
mainfrom
eslint-comma-dangle

Conversation

@outdooracorn
Copy link
Copy Markdown
Member

@outdooracorn outdooracorn commented Mar 20, 2026

This is beneficial for the following reasons:

  • improves clarity of diffs when an item is added or removed from an object or array
  • reduces the chances of having merge conflicts, since only the lines you are modifying are touched
  • simplifies adding and removing items to objects and arrays, since only the lines you are modifying must be touched

Bug: T420768

@github-actions
Copy link
Copy Markdown

Deployment previews on netlify for branch refs/pull/1110/merge will be at the following locations (when build is done):

@outdooracorn
Copy link
Copy Markdown
Member Author

Keeping as WIP until #1108 is merged

@outdooracorn outdooracorn self-assigned this Mar 20, 2026
@outdooracorn outdooracorn marked this pull request as ready for review March 25, 2026 15:20
@outdooracorn
Copy link
Copy Markdown
Member Author

Ready for review now rebased on main

@outdooracorn outdooracorn requested review from rosalieper and tarrow and removed request for tarrow March 25, 2026 15:20
This is benefitial for the following reasons:

  * improves clarity of diffs when an item is added or removed from an object or array
  * reduces the chances of having merge conficts, since only the lines you are modifying are touched
  * simplifies adding and removing items to objects and arrays, since only the lines you are modifying must be touched
Comment thread tests/e2e/pageobjects/discovery.page.js
@tarrow
Copy link
Copy Markdown
Contributor

tarrow commented Mar 27, 2026

Replicated steps to lint it and looks good to me. I'm also keen on this idea for the reasons mentioned in the PR

@outdooracorn outdooracorn merged commit 2d6044d into main Mar 27, 2026
7 checks passed
@outdooracorn outdooracorn deleted the eslint-comma-dangle branch March 27, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants