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

Error if element name is capitalised #623

Closed
Rich-Harris opened this issue Jun 7, 2017 · 2 comments
Closed

Error if element name is capitalised #623

Rich-Harris opened this issue Jun 7, 2017 · 2 comments

Comments

@Rich-Harris
Copy link
Member

I keep writing <SomeNewComponent/> and forgetting to import SomeNewComponent and add it to components. I could save myself some time if the compiler printed a warning (or maybe if it errored?) on encountering a capitalised tag that doesn't correspond to a known component.

@Rich-Harris Rich-Harris changed the title Warn if element name is capitalised Warn (or error) if element name is capitalised Jun 7, 2017
@Conduitry
Copy link
Member

I like this idea, it seems like a tidy solution to this problem. I think the main bump I see here is that making this an outright error would probably be a breaking change. A sane and likely desirable change, but probably a breaking one. Not sure whether that influences how you want this handled.

@Rich-Harris
Copy link
Member Author

Good point. Let's make it a warning for now, with a TODO comment to upgrade it to an error in v2

Rich-Harris added a commit that referenced this issue Jun 11, 2017
Rich-Harris added a commit that referenced this issue Jun 11, 2017
warn on missing component
Rich-Harris added a commit that referenced this issue Jun 12, 2017
Fix the missing component check
@Rich-Harris Rich-Harris changed the title Warn (or error) if element name is capitalised Error if element name is capitalised Jun 13, 2017
@Rich-Harris Rich-Harris added this to the 2.x milestone Jun 13, 2017
@Rich-Harris Rich-Harris mentioned this issue Apr 14, 2018
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

No branches or pull requests

2 participants