-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[FEATURE] Lint fix after blueprint generation #9469
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this is great, thanks for working on it!!
I've left a few small inline comments to work on, but please ping me when you are ready for another review.
lib/utilities/lint-fix.js
Outdated
async function run() { | ||
let lintFixScriptName = `lint:fix`; | ||
let cwd = process.cwd(); | ||
let npmRunResult = await execa('npm', ['run'], { cwd }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably use either npm or yarn based on the normal "is yarn.lock present" trigger that we normally use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good, thanks for keeping at it!
I'm not 100% sure why CI is failing, but the actual code changes here look really good. I think you might need to rebase (we recently merged a few other PRs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one clarification, but I think this is good to go.
I restarted CI (macOS had a test timeout). |
Thanks, yeh this test appears to be a little flaky: |
Thank you! |
The reason for this is mentioned in the linked issue as well as in the corresponding RFC itself. Note that you can also disable this functionality globally via your |
Can anyone suggest how could I disable this lint:fix globally via the .ember-cli config file. As mentioned above? |
// .ember-cli
{
"lintFix": false
} |
Fixes #9429
This adds auto lint fixing for files generated by
ember generate
andember init
.This is my first PR on ember-cli so looking forward to any feedback and happy to make improvements to it.