From c223953731c03d94b29a25c9aa8f627b68e748dd Mon Sep 17 00:00:00 2001 From: Yuichiro Yamashita Date: Tue, 20 Sep 2022 16:53:29 +0900 Subject: [PATCH] chore: add migration guide from eslint-plugin-svelte3 --- docs/migration.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/migration.md b/docs/migration.md index 37888ffc8..52a29441c 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -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.
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. @@ -10,10 +19,10 @@ 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 @@ -21,8 +30,8 @@ Therefore, you need to replace the package name, and the presets, rules, and set + "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