Skip to content

Commit 4b00cf0

Browse files
committed
update
1 parent 01f686a commit 4b00cf0

15 files changed

+61
-23
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ export default [
9696
This plugin provides configs:
9797

9898
- `eslintPluginSvelte.configs.base` ... Configuration to enable correct Svelte parsing.
99-
- `eslintPluginSvelte.configs.recommended` ... Above, plus rules to prevent errors or unintended behavior.
99+
- `eslintPluginSvelte.configs.recommended` ... Base configuration recommended with rules for Svelte 5.
100+
- `eslintPluginSvelte.configs.recommended_svelte5_without_legacy` ... Base configuration with recommended rules for Svelte 5, excluding legacy compatibility (e.g. `$:` label).
101+
- `eslintPluginSvelte.configs.recommended_svelte3_4` ... Base configuration with recommended rules for Svelte 3 and 4.
100102
- `eslintPluginSvelte.configs.prettier` ... Turns off rules that may conflict with [Prettier](https://prettier.io/) (You still need to configure prettier to work with svelte yourself, for example by using [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte).).
101103
- `eslintPluginSvelte.configs.all` ... All rules. This configuration is not recommended for production use because it changes with every minor and major version of `eslint-plugin-svelte`. Use it at your own risk.
102104

@@ -305,8 +307,8 @@ Example **.vscode/settings.json**:
305307
: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.
306308
: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).
307309
:white_check_mark: Indicates that the rule is included in the `plugin:svelte/recommended` config.
308-
:star: Indicates that the rule is included in the `plugin:svelte/recommended-svelte5-without-legacy` config.
309-
:classical_building: Indicates that the rule is included in the `plugin:svelte/recommended-svelte3-4` config.
310+
:star: Indicates that the rule is included in the `plugin:svelte/recommended_svelte5_without_legacy` config.
311+
:classical_building: Indicates that the rule is included in the `plugin:svelte/recommended_svelte3_4` config.
310312

311313
<!--RULES_TABLE_START-->
312314

docs/rules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ sidebarDepth: 0
77
: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.
88
: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
:white_check_mark: Indicates that the rule is included in the `plugin:svelte/recommended` config.
10-
:star: Indicates that the rule is included in the `plugin:svelte/recommended-svelte5-without-legacy` config.
11-
:classical_building: Indicates that the rule is included in the `plugin:svelte/recommended-svelte3-4` config.
10+
:star: Indicates that the rule is included in the `plugin:svelte/recommended_svelte5_without_legacy` config.
11+
:classical_building: Indicates that the rule is included in the `plugin:svelte/recommended_svelte3_4` config.
1212

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

docs/rules/comment-directive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ since: 'v0.0.13'
1010

1111
> support comment-directives in HTML template
1212
13-
- :gear: This rule is included in all of `"plugin:svelte/base"`, `"plugin:svelte/recommended"`, `"plugin:svelte/recommended-svelte5-without-legacy"` and `"plugin:svelte/recommended-svelte3-4"` configuration.
13+
- :gear: This rule is included in all of `"plugin:svelte/base"`, `"plugin:svelte/recommended"`, `"plugin:svelte/recommended_svelte5_without_legacy"` and `"plugin:svelte/recommended_svelte3_4"` configuration.
1414

1515
Sole purpose of this rule is to provide `eslint-disable` functionality in the template HTML.
1616
It supports usage of the following comments:

docs/rules/system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ since: 'v0.0.13'
1010

1111
> system rule for working this plugin
1212
13-
- :gear: This rule is included in all of `"plugin:svelte/base"`, `"plugin:svelte/recommended"`, `"plugin:svelte/recommended-svelte5-without-legacy"` and `"plugin:svelte/recommended-svelte3-4"` configuration.
13+
- :gear: This rule is included in all of `"plugin:svelte/base"`, `"plugin:svelte/recommended"`, `"plugin:svelte/recommended_svelte5_without_legacy"` and `"plugin:svelte/recommended_svelte3_4"` configuration.
1414

1515
## :book: Rule Details
1616

docs/user-guide.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ export default [
4646
This plugin provides configs:
4747

4848
- `eslintPluginSvelte.configs.base` ... Configuration to enable correct Svelte parsing.
49-
- `eslintPluginSvelte.configs.recommended` ... Above, plus rules to prevent errors or unintended behavior.
49+
- `eslintPluginSvelte.configs.recommended` ... Base configuration recommended with rules for Svelte 5.
50+
- `eslintPluginSvelte.configs.recommended_svelte5_without_legacy` ... Base configuration with recommended rules for Svelte 5, excluding legacy compatibility (e.g. `$:` label).
51+
- `eslintPluginSvelte.configs.recommended_svelte3_4` ... Base configuration with recommended rules for Svelte 3 and 4.
5052
- `eslintPluginSvelte.configs.prettier` ... Turns off rules that may conflict with [Prettier](https://prettier.io/) (You still need to configure prettier to work with svelte yourself, for example by using [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte).).
5153
- `eslintPluginSvelte.configs.all` ... All rules. This configuration is not recommended for production use because it changes with every minor and major version of `eslint-plugin-svelte`. Use it at your own risk.
5254

packages/eslint-plugin-svelte/src/configs/flat/recommended-svelte3-4.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import base from './base.js';
66
const config: Linter.Config[] = [
77
...base,
88
{
9-
name: 'svelte:recommended-svelte3-4:rules',
9+
name: 'svelte:recommended_svelte3_4:rules',
1010
rules: {
1111
// eslint-plugin-svelte rules
1212
'svelte/comment-directive': 'error',

packages/eslint-plugin-svelte/src/configs/flat/recommended-svelte5-without-legacy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import base from './base.js';
66
const config: Linter.Config[] = [
77
...base,
88
{
9-
name: 'svelte:recommended-svelte5-without-legacy:rules',
9+
name: 'svelte:recommended_svelte5_without_legacy:rules',
1010
rules: {
1111
// eslint-plugin-svelte rules
1212
'svelte/comment-directive': 'error',
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// IMPORTANT!
2+
// This file has been automatically generated,
3+
// in order to update its content execute "pnpm run update"
4+
import type { Linter } from 'eslint';
5+
import base from './base.js';
6+
const config: Linter.Config[] = [
7+
...base,
8+
{
9+
name: 'svelte:recommended_svelte3_4:rules',
10+
rules: {
11+
// eslint-plugin-svelte rules
12+
'svelte/comment-directive': 'error',
13+
'svelte/system': 'error'
14+
}
15+
}
16+
];
17+
export default config;
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// IMPORTANT!
2+
// This file has been automatically generated,
3+
// in order to update its content execute "pnpm run update"
4+
import type { Linter } from 'eslint';
5+
import base from './base.js';
6+
const config: Linter.Config[] = [
7+
...base,
8+
{
9+
name: 'svelte:recommended_svelte5_without_legacy:rules',
10+
rules: {
11+
// eslint-plugin-svelte rules
12+
'svelte/comment-directive': 'error',
13+
'svelte/system': 'error'
14+
}
15+
}
16+
];
17+
export default config;

packages/eslint-plugin-svelte/src/rules/comment-directive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export default createRule('comment-directive', {
3535
configNames: [
3636
'base',
3737
'recommended',
38-
'recommended-svelte5-without-legacy',
39-
'recommended-svelte3-4'
38+
'recommended_svelte5_without_legacy',
39+
'recommended_svelte3_4'
4040
]
4141
},
4242
schema: [

0 commit comments

Comments
 (0)