Implement yarn lint --fix differently, and rework scripts#5595
Draft
mstange wants to merge 1 commit intofirefox-devtools:mainfrom
Draft
Implement yarn lint --fix differently, and rework scripts#5595mstange wants to merge 1 commit intofirefox-devtools:mainfrom
yarn lint --fix differently, and rework scripts#5595mstange wants to merge 1 commit intofirefox-devtools:mainfrom
Conversation
## Why silent true? Because it was hard to find the fix command suggestion in all the output. ```sh % yarn lint yarn run v1.22.22 $ node bin/suggest-fixing-command.js lint-or-lint-fix-internal 'lint --fix' $ node bin/lint-or-lint-fix.js $ run-p lint-internal:** $ node bin/format.js $ eslint *.js bin src --report-unused-disable-directives --cache --cache-strategy content $ stylelint "src/**/*.css" "res/**/*.css" [warn] bin/format.js [warn] Code style issues found in the above file. Run Prettier with --write to fix. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ERROR: "lint-internal:format" exited with 1. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 💡 You might be able to fix the error by running `yarn lint --fix` error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` ## Why format.js? Because `prettier --check . --fix` doesn't work, it needs to be `prettier --write .`. ## Why so many commands? Good question. ## What's the mapping of old commands to new commands? TODO
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5595 +/- ##
=======================================
Coverage 85.73% 85.73%
=======================================
Files 309 309
Lines 30390 30390
Branches 8365 8365
=======================================
Hits 26055 26055
Misses 3914 3914
Partials 421 421 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
Hmm it looks like a lot of complexity for this. TBH I'm not so sure if it's worth it. |
Contributor
Author
|
I'm planning to write up a bunch of before/after examples in the summary, then we can discuss if it's worth it :) It looks complex because:
Specifically I was annoyed that you got a suggestion to run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP