diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 231a3737..57f4e90d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,10 +30,10 @@ jobs: cache: yarn - name: Use ESLint ${{ matrix.eslint-version }} - run: yarn upgrade eslint@${{ matrix.eslint-version }} + run: yarn upgrade eslint@${{ matrix.eslint-version }} --ignore-engines - name: Install - run: yarn --frozen-lockfile + run: yarn --frozen-lockfile --ignore-engines - name: Test run: yarn mocha diff --git a/README.md b/README.md index fc7e7395..f4d2cb79 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,11 @@ Exactly what does `plugin:prettier/recommended` do? Well, this is what it expand ## `Svelte` support -We recommend to use [`eslint-plugin-svelte`](https://github.com/ota-meshi/eslint-plugin-svelte) instead of [`eslint-plugin-svelte3`](https://github.com/sveltejs/eslint-plugin-svelte3) because `eslint-plugin-svelte` has a correct [`eslint-svelte-parser`](https://github.com/ota-meshi/svelte-eslint-parser) instead of hacking, when use with `eslint-plugin-svelte3`, `eslint-plugin-prettier` will just ignore the text passed by `eslint-plugin-svelte3`, because the text they has been modified. +We recommend to use [`eslint-plugin-svelte`](https://github.com/ota-meshi/eslint-plugin-svelte) instead of [`eslint-plugin-svelte3`](https://github.com/sveltejs/eslint-plugin-svelte3) because `eslint-plugin-svelte` has a correct [`eslint-svelte-parser`](https://github.com/ota-meshi/svelte-eslint-parser) instead of hacking. + +When use with `eslint-plugin-svelte3`, `eslint-plugin-prettier` will just ignore the text passed by `eslint-plugin-svelte3`, because the text has been modified. + +If you still decide to use `eslint-plugin-svelte3`, you'll need to run `prettier --write *.svelte` manually. ## `arrow-body-style` and `prefer-arrow-callback` issue diff --git a/package.json b/package.json index 05f9002d..e830c13c 100644 --- a/package.json +++ b/package.json @@ -48,13 +48,13 @@ "@changesets/changelog-github": "^0.4.5", "@changesets/cli": "^2.23.0", "@graphql-eslint/eslint-plugin": "^2.5.0", - "@ota-meshi/eslint-plugin-svelte": "^0.34.1", "@typescript-eslint/parser": "^5.29.0", "eslint-config-prettier": "^8.5.0", "eslint-mdx": "^1.17.0", "eslint-plugin-eslint-plugin": "^4.3.0", "eslint-plugin-mdx": "^1.17.0", "eslint-plugin-self": "^1.2.1", + "eslint-plugin-svelte": "^2.0.0", "eslint-plugin-utils": "^0.1.0", "graphql": "^16.5.0", "mocha": "^9.2.2", diff --git a/test/fixtures/@ota-meshi/eslint-plugin-svelte/App.svelte b/test/fixtures/eslint-plugin-svelte/App.svelte similarity index 100% rename from test/fixtures/@ota-meshi/eslint-plugin-svelte/App.svelte rename to test/fixtures/eslint-plugin-svelte/App.svelte diff --git a/test/prettier.js b/test/prettier.js index 50357230..78aa67dc 100644 --- a/test/prettier.js +++ b/test/prettier.js @@ -58,8 +58,8 @@ const eslint = new ESLint({ }, }, { - files: '**/@ota-meshi/eslint-plugin-svelte/*.svelte', - extends: ['plugin:@ota-meshi/svelte/recommended'], + files: '**/eslint-plugin-svelte/*.svelte', + extends: ['plugin:svelte/recommended'], }, ], }, @@ -260,7 +260,7 @@ runFixture('*.mdx', [ ], ]); -runFixture('@ota-meshi/eslint-plugin-svelte/*.svelte', [ +runFixture('eslint-plugin-svelte/*.svelte', [ [ { column: 5, diff --git a/yarn.lock b/yarn.lock index 1de76ea7..3443f700 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2268,20 +2268,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@ota-meshi/eslint-plugin-svelte@^0.34.1": - version "0.34.1" - resolved "https://registry.yarnpkg.com/@ota-meshi/eslint-plugin-svelte/-/eslint-plugin-svelte-0.34.1.tgz#f342da9f41d5d1cd29991a5e1bddc09ec8e3de30" - integrity sha512-ZJd/vzcwtP3vnSzS6K7feOF0dziuT7ede6g9IVT3i/yHg9g0gsJbooDuoxA9hPrZJbp0kEt/DoNjVRLlQFsy7Q== - dependencies: - debug "^4.3.1" - eslint-utils "^3.0.0" - known-css-properties "^0.25.0" - postcss "^8.4.5" - postcss-load-config "^3.1.4" - postcss-safe-parser "^6.0.0" - sourcemap-codec "^1.4.8" - svelte-eslint-parser "^0.16.0" - "@pkgr/utils@^2.0.2", "@pkgr/utils@^2.0.3", "@pkgr/utils@^2.1.0": version "2.2.0" resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.2.0.tgz#ccbf06cd010684b477dde40ec833a28f0c2136c4" @@ -4091,6 +4077,20 @@ eslint-plugin-svelte@^1.1.2: dependencies: eslint-plugin-svelte3 "^3.1.2" +eslint-plugin-svelte@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-svelte/-/eslint-plugin-svelte-2.0.0.tgz#b77a7c458b6139844acfe6a641abd268f4e98a2d" + integrity sha512-s7uyRqbRtQ+7q9anee4OmDJVXmNriPvk2iAxxFjlk5j1THq/6pVGn5SKtD7rXu989WkQ+fsymMHCZmOMpx+FpQ== + dependencies: + debug "^4.3.1" + eslint-utils "^3.0.0" + known-css-properties "^0.25.0" + postcss "^8.4.5" + postcss-load-config "^3.1.4" + postcss-safe-parser "^6.0.0" + sourcemap-codec "^1.4.8" + svelte-eslint-parser "^0.16.0" + eslint-plugin-unicorn@^40.1.0: version "40.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-40.1.0.tgz#48975360e39d23df726e4b33e8dd5d650e184832"