mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
feat: Add lint pass to prevent future issues
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
d1159e3c32
commit
f2f23109ba
2 files changed
+26
No files matched your search
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
PACKAGE_JSON_PATHS=$(find packages/* -type f -name package.json -not -path "*/node_modules/*")
|
||||
exitCode=0
|
||||
|
||||
while IFS= read -r PACKAGE_JSON_PATH; do
|
||||
PACKAGE_NAME=$(<"${PACKAGE_JSON_PATH}" jq .name)
|
||||
PACKAGE_IS_PRIVATE=$(<"${PACKAGE_JSON_PATH}" jq .private)
|
||||
|
||||
if [[ "${PACKAGE_IS_PRIVATE}" == "true" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
PACKAGE_HAS_PUBLISH_CONFIG=$(<"${PACKAGE_JSON_PATH}" jq '.publishConfig != null')
|
||||
|
||||
if [[ "${PACKAGE_HAS_PUBLISH_CONFIG}" == "false" ]]; then
|
||||
echo "${PACKAGE_NAME} is missing publish config"
|
||||
exitCode=1
|
||||
fi
|
||||
done <<< "${PACKAGE_JSON_PATHS}"
|
||||
|
||||
exit "${exitCode}"
|
||||
Reference in new issue
Block a user