Skip to content

Commit 4b00cf0

Browse files
committed
update
1 parent 01f686a commit 4b00cf0

15 files changed

+61
-23
lines changed

README.md

+5-3
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

+2-2
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

+1-1
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

+1-1
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

+3-1
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

+1-1
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

+1-1
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',
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;
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

+2-2
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: [

packages/eslint-plugin-svelte/src/rules/system.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export default createRule('system', {
1111
configNames: [
1212
'base',
1313
'recommended',
14-
'recommended-svelte5-without-legacy',
15-
'recommended-svelte3-4'
14+
'recommended_svelte5_without_legacy',
15+
'recommended_svelte3_4'
1616
]
1717
},
1818
schema: [],

packages/eslint-plugin-svelte/src/types.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ export type RuleCategory =
4949
export type ConfigName =
5050
| 'base'
5151
| 'recommended'
52-
| 'recommended-svelte5-without-legacy'
53-
| 'recommended-svelte3-4';
52+
| 'recommended_svelte5_without_legacy'
53+
| 'recommended_svelte3_4';
5454

5555
export interface RuleMetaData {
5656
docs: {
@@ -88,7 +88,7 @@ export interface PartialRuleMetaData {
8888
description: string;
8989
configNames:
9090
| Exclude<ConfigName, 'base'>[]
91-
| ['base', 'recommended', 'recommended-svelte5-without-legacy', 'recommended-svelte3-4'];
91+
| ['base', 'recommended', 'recommended_svelte5_without_legacy', 'recommended_svelte3_4'];
9292
extensionRule?:
9393
| string
9494
| {

packages/eslint-plugin-svelte/tools/render-rules.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ function configNamesToEmoji(configNames: ConfigName[]) {
5151
return undefined;
5252
case 'recommended':
5353
return ':white_check_mark:';
54-
case 'recommended-svelte5-without-legacy':
54+
case 'recommended_svelte5_without_legacy':
5555
return ':star:';
56-
case 'recommended-svelte3-4':
56+
case 'recommended_svelte3_4':
5757
return ':classical_building:';
5858
default: {
5959
const _: never = name;

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ sidebarDepth: 0
1717
: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.
1818
: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
:white_check_mark: Indicates that the rule is included in the \`plugin:svelte/recommended\` config.
20-
:star: Indicates that the rule is included in the \`plugin:svelte/recommended-svelte5-without-legacy\` config.
21-
:classical_building: Indicates that the rule is included in the \`plugin:svelte/recommended-svelte3-4\` config.
20+
:star: Indicates that the rule is included in the \`plugin:svelte/recommended_svelte5_without_legacy\` config.
21+
:classical_building: Indicates that the rule is included in the \`plugin:svelte/recommended_svelte3_4\` config.
2222
2323
<!-- This file is automatically generated in tools/update-docs-rules-index.js, do not change! -->
2424
${renderRulesTableContent()}`

packages/eslint-plugin-svelte/tools/update-rulesets.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ void writeAndFormat(baseFilePath, baseContent);
6565

6666
const configNames: ConfigName[] = [
6767
'recommended',
68-
'recommended-svelte3-4',
69-
'recommended-svelte5-without-legacy'
68+
'recommended_svelte3_4',
69+
'recommended_svelte5_without_legacy'
7070
];
7171

7272
for (const configName of configNames) {

0 commit comments

Comments
 (0)