Skip to content

Conversation

@calda
Copy link
Member

@calda calda commented Dec 2, 2025

Inspired by #339, this PR adds linting and auto-formatting for our README.md.

I couldn't find a good Markdown auto-formatter in the Ruby ecosystem. Claude suggested using prettier via npx. This adds a dependency on Node, but at least installing Node is really easy (brew install node).

The changes all seem like great improvements.

@calda calda requested a review from bachand December 2, 2025 03:10
@calda
Copy link
Member Author

calda commented Dec 2, 2025

@bachand, this fixed this markdown rendering issue in some <details> blocks on the site!

Before

image

After

image

Copy link
Contributor

@bachand bachand left a comment

Choose a reason for hiding this comment

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

This is so great! Thanks @calda .

README.md Outdated
@@ -527,7 +530,7 @@ _You can enable the following settings in Xcode by running [this script](resourc

</details>

* <a id='trailing-commas'></a>(<a href='#trailing-commas'>link</a>) **Add a trailing comma after the last element of multi-line, multi-element comma-separated lists.* This includes arrays, dictionaries, function declarations, function calls, etc. Don't include a trailing comma if the list spans only a single line, or contains only a single element. [![SwiftFormat: trailingCommas](https://img.shields.io/badge/SwiftFormat-trailingCommas-7B0051.svg)](https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#trailingCommas)
- <a id='trailing-commas'></a>(<a href='#trailing-commas'>link</a>) \*_Add a trailing comma after the last element of multi-line, multi-element comma-separated lists._ This includes arrays, dictionaries, function declarations, function calls, etc. Don't include a trailing comma if the list spans only a single line, or contains only a single element. [![SwiftFormat: trailingCommas](https://img.shields.io/badge/SwiftFormat-trailingCommas-7B0051.svg)](https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#trailingCommas)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- <a id='trailing-commas'></a>(<a href='#trailing-commas'>link</a>) \*_Add a trailing comma after the last element of multi-line, multi-element comma-separated lists._ This includes arrays, dictionaries, function declarations, function calls, etc. Don't include a trailing comma if the list spans only a single line, or contains only a single element. [![SwiftFormat: trailingCommas](https://img.shields.io/badge/SwiftFormat-trailingCommas-7B0051.svg)](https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#trailingCommas)
- <a id='trailing-commas'></a>(<a href='#trailing-commas'>link</a>) **Add a trailing comma after the last element of multi-line, multi-element comma-separated lists.** This includes arrays, dictionaries, function declarations, function calls, etc. Don't include a trailing comma if the list spans only a single line, or contains only a single element. [![SwiftFormat: trailingCommas](https://img.shields.io/badge/SwiftFormat-trailingCommas-7B0051.svg)](https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#trailingCommas)

I think that this better matches the intention.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yeah thanks for catching, this was broken from the missing trailing *

image

@@ -3381,7 +3397,6 @@ _You can enable the following settings in Xcode by running [this script](resourc
Most classes are never overridden, and composition is generally preferred over inheritance.

If a class does need to be subclassed, use one of these approaches to indicate to the linter that the class should not be marked `final`:

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice fix!

- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v4
Copy link
Contributor

Choose a reason for hiding this comment

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

So easy!

@calda calda force-pushed the cal--format-markdown branch from 5a3a66b to 57aadef Compare December 4, 2025 17:52
@calda calda force-pushed the cal--format-markdown branch from 7ee1b26 to 7fb972a Compare December 4, 2025 18:01
@calda calda enabled auto-merge (squash) December 4, 2025 18:02
@calda calda merged commit 794fb6f into master Dec 4, 2025
6 checks passed
@calda calda deleted the cal--format-markdown branch December 4, 2025 18:08
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.

3 participants