Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/react-native-reanimated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"test": "jest",
"lint": "yarn lint:js && yarn lint:common && yarn lint:android && yarn lint:apple",
"lint:js": "eslint src __tests__ __typetests__ && yarn prettier --check src __tests__ __typetests__",
"lint:android": "../../scripts/validate-android.sh && ./android/gradlew -p android spotlessCheck -q && ../../scripts/cpplint.sh android/src && yarn format:android:cpp --dry-run -Werror && yarn lint:cmake",
"lint:common": "../../scripts/validate-common.sh && ../../scripts/cpplint.sh Common && yarn format:common --dry-run -Werror",
"lint:android": "../../scripts/validate-android.sh && yarn validate-includes android && ./android/gradlew -p android spotlessCheck -q && ../../scripts/cpplint.sh android/src && yarn format:android:cpp --dry-run -Werror && yarn lint:cmake",
"lint:common": "../../scripts/validate-common.sh && yarn validate-includes Common && ../../scripts/cpplint.sh Common && yarn format:common --dry-run -Werror",
"lint:clang-tidy": "../../scripts/clang-tidy-lint.sh \".\"",
"lint:apple": "../../scripts/validate-apple.sh && yarn format:apple --dry-run -Werror",
"lint:apple": "../../scripts/validate-apple.sh && yarn validate-includes apple && yarn format:apple --dry-run -Werror",
"lint:cmake": "find ./android -type d \\( -name build -o -name .cxx \\) -prune -o -type f -name 'CMakeLists.txt' -print | xargs ../../scripts/lint-cmake.sh",
"format": "yarn format:js && yarn format:apple && yarn format:android && yarn format:common",
"format:js": "prettier --write --list-different src __tests__ __typetests__",
Expand All @@ -37,6 +37,7 @@
"build": "yarn workspace react-native-worklets build && yarn set-version && bob build",
"circular-dependency-check": "yarn madge --extensions js,jsx --circular lib",
"tree-shake:check:web": "yarn is-tree-shakable --resolution web",
"validate-includes": "bash ./scripts/validate-worklets-includes.sh",
"validate-peers": "node ../../scripts/validate-compatibility-peer-dependencies.js",
"set-version": "node scripts/set-version.js"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

if grep -Rn "$@" --include='*.h' --include='*.cpp' --include='*.m' --include='*.mm' -e '^#include <worklets/' | grep -v '<worklets/Compat/StableApi.h>'; then
echo "Found disallowed \`#include <worklets/...>\` in \`Common/\`, \`apple/\` or \`android/\`. Only \`#include <worklets/Compat/StableApi.h>\` is permitted."
exit 1
fi
Loading