Skip to content

test/eslint: enable rule: comma-dangle#1692

Merged
alxndrsn merged 3 commits intogetodk:nextfrom
alxndrsn:eslint-comma-dangle
Mar 25, 2026
Merged

test/eslint: enable rule: comma-dangle#1692
alxndrsn merged 3 commits intogetodk:nextfrom
alxndrsn:eslint-comma-dangle

Conversation

@alxndrsn
Copy link
Copy Markdown
Contributor

@alxndrsn alxndrsn commented Mar 15, 2026

Including trailing commas in multiline arrays simplifies git diffs over time, which eases understanding of changes & code history.

This commit also resolves existing violations.

What has been done to verify that this works as intended?

  • ran locally
  • CI

Why is this the best possible solution? Were any other approaches considered?

Including trailing commas in multiline arrays simplifies git diffs over time, which eases understanding of changes & code history.

An alternative might be to add eslint-ignore directives to existing violations, but these are noisy in their own way.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Does this change require updates to documentation? If so, please file an issue here and include the link below.

Before submitting this PR, please make sure you have:

  • branched off and targeted the next branch OR only changed documentation/infrastructure (master is stable and used in production)
  • verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced

Including trailing commas in multiline arrays simplifies git diffs over time, which eases understanding of changes & code history.

This commit also resolves existing violations.
@alxndrsn alxndrsn marked this pull request as ready for review March 15, 2026 06:29
Copy link
Copy Markdown
Member

@matthew-white matthew-white left a comment

Choose a reason for hiding this comment

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

We're a bit inconsistent on this comma-dangle rule. In Frontend, it's set to only-multiline, while in Backend, it's turned off completely. In general, I feel like consistency across codebases on this rule would be nice (whether changing central to match Frontend or changing Frontend to match central). At the same time, I feel like always-multiline makes a lot of sense in the context of testing, where you often have lists of test cases that change over time. I've seen most others on the team use dangling commas at some point or another, so I don't feel like anyone would object to this rule being applied to tests here.

@alxndrsn alxndrsn merged commit a0e9fc1 into getodk:next Mar 25, 2026
5 checks passed
@alxndrsn alxndrsn deleted the eslint-comma-dangle branch March 25, 2026 12:34
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