-
Notifications
You must be signed in to change notification settings - Fork 19
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: implementation of pre commit hooks #27
feat: implementation of pre commit hooks #27
Conversation
Thank you! Can you expand on the rules used and why are they useful? It's good to have this for the future . Also why using husky? Can we use git hooks? What's the benefit of it? |
prettier rules are the standard rules for managing the use of tabs, width, singlequotes, etc. In , ESLint rules have the react, typescript, react-native, and jsx-a11y. The few rules to start with are - file extension should be .tsx, no-inline-style, no unused var, etc. These rule are mentioned in file Husky is flexible and simpler than git. With husky we just need package.json to setup, and commands. However with git the pre commit hooks installation is not easier. Another bigger advantage of husky over git is, husky will be installed for every developer however with git, every developer has to setup on their machine. So, all environments will be handle by the husky as compare to the git |
yarn.lock
Outdated
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.
Do we need this 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.
yes, it is yarn.lock we do need this for fix version packages
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 are you proposing to use yarn instead of npm? I don't get it in this PR. If this is the case we should also modify the readme and test it all, we can have discuss it in a different PR. We tried on #1 but the tvOS version didn't work
.eslintrc
Outdated
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.
Do we need this file? Can we just use eslint.config.js?
components/MenuContext.tsx
Outdated
{children} | ||
</MenuContext.Provider> | ||
const value = useMemo( | ||
() => ({ |
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.
is this related to this PR?
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.
removed the file from the PR
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.
all changes are done. Please re-review
components/MenuContext.tsx
Outdated
{children} | ||
</MenuContext.Provider> | ||
const value = useMemo( | ||
() => ({ |
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.
removed the file from the PR
yarn.lock
Outdated
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, it is yarn.lock we do need this for fix version packages
8a1a9be
to
0d8f1e9
Compare
@giolaq as suggested, changes are done. Please recheck. Thanks |
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.
part related to the pre-hooks and eslinting looks good.
Make sure you get the changes in main
components/CustomDrawerContent.tsx
Outdated
@@ -19,7 +19,10 @@ export default function CustomDrawerContent(props: any) { | |||
|
|||
return ( | |||
<SpatialNavigationRoot isActive={isMenuOpen}> | |||
<DrawerContentScrollView {...props} style={styles.container} scrollEnabled={false}> | |||
<DrawerContentScrollView {...props} style={styles.container} scrollEnabled={false} contentContainerStyle={{ |
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 change is already merged, make sure you update to the latest main
2f1a44c
to
8529ada
Compare
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
Description
Added husky pre-commit hook for:
Fixes #17
Snapshots/Videos:
Type of change
Added tests?
Internationalization Support?
Steps to test the feature:
Snapshot of the test-cases that are passing:
NA
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
NA
"By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice."