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

Setup Prettier and Husky #52

Merged
merged 14 commits into from
Aug 30, 2023
Merged

Conversation

nebula-aac
Copy link
Contributor

@nebula-aac nebula-aac commented Aug 25, 2023

Notes for Reviewers

This PR fixes

This PR setups prettier at the workspace level
Uses husky for pre-commit
Add prettier-plugin-organize-imports to help organize imports

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Antonette Caldwell <[email protected]>
@nebula-aac nebula-aac mentioned this pull request Aug 25, 2023
@nebula-aac
Copy link
Contributor Author

will be adding lint-staged too

@leecalcote
Copy link
Member

Merge conflicts...

@leecalcote leecalcote added area/ci Continuous integration | Build and release kind/chore Necessary task labels Aug 30, 2023
"trailingComma": "none",
"jsxBracketSameLine": true
"semi": true,
"tabWidth": 2,
Copy link
Member

Choose a reason for hiding this comment

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

@github-actions github-actions bot removed the area/ci Continuous integration | Build and release label Aug 30, 2023
Signed-off-by: Antonette Caldwell <[email protected]>
Signed-off-by: Antonette Caldwell <[email protected]>
Signed-off-by: Antonette Caldwell <[email protected]>
Signed-off-by: Antonette Caldwell <[email protected]>
@nebula-aac
Copy link
Contributor Author

Should be good now.

I fixed the husky to run as a pre-commit to format and lint-staged with eslint. Since there is no eslint rules yet, I will be adding this after this PR.

@leecalcote everything looks okay now?

Copy link
Member

@leecalcote leecalcote left a comment

Choose a reason for hiding this comment

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

LGTM

@leecalcote
Copy link
Member

leecalcote commented Aug 30, 2023

FYI -

➜  sistent git:(configure-prettier) make
yarn run build-all
yarn run v1.22.19
$ yarn workspaces run build

> @layer5/sistent-components
warning package.json: No license field
$ vite build && tsc
/bin/sh: vite: command not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 127
Command: /usr/local/Cellar/node@18/18.17.1/bin/node
Arguments: /usr/local/Cellar/yarn/1.22.19/libexec/lib/cli.js run build
Directory: /Users/lee/code/sistent/packages/components
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command.
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
make: *** [build] Error 127

To the extent that it is quick to do, we might toss in a dependency check. Not a critical concern.

A make setup and a make build will increase consistency of make target usage with the other repositories and their make experience in mind.

@leecalcote
Copy link
Member

I might be doing something wrong. I got many of these:

../../node_modules/@mui/base/useList/useList.js (1:0) Module level directives cause errors when bundled, "use client" in "../../node_modules/@mui/base/useList/useList.js" was ignored.
../../node_modules/@mui/base/useList/useListItem.js (1:0) Module level directives cause errors when bundled, "use client" in "../../node_modules/@mui/base/useList/useListItem.js" was ignored.
../../node_modules/@mui/base/useList/useListChangeNotifiers.js (1:0) Module level directives cause errors when bundled, "use client" in "../../node_modules/@mui/base/useList/useListChangeNotifiers.js" was ignored.
../../node_modules/@mui/base/utils/useLatest.js (1:0) Module level directives cause errors when bundled, "use client" in "../../node_modules/@mui/base/utils/useLatest.js" was ignored.
../../node_modules/@mui/base/utils/useTextNavigation.js (1:0) Module level directives cause errors when bundled, "use client" in "../../node_modules/@mui/base/utils/useTextNavigation.js" was ignored.
../../node_modules/@mui/base/utils/useForcedRerendering.js (1:0) Module level directives cause errors when bundled, "use client" in "../../node_modules/@mui/base/utils/useForcedRerendering.js" was ignored.
../../node_modules/@mui/base/utils/useMessageBus.js (1:0) Module level directives cause errors when bundled, "use client" in "../../node_modules/@mui/base/utils/useMessageBus.js" was ignored.

with this at the end:

✓ 1014 modules transformed.
dist/index.html                  0.39 kB │ gzip:  0.27 kB
dist/assets/index-f7b78167.js  214.71 kB │ gzip: 71.71 kB
✓ built in 2.99s

Signed-off-by: Antonette Caldwell <[email protected]>
Signed-off-by: Antonette Caldwell <[email protected]>
@nebula-aac nebula-aac merged commit 2a73654 into layer5io:master Aug 30, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants