-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Monorepo [1/?] - move precommit scripts to root (#5998)
## About This pull request is a part of the effort of migrating to monorepo structure: - #5992 - #5993 ## Summary This particular pull requests moves the precommit husky script to the root directory to enable it. It also extracts `lint-staged` configuration from `packages/react-native-reanimated` to a separate file for it to be less polluted. ## Test plan The script should be working as expected. Try it by cloning the monorepo and doing something bad in the code.
- Loading branch information
Showing
6 changed files
with
690 additions
and
448 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
...react-native-reanimated/.husky/pre-commit → .husky/pre-commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const REANIMATED_PATH = 'packages/react-native-reanimated'; | ||
module.exports = { | ||
'*.(js|ts|tsx)': [ | ||
`cd ${REANIMATED_PATH} && yarn eslint `, | ||
`cd ${REANIMATED_PATH} && yarn eslint --quiet --ext '.js,.ts,.tsx' src/`, | ||
`cd ${REANIMATED_PATH} && yarn prettier --write`, | ||
], | ||
'plugin/**/*.{js,ts,tsx}': `cd ${REANIMATED_PATH} && yarn lint:plugin`, | ||
'**/*.{h,cpp}': `cd ${REANIMATED_PATH} && yarn lint:cpp`, | ||
'android/src/**/*.java': `cd ${REANIMATED_PATH} && yarn format:java`, | ||
'android/src/**/*.{h,cpp}': `cd ${REANIMATED_PATH} && yarn format:android`, | ||
'apple/**/*.{h,m,mm,cpp}': `cd ${REANIMATED_PATH} && yarn format:ios`, | ||
'Common/**/*.{h,cpp}': `cd ${REANIMATED_PATH} && yarn format:common`, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.