10000 chore: use `\` notation for line breaks in `*.md` by ota-meshi · Pull Request #1215 · sveltejs/eslint-plugin-svelte · GitHub
[go: up one dir, main page]

Skip to content

chore: use \ notation for line breaks in *.md #1215

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

Merged
merged 1 commit into from
May 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ end_of_line = lf
indent_size = 2
indent_style = tab
trim_trailing_whitespace = true

[docs/rules/no-trailing-spaces.md]
trim_trailing_whitespace = false

[packages/eslint-plugin-svelte/tests/fixtures/**/*-input.svelte]
trim_trailing_whitespace = false
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ body:
attributes:
label: Link to **GitHub Repo** with Minimal Reproducible Example
description: |
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.
[Why Reproductions are Required](https://antfu.me/posts/why-reproductions-are-required)
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.\
[Why Reproductions are Required](https://antfu.me/posts/why-reproductions-are-required)\

Be sure to share the repo on GitHub. GitHub's repo is ready to debug using Codespace.
Please DON'T USE non-GitHub repos such as GitLab as repro.
It takes me a long time to prepare my local PC for debugging.
Please DON'T USE stackblitz as a repro.
Be sure to share the repo on GitHub. GitHub's repo is ready to debug using Codespace.\
Please DON'T USE non-GitHub repos such as GitLab as repro.\
It takes me a long time to prepare my local PC for debugging.\
Please DON'T USE stackblitz as a repro.\
We can't debug eslint with stackblitz.
placeholder: |
https://github.com/[your]/[repo]
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
attributes:
label: Description
description: |
A clear and concise description of the new feature.
A clear and concise description of the new feature.\
Also give a few code examples.
validations:
required: true
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Rule tests typically use fixtures. For example, for the `indent` rule, the test
- The `invalid` directory contains test cases where the rule should report errors.
- The `valid` directory contains test cases where no errors are reported.

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

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

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

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

## Preview Docs
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

## Introduction

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

<!--USAGE_SECTION_START-->
Expand Down Expand Up @@ -219,8 +219,8 @@ export default [

## Editor Integrations

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

```json
Expand All @@ -247,8 +247,8 @@ This project follows [Semantic Versioning](https://semver.org/). Unlike [ESLint
<!-- prettier-ignor 6D4E e-start -->
<!--RULES_SECTION_START-->

: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.
: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).
: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.\
: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).\
:star: Indicates that the rule is included in the `plugin:svelte/recommended` config.

<!--RULES_TABLE_START-->
Expand Down Expand Up @@ -400,7 +400,7 @@ These rules relate to this plugin works:

## Contributing

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

<!--DOCS_IGNORE_END-->
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: 'eslint-plugin-svelte'

## Introduction

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

See [User Guide](./user-guide.md).
Expand Down
2 changes: 1 addition & 1 deletion docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Therefore, you need to replace the package name, and the presets, rules, and set

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

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

---
Expand Down
4 changes: 2 additions & 2 deletions docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ sidebarDepth: 0

# Available Rules

: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.
: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).
: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.\
: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).\
:star: Indicates that the rule is included in the `plugin:svelte/recommended` config.

<!-- This file is automatically generated in tools/update-docs-rules-index.js, do not change! -->
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-dynamic-slot-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ since: 'v0.14.0'

## :book: Rule Details

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

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.
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-extra-reactive-curlies.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Nothing.

## :heart: Compatibility

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

[@tivac/eslint-plugin-svelte]: https://github.com/tivac/eslint-plugin-svelte/
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-inner-declarations.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ since: 'v0.0.8'

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

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`.
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`.\
This rule supports [svelte-eslint-parser]'s AST.

[svelte-eslint-parser]: https://github.com/sveltejs/svelte-eslint-parser
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-not-function-handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ since: 'v0.5.0'

## :book: Rule Details

This rule reports where you used not function value in event handlers.
This rule reports where you used not function value in event handlers.\
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.

<!--eslint-skip-->
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-object-in-text-mustaches.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ since: 'v0.5.0'

## :book: Rule Details

This rule disallows the use of objects in text mustache interpolation.
This rule disallows the use of objects in text mustache interpolation.\
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.

<!--eslint-skip-->
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-reactive-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Nothing

## :heart: Compatibility

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

[@tivac/eslint-plugin-svelte]: https://github.com/tivac/eslint-plugin-svelte/
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-reactive-literals.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Nothing.

## :heart: Compatibility

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

[@tivac/eslint-plugin-svelte]: https://github.com/tivac/eslint-plugin-svelte/
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-unused-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ since: 'v3.2.0'

## :book: Rule Details

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

This rule checks various usage patterns of props:
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-useless-mustaches.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ since: 'v0.0.4'

## :book: Rule Details

This rule reports mustache interpolation with a string literal value.
This rule reports mustache interpolation with a string literal value.\
The mustache interpolation with a string literal value can be changed to a static contents.

<!--eslint-skip-->
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/prefer-destructured-store-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Nothing

## :heart: Compatibility

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

[@tivac/eslint-plugin-svelte]: https://github.com/tivac/eslint-plugin-svelte/
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/require-optimized-style-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ since: 'v0.32.0'

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

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))
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))\
If Svelte can be successfully optimized, Svelte can minimize the number of re-renders.

e.g.
Expand Down
4 changes: 2 additions & 2 deletions docs/rules/require-store-reactive-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ since: 'v2.12.0'

## :book: Rule Details

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

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

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

<!--eslint-skip-->
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/require-stores-init.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Nothing.

## :heart: Compatibility

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

[@tivac/eslint-plugin-svelte]: https://github.com/tivac/eslint-plugin-svelte/
Expand Down
6 changes: 3 additions & 3 deletions docs/rules/sort-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ since: 'v2.4.0'

## :book: Rule Details

This rule aims to enforce ordering of attributes.
This rule aims to enforce ordering of attributes.\
The default order is:

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

Note that the behavior may change depending on how you specify the `order` setting.
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.
Note that the behavior may change depending on how you specify the `order` setting.\
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.\
By default it is designed to be sorted safely.

You can use the following formats for names or patterns:
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ export default [

## Editor Integrations

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

```json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ sidebarDepth: 0

# Available Rules

: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.
: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).
: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.\\
: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).\\
:star: Indicates that the rule is included in the \`plugin:svelte/recommended\` config.

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