Conversation
Co-authored-by: Claude <noreply@anthropic.com>
Update test output snapshots to reflect the new import ordering implemented in the generate-typings refactoring. Imports are now sorted alphabetically by module name, with named imports sorted alphabetically within each module, following eslint sort-imports rules. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
stdagkalakis
left a comment
There was a problem hiding this comment.
Base on description I expected after adding the eslint rule, to have no issues. However in a newly generated PW I received alphabetical order eslint erros in different files. Such as {pw-name}.editorPreview.tsx and {pw-name}.tsx
I started working on updating the order of imports in the templates, but realized it is not really possible without adding much more complexity to the template: As the order of the imports depends on the name of the widget, which would require sorting the imports after generation. Considering that
I suggest we leave the generator-widget as is, and accept that the widget would scaffold with sort-import errors. |
Checklist
[XX-000]: description)? ✅This PR contains
What is the purpose of this PR?
The generated typings did not follow a particular order, causing developers with the
sort-importsrule enabled to get alerted by eslint.Relevant changes
This PR implements the order defined by sort-imports and refactors the import generation to be testable. Unit tests with generated typings have been updated to reflect the new sorting order.
What should be covered while testing?
sort-importstoerrororwarn, there should be no issues raised by eslint.