Skip to content
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

Merged
merged 11 commits into from
Jun 24, 2022

Conversation

alber70g
Copy link
Member

  • chore: update rush.json configuration
  • chore: adds boilerplate to .pnpmfile.js
  • chore: adds engines to prevent usage of npm or yarn
  • chore: ignore lockfiles
  • chore: remove .vscode/settings.json in favor of .editorconfig and .prettierrc in combination with pre-commit lint-/autofix-rules
  • chore(lint): adds strict and relevant lint rules

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

@alber70g alber70g force-pushed the chore/monorepo-rush branch 8 times, most recently from bb121f5 to 7c63dcd Compare June 23, 2022 14:04
…dvancedcsg-open/actions-rush@v1.4.5. Disable gitPolicy
@@ -1,5 +1,5 @@
import { InvalidCharacterError } from '../util';
import { Base64Url } from '../util/Base64Url';
import type { Base64Url } from '../util/Base64Url';
Copy link
Contributor

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

Copy link
Member Author

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

Copy link
Contributor

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

Copy link
Contributor

@Randynamic Randynamic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet!

@Randynamic Randynamic merged commit af71107 into master Jun 24, 2022
@Randynamic Randynamic deleted the chore/monorepo-rush branch June 24, 2022 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants