Skip to content

Commit a51e8c7

Browse files
authored
chore: use \ notation for line breaks in *.md (#1215)
1 parent 9ed51a7 commit a51e8c7

24 files changed

+48
-42
lines changed

.editorconfig

+6
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ end_of_line = lf
55
indent_size = 2
66
indent_style = tab
77
trim_trailing_whitespace = true
8+
9+
[docs/rules/no-trailing-spaces.md]
10+
trim_trailing_whitespace = false
11+
12+
[packages/eslint-plugin-svelte/tests/fixtures/**/*-input.svelte]
13+
trim_trailing_whitespace = false

.github/ISSUE_TEMPLATE/bug_report.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ body:
6868
attributes:
6969
label: Link to **GitHub Repo** with Minimal Reproducible Example
7070
description: |
71-
Create a minimal reproduction of the problem. **A minimal reproduction is required** so that others can help debug your issue. If a report is vague (e.g. just a generic error message) and has no reproduction, it may be closed.
72-
[Why Reproductions are Required](https://antfu.me/posts/why-reproductions-are-required)
71+
Create a minimal reproduction of the problem. **A minimal reproduction is required** so that others can help debug your issue. If a report is vague (e.g. just a generic error message) and has no reproduction, it may be closed.\
72+
[Why Reproductions are Required](https://antfu.me/posts/why-reproductions-are-required)\
7373
74-
Be sure to share the repo on GitHub. GitHub's repo is ready to debug using Codespace.
75-
Please DON'T USE non-GitHub repos such as GitLab as repro.
76-
It takes me a long time to prepare my local PC for debugging.
77-
Please DON'T USE stackblitz as a repro.
74+
Be sure to share the repo on GitHub. GitHub's repo is ready to debug using Codespace.\
75+
Please DON'T USE non-GitHub repos such as GitLab as repro.\
76+
It takes me a long time to prepare my local PC for debugging.\
77+
Please DON'T USE stackblitz as a repro.\
7878
We can't debug eslint with stackblitz.
7979
placeholder: |
8080
https://github.com/[your]/[repo]

.github/ISSUE_TEMPLATE/feature_request.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ body:
77
attributes:
88
label: Description
99
description: |
10-
A clear and concise description of the new feature.
10+
A clear and concise description of the new feature.\
1111
Also give a few code examples.
1212
validations:
1313
required: true

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Rule tests typically use fixtures. For example, for the `indent` rule, the test
3434
- The `invalid` directory contains test cases where the rule should report errors.
3535
- The `valid` directory contains test cases where no errors are reported.
3636

37-
Fixture input files should be named `*-input.svelte` and are automatically collected.
37+
Fixture input files should be named `*-input.svelte` and are automatically collected.\
3838
If configuration is needed, include a JSON file:
3939

4040
- For a specific test file (e.g., `my-test-input.svelte`), add `my-test-config.json`.
@@ -52,7 +52,7 @@ pnpm run test -- -g indent
5252

5353
Refer to [this Stack Overflow post](https://stackoverflow.com/questions/10832031/how-to-run-a-single-test-with-mocha) for details.
5454

55-
To test a single file (e.g., `my-test-input.svelte`), add a `my-test-config.json` with `{"only": true}`.
55+
To test a single file (e.g., `my-test-input.svelte`), add a `my-test-config.json` with `{"only": true}`.
5656
(Remember to remove `{"only": true}` before submitting a pull request.)
5757

5858
## Preview Docs

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030

3131
## Introduction
3232

33-
`eslint-plugin-svelte` is the official [ESLint](https://eslint.org/) plugin for [Svelte](https://svelte.dev/).
34-
It leverages the AST generated by [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser) to provide custom linting for Svelte.
33+
`eslint-plugin-svelte` is the official [ESLint](https://eslint.org/) plugin for [Svelte](https://svelte.dev/).\
34+
It leverages the AST generated by [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser) to provide custom linting for Svelte.\
3535
Note that `eslint-plugin-svelte` and `svelte-eslint-parser` cannot be used alongside [eslint-plugin-svelte3](https://github.com/sveltejs/eslint-plugin-svelte3).
3636

3737
<!--USAGE_SECTION_START-->
@@ -219,8 +219,8 @@ export default [
219219

220220
## Editor Integrations
221221

222-
**Visual Studio Code**
223-
Install [dbaeumer.vscode-eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint).
222+
**Visual Studio Code**\
223+
Install [dbaeumer.vscode-eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint).\
224224
Configure `.svelte` files in `.vscode/settings.json`:
225225

226226
```json
@@ -247,8 +247,8 @@ This project follows [Semantic Versioning](https://semver.org/). Unlike [ESLint
247247
<!-- prettier-ignore-start -->
248248
<!--RULES_SECTION_START-->
249249

250-
:wrench: Indicates that the rule is fixable, and using `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the reported problems.
251-
:bulb: Indicates that some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
250+
:wrench: Indicates that the rule is fixable, and using `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the reported problems.\
251+
:bulb: Indicates that some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).\
252252
:star: Indicates that the rule is included in the `plugin:svelte/recommended` config.
253253

254254
<!--RULES_TABLE_START-->
@@ -400,7 +400,7 @@ These rules relate to this plugin works:
400400

401401
## Contributing
402402

403-
Contributions are welcome! Please open an issue or submit a PR. For more details, see [CONTRIBUTING.md](./CONTRIBUTING.md).
403+
Contributions are welcome! Please open an issue or submit a PR. For more details, see [CONTRIBUTING.md](./CONTRIBUTING.md).\
404404
Refer to [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser) for AST details.
405405

406406
<!--DOCS_IGNORE_END-->

docs/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: 'eslint-plugin-svelte'
44

55
## Introduction
66

7-
`eslint-plugin-svelte` is the official [ESLint](https://eslint.org/) plugin for [Svelte](https://svelte.dev/).
8-
It leverages the AST generated by [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser) to provide custom linting for Svelte.
7+
`eslint-plugin-svelte` is the official [ESLint](https://eslint.org/) plugin for [Svelte](https://svelte.dev/).\
8+
It leverages the AST generated by [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser) to provide custom linting for Svelte.\
99
Note that `eslint-plugin-svelte` and `svelte-eslint-parser` cannot be used alongside [eslint-plugin-svelte3](https://github.com/sveltejs/eslint-plugin-svelte3).
1010

1111
See [User Guide](./user-guide.md).

docs/migration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Therefore, you need to replace the package name, and the presets, rules, and set
6565

6666
## From `eslint-plugin-svelte` v2 To v3
6767

68-
This section explains the necessary changes when upgrading from `eslint-plugin-svelte` v2 to v3.
68+
This section explains the necessary changes when upgrading from `eslint-plugin-svelte` v2 to v3.\
6969
v3 includes **support for ESLint Flat Config only**, **changes to the recommended rule set**, and other breaking changes.
7070

7171
---

docs/rules.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ sidebarDepth: 0
44

55
# Available Rules
66

7-
:wrench: Indicates that the rule is fixable, and using `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the reported problems.
8-
:bulb: Indicates that some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
7+
:wrench: Indicates that the rule is fixable, and using `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the reported problems.\
8+
:bulb: Indicates that some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).\
99
:star: Indicates that the rule is included in the `plugin:svelte/recommended` config.
1010

1111
<!-- This file is automatically generated in tools/update-docs-rules-index.js, do not change! -->

docs/rules/no-dynamic-slot-name.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ since: 'v0.14.0'
1515

1616
## :book: Rule Details
1717

18-
This rule reports the dynamically specified `<slot>` name.
18+
This rule reports the dynamically specified `<slot>` name.\
1919
Dynamic `<slot>` names are not allowed in Svelte, so you must use static names.
2020

2121
The auto-fix of this rule can be replaced with a static `<slot>` name if the expression given to the `<slot>` name is static and resolvable.

docs/rules/no-extra-reactive-curlies.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Nothing.
3838

3939
## :heart: Compatibility
4040

41-
This rule was taken from [@tivac/eslint-plugin-svelte].
41+
This rule was taken from [@tivac/eslint-plugin-svelte].\
4242
This rule is compatible with `@tivac/svelte/reactive-curlies` rule.
4343

4444
[@tivac/eslint-plugin-svelte]: https://github.com/tivac/eslint-plugin-svelte/

docs/rules/no-inner-declarations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ since: 'v0.0.8'
1616

1717
This rule requires that function declarations and, optionally, variable declarations be in the root of a program or the body of a function.
1818

19-
This rule extends the base ESLint's [no-inner-declarations] rule. The AST generated by [svelte-eslint-parser] will false positives in [no-inner-declarations] rule because the root node of the script is not the `Program`.
19+
This rule extends the base ESLint's [no-inner-declarations] rule. The AST generated by [svelte-eslint-parser] will false positives in [no-inner-declarations] rule because the root node of the script is not the `Program`.\
2020
This rule supports [svelte-eslint-parser]'s AST.
2121

2222
[svelte-eslint-parser]: https://github.com/sveltejs/svelte-eslint-parser

docs/rules/no-not-function-handler.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ since: 'v0.5.0'
1414

1515
## :book: Rule Details
1616

17-
This rule reports where you used not function value in event handlers.
17+
This rule reports where you used not function value in event handlers.\
1818
If you use a non-function value for the event handler, it event handler will not be called. It's almost always a mistake. You may have written a lot of unnecessary curly braces.
1919

2020
<!--eslint-skip-->

docs/rules/no-object-in-text-mustaches.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ since: 'v0.5.0'
1414

1515
## :book: Rule Details
1616

17-
This rule disallows the use of objects in text mustache interpolation.
17+
This rule disallows the use of objects in text mustache interpolation.\
1818
When you use an object for text interpolation, it is drawn as `[object Object]`. It's almost always a mistake. You may have written a lot of unnecessary curly braces.
1919

2020
<!--eslint-skip-->

docs/rules/no-reactive-functions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Nothing
4747

4848
## :heart: Compatibility
4949

50-
This rule was taken from [@tivac/eslint-plugin-svelte].
50+
This rule was taken from [@tivac/eslint-plugin-svelte].\
5151
This rule is compatible with `@tivac/svelte/reactive-functions` rule.
5252

5353
[@tivac/eslint-plugin-svelte]: https://github.com/tivac/eslint-plugin-svelte/

docs/rules/no-reactive-literals.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Nothing.
3636

3737
## :heart: Compatibility
3838

39-
This rule was taken from [@tivac/eslint-plugin-svelte].
39+
This rule was taken from [@tivac/eslint-plugin-svelte].\
4040
This rule is compatible with `@tivac/svelte/reactive-literals` rule.
4141

4242
[@tivac/eslint-plugin-svelte]: https://github.com/tivac/eslint-plugin-svelte/

docs/rules/no-unused-props.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ since: 'v3.2.0'
1414

1515
## :book: Rule Details
1616

17-
This rule reports properties that are defined in Props but never used in the component code.
17+
This rule reports properties that are defined in Props but never used in the component code.\
1818
It helps to detect dead code and improve component clarity by ensuring that every declared prop is utilized.
1919

2020
This rule checks various usage patterns of props:

docs/rules/no-useless-mustaches.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ since: 'v0.0.4'
1515

1616
## :book: Rule Details
1717

18-
This rule reports mustache interpolation with a string literal value.
18+
This rule reports mustache interpolation with a string literal value.\
1919
The mustache interpolation with a string literal value can be changed to a static contents.
2020

2121
<!--eslint-skip-->

docs/rules/prefer-destructured-store-props.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Nothing
4343

4444
## :heart: Compatibility
4545

46-
This rule was taken from [@tivac/eslint-plugin-svelte].
46+
This rule was taken from [@tivac/eslint-plugin-svelte].\
4747
This rule is compatible with `@tivac/svelte/store-prop-destructuring` rule.
4848

4949
[@tivac/eslint-plugin-svelte]: https://github.com/tivac/eslint-plugin-svelte/

docs/rules/require-optimized-style-attribute.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ since: 'v0.32.0'
1414

1515
This rule reports `style` attributes written in a format that cannot be optimized.
1616

17-
Svelte parses the content written in the style attribute and tries to optimize it. (See [https://github.com/sveltejs/svelte/pull/810](https://github.com/sveltejs/svelte/pull/810))
17+
Svelte parses the content written in the style attribute and tries to optimize it. (See [https://github.com/sveltejs/svelte/pull/810](https://github.com/sveltejs/svelte/pull/810))\
1818
If Svelte can be successfully optimized, Svelte can minimize the number of re-renders.
1919

2020
e.g.

docs/rules/require-store-reactive-access.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ since: 'v2.12.0'
1515

1616
## :book: Rule Details
1717

18-
This rule disallow to use of the store itself as an operand.
18+
This rule disallow to use of the store itself as an operand.\
1919
You should access the store value using the `$` prefix or the `get` function.
2020

2121
<!--eslint-skip-->
@@ -58,7 +58,7 @@ You should access the store value using the `$` prefix or the `get` function.
5858
<MyComponent {...storeValue} />
5959
```
6060

61-
This rule checks the usage of store variables only if the store can be determined within a single file.
61+
This rule checks the usage of store variables only if the store can be determined within a single file.
6262
However, when using `@typescript-eslint/parser` and full type information, this rule uses the type information to determine if the expression is a store.
6363

6464
<!--eslint-skip-->

docs/rules/require-stores-init.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Nothing.
3838

3939
## :heart: Compatibility
4040

41-
This rule was taken from [@tivac/eslint-plugin-svelte].
41+
This rule was taken from [@tivac/eslint-plugin-svelte].\
4242
This rule is compatible with `@tivac/svelte/stores-initial-value` rule.
4343

4444
[@tivac/eslint-plugin-svelte]: https://github.com/tivac/eslint-plugin-svelte/

docs/rules/sort-attributes.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ since: 'v2.4.0'
1414

1515
## :book: Rule Details
1616

17-
This rule aims to enforce ordering of attributes.
17+
This rule aims to enforce ordering of attributes.\
1818
The default order is:
1919

2020
- `this` property.
@@ -175,8 +175,8 @@ If there is a spread attribute between the attributes, it will not be reported a
175175
- `"alphabetical"` ... Sorts the attributes of the same group in alphabetical order.
176176
- `"ignore"` ... Attributes in the same group are not sorted.
177177

178-
Note that the behavior may change depending on how you specify the `order` setting.
179-
For example, `bind:value` and `on:input={() => console.log(value)}` behave differently depending on the order. See <https://svelte.dev/docs#template-syntax-element-directives-bind-property> for details.
178+
Note that the behavior may change depending on how you specify the `order` setting.\
179+
For example, `bind:value` and `on:input={() => console.log(value)}` behave differently depending on the order. See <https://svelte.dev/docs#template-syntax-element-directives-bind-property> for details.\
180180
By default it is designed to be sorted safely.
181181

182182
You can use the following formats for names or patterns:

docs/user-guide.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ export default [
184184

185185
## Editor Integrations
186186

187-
**Visual Studio Code**
188-
Install [dbaeumer.vscode-eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint).
187+
**Visual Studio Code**\
188+
Install [dbaeumer.vscode-eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint).\
189189
Configure `.svelte` files in `.vscode/settings.json`:
190190

191191
```json

packages/eslint-plugin-svelte/tools/update-docs-rules-index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ sidebarDepth: 0
1414
1515
# Available Rules
1616
17-
:wrench: Indicates that the rule is fixable, and using \`--fix\` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the reported problems.
18-
:bulb: Indicates that some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
17+
:wrench: Indicates that the rule is fixable, and using \`--fix\` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the reported problems.\\
18+
:bulb: Indicates that some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).\\
1919
:star: Indicates that the rule is included in the \`plugin:svelte/recommended\` config.
2020
2121
<!-- This file is automatically generated in tools/update-docs-rules-index.js, do not change! -->

0 commit comments

Comments
 (0)