[GJS Codemod]: pathHint should provide the helper/component designation so that I can PascalCase components
NullVoxPopuli opened this issue · 3 comments
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.
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
nameHint is required if you have any helpers that cannot be identifiers tho, like await
in my case
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