Skip to content

fix(lines-before-block): move start-of-block checking behind off-by-default checkBlockStarts option#1341

Merged
brettz9 merged 1 commit intogajus:mainfrom
JoshuaKGoldberg:lines-before-block-check-block-starts
Nov 26, 2024
Merged

fix(lines-before-block): move start-of-block checking behind off-by-default checkBlockStarts option#1341
brettz9 merged 1 commit intogajus:mainfrom
JoshuaKGoldberg:lines-before-block-check-block-starts

Conversation

@JoshuaKGoldberg
Copy link
Copy Markdown
Contributor

@JoshuaKGoldberg JoshuaKGoldberg commented Nov 26, 2024

Fixes #1296.

Intentionally phrased as a fix rather than a feat because IMO reporting on JSDoc blocks at the beginning of a block by default is a bug. But this does add a feature by way of the new option... 🤷

I don't love the name checkBlockStarts. But I couldn't think of anything better.

Doesn't handle array starts ([\n/** ... */]) because that wasn't requested in any issue. I suppose that could be another option? I propose leaving that as a followup.

@JoshuaKGoldberg JoshuaKGoldberg force-pushed the lines-before-block-check-block-starts branch from 0747a53 to 33401b5 Compare November 26, 2024 01:21
@brettz9 brettz9 merged commit f9b102d into gajus:main Nov 26, 2024
@github-actions
Copy link
Copy Markdown

🎉 This issue has been resolved in version 50.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@brettz9
Copy link
Copy Markdown
Collaborator

brettz9 commented Nov 26, 2024

Thanks for the PR! I switched it to a feat change just to be a little safer...

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.

Options for lines-before-block to ignore the beginning of a class, function or other block

2 participants