-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: sample lib & app #6
Conversation
packages/sample-lib/README.md
Outdated
|
||
## Setup | ||
|
||
1. Change package name to follow yours project one in [`package.json`](./package.json) |
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 didn't get "to follow yours project one," maybe you meant "Change package name to your own"
@@ -1,5 +1,5 @@ | |||
{ | |||
"extends": "./tsconfig.base.json", | |||
"include": ["**/*", ".*.js"], | |||
"exclude": ["node_modules", "dist", ".eslintrc.js"] |
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 could probably keep this in since eslint isn't relevant to the typescript compiler but either way it's ok
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.
since it's not that a big deal, i'll leave it as it is 👍
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.
🚀
"lint": { | ||
"dependsOn": ["build"] | ||
}, | ||
"lint:fix": { | ||
"dependsOn": ["build"] | ||
}, |
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.
Out of curiosity... Shouldn't this be the other way around? Build the "linted" code instead of linting the built code?
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.
not sure tbh, the CI issue not happening on local was because eslint errored on a type that couldn't resolve because the type was picked from another package of the monorepo, of course when already built, everything worked fine
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.
you're suggesting that maybe the issue is not 'building -> lint' but rather some configuration on eslint?
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 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.
Ooooh that makes sense. I was thinking task dependencies inside a non-monorepo.
What do you think about the following flow for each package:
- Build the "current" package dependencies
- Lint the "current" package
- Build the "current" package
Something like this:
"lint": { | |
"dependsOn": ["build"] | |
}, | |
"lint:fix": { | |
"dependsOn": ["build"] | |
}, | |
"lint": { | |
"dependsOn": ["^build"] | |
}, | |
"lint:fix": { | |
"dependsOn": ["^build"] | |
}, | |
"build": { | |
"dependsOn": ["^build", "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.
So after reading the docs, the ^...
dependsOn
values also runs the "current" package task, which defeats the purpose of the general idea as we'd need to run a task only on the dependencies. Given that the current config works, I think that we can merge it and later come back to this if someone gets to know a way to do it.
Lets close this one as it is. On the following PR we will add:
|
Description
lib
contains a Provider that usesViem
to query account balancesapp
uses the library package for demo purposesVitest
setup for testingChecklist before requesting a review