-
Notifications
You must be signed in to change notification settings - Fork 869
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
refactor(experimental): add lint:fix #1568
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.
Lgtm!! Thanks
turbo.json
Outdated
@@ -36,6 +36,10 @@ | |||
"inputs": ["rollup.config.types.js", "tsconfig.*", "src/**"], | |||
"outputs": ["declarations/**", "dist/**/*.d.ts", "lib/**/*.d.ts"] | |||
}, | |||
"lint:fix": { | |||
"inputs": ["src/**", "test/**"], |
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.
Should we be passing test/*
to the eslint --fix
and prettier -w
calls too?
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.
there arent any test/
dirs tho, other than library-legacy
(which i didnt add this command for because it has its own flows and is a separate library). everything is in src/
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.
i removed test/**
from this bc id just naively copy-pasted it
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.
Small nit, otherwise thanks!
packages/addresses/package.json
Outdated
@@ -36,6 +36,7 @@ | |||
"compile:js": "tsup --config build-scripts/tsup.config.library.ts", | |||
"compile:typedefs": "tsc -p ./tsconfig.declarations.json", | |||
"dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch", | |||
"lint:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/*", |
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.
Running these serially kneecaps Turborepo from giving us MAX PARALLELISM. Make test:lint:fix
and test:prettier:fix
and then make a root task "style:fix": "turbo run test:lint:fix test:prettier:fix"
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.
I was going to suggest this too but what does turborepo do if you run two jobs in parallel that modify the same set of files? Is it smart enough to make that work without them ever colliding on the same file?
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.
I was about to write something something race conditions something something file locks but now that I think about it for two seconds, Prettier has to run last in case Eslint has fixes.
Yeah OK ignore me parallelism doesn't make sense here.
Still prefer the term "style:fix"
though because Prettier isn't really lint.
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.
The ideal situation would be to get Prettier to run only on changed files, but at this point I think we've probably collectively burned enough time on this.
160d04e
to
152eb90
Compare
i believe this is now failing because ts doesnt like something that babel is doing...?
its strange that this is happening now because i havent updated anything, i guess ci is fetching different dependency versions than a couple days ago? |
I just ran into this too on another PR. Is that what the problem is? |
yea its definitely either "babel updated doing something tsc doesnt like" or "tsc updated and decided it doesnt like babel anymore" because i get the exact same build failure in #1563 too now. either dependabot updated on red or the lockfiles arent locking everything...? edit: builds fine for me locally of course |
|
apparently this is a bug in node? lol. i will leave it for you to do what you will angular/angular-cli#25782 |
Yeah, just do what I do and ignore all of your problems until they go away. |
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.
🎉 This PR is included in version 1.78.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up. |
this creates a toplevel command to run the linters, feel free to chastize me if ive invoked to tools in a scurrilous manner