Skip to content

chore: add migration guide from eslint-plugin-svelte3 #280

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
Oct 30, 2022
Merged
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
17 changes: 13 additions & 4 deletions docs/migration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Migration Guide

## From `eslint-plugin-svelte3`

You can not use both `eslint-plugin-svelte3` and `eslint-plugin-svelte` at same time.
So before start to use this plugin, you need to remove `eslint-plugin-svelte3`'s stuff from both `package.json` and `.eslintrc.*`.

> Note: If you want to know difference between `eslint-plugin-svelte` and `eslint-plugin-svelte3`, Please read the [reason](../#why).

> 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.

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

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

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

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

- `package.json`
- `package.json`\
Replace the package name.

```diff
- "@ota-meshi/eslint-plugin-svelte": "^0.X.X"
+ "eslint-plugin-svelte": "^X.X.X"
```

- `.eslintrc.*`
Replace `@ota-meshi/svelte` with `svelte` as a string.
- `.eslintrc.*`\
Replace `@ota-meshi/svelte` with `svelte` as a string.\
Examples:

- Presets
Expand Down