Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(html-closing-bracket-new-line): add rule #870

Merged

Conversation

mikededo
Copy link
Contributor

Adds the svelte/html-closing-bracket-newline rule, which enforces that HTML
tags must have a newline (or not) after the closing bracket. This rule is
inspired by vue/html-closing-bracket-newline, and is implemented ensuring
what's discussed in #590.

Closes #590.

Copy link

changeset-bot bot commented Oct 10, 2024

⚠️ No Changeset found

Latest commit: 157d6be

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR


## :wrench: Options

```jsonc
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ota-meshi, jsonc feels like the right lang to use, does it have any issue with the docs syntax highlighting?

Copy link
Member

Choose a reason for hiding this comment

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

I think the syntax highlighting works fine on our website 👍

@mikededo mikededo force-pushed the feat/add-rule-html-closing-bracket-new-line branch from 8437533 to 157d6be Compare October 10, 2024 16:00
Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

Thank you for this PR! LGTM!

@ota-meshi ota-meshi merged commit b0373be into sveltejs:main Oct 16, 2024
13 checks passed

```jsonc
{
"svelte/brackets-same-line": [
Copy link

Choose a reason for hiding this comment

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

should be svelte/html-closing-bracket-new-line?


```svelte
<script>
/* eslint svelte/brackets-same-line: "error" */
Copy link

Choose a reason for hiding this comment

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

svelte/html-closing-bracket-new-line?

@mikededo
Copy link
Contributor Author

Hey @noy4, I've fixed the docs in #915. Thanks for pointing it out!

ota-meshi pushed a commit that referenced this pull request Nov 15, 2024
Correcting:

- [Comment
1](#870 (comment))
- [Comment
2](#870 (comment))

Thanks to @noy4 for pointing the issues out.
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.

feat: Add svelte/brackets-same-line rule
3 participants