Skip to content

Commit 7be12eb

Browse files
authored
chore: add migration guide from eslint-plugin-svelte3 (#280)
1 parent b8e968e commit 7be12eb

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

docs/migration.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Migration Guide
22

3+
## From `eslint-plugin-svelte3`
4+
5+
You can not use both `eslint-plugin-svelte3` and `eslint-plugin-svelte` at same time.
6+
So before start to use this plugin, you need to remove `eslint-plugin-svelte3`'s stuff from both `package.json` and `.eslintrc.*`.
7+
8+
> Note: If you want to know difference between `eslint-plugin-svelte` and `eslint-plugin-svelte3`, Please read the [reason](../#why).
9+
10+
> Note: If you're using TypeScript, maybe you get `Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.` error at some configuration files.<br>In this case, please refer [this GitHub comment](https://github.com/typescript-eslint/typescript-eslint/issues/1723#issuecomment-626766041) to solve it.
11+
312
## From `eslint-plugin-svelte` v1 To v2
413

514
`eslint-plugin-svelte` v1 was an alias for [eslint-plugin-svelte3], but `eslint-plugin-svelte` v2 is now an independent eslint-plugin.
@@ -10,19 +19,19 @@ If you want the previous behavior, replace it with [eslint-plugin-svelte3].
1019

1120
## From `@ota-meshi/eslint-plugin-svelte`
1221

13-
`@ota-meshi/eslint-plugin-svelte` has been renamed to `eslint-plugin-svelte`.
22+
`@ota-meshi/eslint-plugin-svelte` has been renamed to `eslint-plugin-svelte`.\
1423
Therefore, you need to replace the package name, and the presets, rules, and settings specified in the configuration.
1524

16-
- `package.json`
25+
- `package.json`\
1726
Replace the package name.
1827

1928
```diff
2029
- "@ota-meshi/eslint-plugin-svelte": "^0.X.X"
2130
+ "eslint-plugin-svelte": "^X.X.X"
2231
```
2332

24-
- `.eslintrc.*`
25-
Replace `@ota-meshi/svelte` with `svelte` as a string.
33+
- `.eslintrc.*`\
34+
Replace `@ota-meshi/svelte` with `svelte` as a string.\
2635
Examples:
2736

2837
- Presets

0 commit comments

Comments
 (0)