Skip to content

ESLint: enforce trailing commas and html indentation#2125

Open
MetRonnie wants to merge 4 commits intocylc:masterfrom
MetRonnie:eslint
Open

ESLint: enforce trailing commas and html indentation#2125
MetRonnie wants to merge 4 commits intocylc:masterfrom
MetRonnie:eslint

Conversation

@MetRonnie
Copy link
Member

Enough is enough 😄

See also #1536

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Tests, changelog and docs not needed
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@oliver-sanders
Copy link
Member

Enforcing trailing commas is perhaps a little funky, but whatevs.

Perhaps wait until we've flushed out the PR backlog and retry?

@MetRonnie
Copy link
Member Author

Enforcing trailing commas is perhaps a little funky, but whatevs.

We are already enforcing dangling commas in JavaScript file, this extends it to Vue SFCs. (As ESLint is a formatter, editors can be set up to automatically do this on save, or by eslint --fix)

@oliver-sanders
Copy link
Member

We are already enforcing dangling commas in JavaScript file

Wow, hadn't even noticed?! But I may just be doing this anyway.

@MetRonnie
Copy link
Member Author

MetRonnie commented Jan 13, 2026

Ah no I was wrong, before we were merely allowing dangling commas when on multiline arrays and objects (but if a trailing comma was left on a non-multiline array/object, the formatter would strip it). Now I've set it to enforce for multiline arrays/objects so that if a trailing comma is missing from a multiline array/object the formatter will add it (non-multiline dangling commas will still be stripped. This should make life easier as you can add entries to multiline arrays/objects without having to fiddle with missing dangling commas on the line above.

@MetRonnie
Copy link
Member Author

MetRonnie commented Jan 22, 2026

Perhaps wait until we've flushed out the PR backlog and retry?

So wait until 5 years time? 😅

Just force-pushed again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants