feat: add rule no-deprecated-raw-special-elements#918
feat: add rule no-deprecated-raw-special-elements#918ota-meshi merged 8 commits intosveltejs:mainfrom
no-deprecated-raw-special-elements#918Conversation
🦋 Changeset detectedLatest commit: b0ee149 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Hey @ota-meshi, would it be possible to have this rule have different test outputs for each svelte version? As fixes only apply to Svelte 5 |
b95c268 to
71abe97
Compare
|
You can exclude tests for each package version you are testing by placing a |
|
The rule should only be tested in Svelte 5, meaning tests for earlier versions should not produce errors related to Svelte 5 behavior. |
packages/eslint-plugin-svelte/src/rules/no-invalid-html-elements.ts
Outdated
Show resolved
Hide resolved
851cbef to
0ef42f3
Compare
a624263 to
bc20978
Compare
a77b03e to
1be1e99
Compare
no-invalid-html-elementsno-deprecated-raw-special-elements
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## eslint-plugin-svelte@3.0.0-next.1 ### Minor Changes - [#918](#918) [`5da98c9`](5da98c9) Thanks [@mikededo](https://github.com/mikededo)! - Added new `no-deprecated-raw-special-elements` rule - [#836](#836) [`3fa90aa`](3fa90aa) Thanks [@renovate](https://github.com/apps/renovate)! - feat: support for typescript-eslint v8 to `svelte/indent` rule Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
|
The rule is named "no-deprecated-raw-special-elements" but where is it stated that these elements are actually "deprecated"? For example, using |
|
@baseballyama would it make more sense to replace the |
|
Whether it’s invalid or not depends on how users use it (although in almost all cases, it would indeed be invalid😅). A name like |
|
@baseballyama True. It was not valid in previous versions but contrary to Svelte 5, the elements did work. I can work on updating it. |
|
Thank you so much! |
|
@baseballyama fixed in #1015! |
Adds a new Svelte 5 specific rule that ensure special elements are used with
svelte:prefix. This rule will help on migrating from Svelte 4, as suchelements were supported without the prefix in Svelte 4.
Adds a new rule that recommends not using raw special elements and fixes to
using the
svelte:prefix. Raw special elements are deprecated from v5 on.Closes #913