Skip to content

Commit

Permalink
fix(html-closing-bracket-newline): run pnpm run update
Browse files Browse the repository at this point in the history
  • Loading branch information
mikededo committed Oct 10, 2024
1 parent e40f893 commit 157d6be
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ These rules relate to style guidelines, and are therefore quite subjective:
|:--------|:------------|:---|
| [svelte/derived-has-same-inputs-outputs](https://sveltejs.github.io/eslint-plugin-svelte/rules/derived-has-same-inputs-outputs/) | derived store should use same variable names between values and callback | |
| [svelte/first-attribute-linebreak](https://sveltejs.github.io/eslint-plugin-svelte/rules/first-attribute-linebreak/) | enforce the location of first attribute | :wrench: |
| [svelte/html-closing-bracket-new-line](https://sveltejs.github.io/eslint-plugin-svelte/rules/html-closing-bracket-new-line/) | require or disallow a line break before tag's closing brackets | :wrench: |
| [svelte/html-closing-bracket-new-line](https://sveltejs.github.io/eslint-plugin-svelte/rules/html-closing-bracket-new-line/) | Require or disallow a line break before tag's closing brackets | :wrench: |
| [svelte/html-closing-bracket-spacing](https://sveltejs.github.io/eslint-plugin-svelte/rules/html-closing-bracket-spacing/) | require or disallow a space before tag's closing brackets | :wrench: |
| [svelte/html-quotes](https://sveltejs.github.io/eslint-plugin-svelte/rules/html-quotes/) | enforce quotes style of HTML attributes | :wrench: |
| [svelte/html-self-closing](https://sveltejs.github.io/eslint-plugin-svelte/rules/html-self-closing/) | enforce self-closing style | :wrench: |
Expand Down
2 changes: 1 addition & 1 deletion docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ These rules relate to style guidelines, and are therefore quite subjective:
| :------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | :------- |
| [svelte/derived-has-same-inputs-outputs](./rules/derived-has-same-inputs-outputs.md) | derived store should use same variable names between values and callback | |
| [svelte/first-attribute-linebreak](./rules/first-attribute-linebreak.md) | enforce the location of first attribute | :wrench: |
| [svelte/html-closing-bracket-new-line](./rules/html-closing-bracket-new-line.md) | require or disallow a line break before tag's closing brackets | :wrench: |
| [svelte/html-closing-bracket-new-line](./rules/html-closing-bracket-new-line.md) | Require or disallow a line break before tag's closing brackets | :wrench: |
| [svelte/html-closing-bracket-spacing](./rules/html-closing-bracket-spacing.md) | require or disallow a space before tag's closing brackets | :wrench: |
| [svelte/html-quotes](./rules/html-quotes.md) | enforce quotes style of HTML attributes | :wrench: |
| [svelte/html-self-closing](./rules/html-self-closing.md) | enforce self-closing style | :wrench: |
Expand Down
26 changes: 16 additions & 10 deletions docs/rules/html-closing-bracket-new-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
pageClass: 'rule-details'
sidebarDepth: 0
title: 'svelte/html-closing-bracket-new-line'
description: "require or disallow a line break before tag's closing brackets"
description: "Require or disallow a line break before tag's closing brackets"
---

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

> require or disallow a line break before tag's closing brackets
> Require or disallow a line break before tag's closing brackets
- :exclamation: <badge text="This rule has not been released yet." vertical="middle" type="error"> **_This rule has not been released yet._** </badge>
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
Expand All @@ -18,6 +18,7 @@ This rule enforces a line break (or no line break) before tag's closing brackets

<ESLintCodeBlock fix>

<!-- prettier-ignore-start -->
<!--eslint-skip-->

```svelte
Expand All @@ -42,31 +43,36 @@ This rule enforces a line break (or no line break) before tag's closing brackets
<div
></div>
<div
<div
multiline>
Children
</div>
<SelfClosing
/>
<SelfClosing
multiline />
multiline/>
```

<!-- prettier-ignore-end -->

</ESLintCodeBlock>

## :wrench: Options

```jsonc
{
"svelte/brackets-same-line": ["error", {
"singleline": "never", // ["never", "always"]
"multiline": "always", // ["never", "always"]
"selfClosingTag": {
"svelte/brackets-same-line": [
"error",
{
"singleline": "never", // ["never", "always"]
"multiline": "always" // ["never", "always"]
"multiline": "always", // ["never", "always"]
"selfClosingTag": {
"singleline": "never", // ["never", "always"]
"multiline": "always" // ["never", "always"]
}
}
}]
]
}
```

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-svelte/src/rule-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface RuleOptions {
*/
'svelte/first-attribute-linebreak'?: Linter.RuleEntry<SvelteFirstAttributeLinebreak>
/**
* require or disallow a line break before tag's closing brackets
* Require or disallow a line break before tag's closing brackets
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/html-closing-bracket-new-line/
*/
'svelte/html-closing-bracket-new-line'?: Linter.RuleEntry<SvelteHtmlClosingBracketNewLine>
Expand Down

0 comments on commit 157d6be

Please sign in to comment.