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

[GJS Codemod]: pathHint should provide the helper/component designation so that I can PascalCase components #2180

Open
NullVoxPopuli opened this issue Nov 22, 2024 · 3 comments

Comments

@NullVoxPopuli
Copy link
Collaborator

by default, all imports are camelCase.

This is fine at runtime, cause it just works,
but this ends up violating the no-arguments-for-html-elements template-lint.

If pathHint had a second argument, type, I could always pascalCase the given value if type=component.

@void-mAlex
Copy link
Collaborator

I should make it obvious that not using the nameHint at all would get you the default behaviour for the codemod which is PascalCase
I'll make sure to update the example to have the function in a block comment so people experience that as fisrt use behaviour
will look into making adding the extra argument to be able to make that decision as well

@NullVoxPopuli
Copy link
Collaborator Author

nameHint is required if you have any helpers that cannot be identifiers tho, like await in my case

@void-mAlex
Copy link
Collaborator

try running the codemod without the nameHint function and you will find that all helpers come out Pascal case by default so in your case you can use Await as a helper which is valid identifier and doesn't clash with the keyword

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