Skip to content
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

chore: warn about : in attributes and props #8633

Merged
merged 5 commits into from
May 26, 2023
Merged

Conversation

dummdidumm
Copy link
Member

@dummdidumm dummdidumm commented May 25, 2023

...to prevent ambiguity with Svelte directives

closes #6823

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • Prefix your PR title with feat:, fix:, chore:, or docs:.
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with npm test and lint the project with npm run lint

...to prevent ambiguity with Svelte directives

closes #6823
@dummdidumm dummdidumm added this to the 4.x milestone May 25, 2023
@vercel
Copy link

vercel bot commented May 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
svelte-dev-2 ❌ Failed (Inspect) May 26, 2023 11:04am

if (this.dependencies.size > 0) {
parent.cannot_use_innerhtml();
parent.not_static_content();
}

// TODO Svelte 5: Think about moving this into the parser and make it an error
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or should we merge this PR in the Svelte 3 branch and make it an error in Svelte 4?

@Rich-Harris
Copy link
Member

looks like we need to delete the ref-not-supportedand ref-not-supported-in-css tests

@dummdidumm
Copy link
Member Author

Ah woops, yeah I deleted that because I first looked into emitting a warning at the parser level but it can only error there, but while looking I saw this seemingly outdated ref thing which looks like a leftover from Svelte 2. If that's the case then yes delete the tests, else I'll revert that

@Rich-Harris
Copy link
Member

deleted the tests, we definitely don't need to still check for it. if people haven't upgraded from svelte 2 yet then they have bigger concerns 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants