Closed simonihmig closed 1 year ago
Run & review this pull request in StackBlitz Codeflow.
Latest commit: f0b84a191efb69235ba8f5231fb2d7db7109a755
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Tests are failing, because prettier is complaining about the use of double quotes in the jscodeshift'ed output. We could run lint:fix as part of the transform (though not sure if we can rely on the lint config files to be really valid after the file juggling, so maybe better let the user do this?), or we make ember-apply
use single quotes here (see docs).
@NullVoxPopuli thoughts?
While it's true that conversions out in the wild could have broken lint configs, I think it still valuable to test with them in the tests here.
I've PR'd to ember-apply to apply passing quotes, as well as probably all other recast options. https://github.com/NullVoxPopuli/ember-apply/pull/469
I think it still valuable to test with them in the tests here.
Yeah, sure, I didn't wan t to suggest we remove that. Was just unsure if our migrator should really run lint:fix, or just try to not break linting (by using single quotes)
I've PR'd to ember-apply to apply passing quotes
:tada:
ember-apply@2.8.0 will have the ability to review more options now :tada:
Cool, thanks a lot. Will update this PR then...
We will just assume everyone has set up prettier to use single quotes? Or should we even try to read that from some config? But there could be so many places where that bit is stored, so I'd rather like to not have to do this! 😅
Yeah, that's a good point -- I think for the tests, we should run lint:fix before lint -- because for the tests, it should be safe to do -- that way we don't need to make assumptions about other people's lint / prettier configs, and maybe in the "yay you did it messaging", we can remind folks to run their lint:fix scripts?
I think for the tests, we should run lint:fix before lint
Ok, right. But then we don't even need the single quotes change, right? But maybe still good to have, as >90% use single quotes, so there is less to "fix" afterwards...
Ok, right. But then we don't even need the single quotes change, right? But maybe still good to have, as >90% use single quotes, so there is less to "fix" afterwards...
correct
Ok, this is working now. It is using single quotes. And I had to add the gitignore
flag to the globby()
calls, otherwise it would try to "fix" >32.000 files in node_modules
! 🙈😅
I didn't change the tests to run lint:fix
instead of lint
, so to make sure this PR is working even without it. But I can do that in a separate PR if you want...
This will fix:
import config from 'dummy/config/environment';
and similar imports{ modulePrefix: 'dummy' }
in config/environment.js<script src="assets/dummy.js">
and<link href="assets/dummy.css">
in index.htmltests/index.html
from the dummy app instead of using the newly generated one, in case people have custom setup there