-
Notifications
You must be signed in to change notification settings - Fork 21
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
Update rush config files. Adds lint rules. Add pre-commit hook. Removes pre-push hook #25
Conversation
…ettierrc in combination with pre-commit lint-/autofix-rules
bb121f5
to
7c63dcd
Compare
…dvancedcsg-open/actions-rush@v1.4.5. Disable gitPolicy
7c63dcd
to
72a987b
Compare
@@ -1,5 +1,5 @@ | |||
import { InvalidCharacterError } from '../util'; | |||
import { Base64Url } from '../util/Base64Url'; | |||
import type { Base64Url } from '../util/Base64Url'; |
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.
can we maybe move the types to a types folder in this repo as well as we are doing a significant rewrite and rearranging of the folder structure
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.
Yes that's a good one. Maybe we need to work on a base set of types to be used. I'm not a big fan of a separate types library. They can become overused, especially when they're broader than what's used in a function.
E.g.
// defined in @kadena/types
export type SomeGenericType = {
name: string;
color: 'blue' | 'red' | 'green';
};
// defined in @kadena/some-lib
import type { SomeGenericType } from '@kadena/types';
function getName({ name }: SomeGenericType) {
return name;
}
In this example the SomeGenericType
is way to broad for the usage. I'd rather have it exported and defined specifically, than made generic:
// defined in @kadena/some-lib
export type MySpecificType = {
name: string;
};
function getName({ name }: MySpecificType) {
return name;
}
Also, api-extractor can manage the type defenition .d.ts.
generation based on public, alpha, beta, non-private JS/TSdoc
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 like the api-extractor for for sure indeed.
Let's have a discussion about the types folder or not in our next dev experience meeting so we are all onboard
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.
Sweet!
What:
Improve the monorepo by setting sane defaults in rush.json
Adds preinstall script to prevent non-pnpm being used
Removes .vscode editor settings, in favor of .editorconfig and .prettierrc with pre-commit lint rules