Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Lint & typecheck fixes (#46)
Browse files Browse the repository at this point in the history
* Lint & typecheck fixes

* This should fail

* Revert "This should fail"

This reverts commit 7c395c1.
  • Loading branch information
graszka22 authored Mar 8, 2023
1 parent b7019ed commit e67b443
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 4 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint & Types
on:
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'yarn'
- name: Install node dependencies
run: yarn && cd example && yarn
- name: Check types
run: yarn typecheck
- name: Lint
run: yarn eslint --ext '.js,.ts,.tsx' --max-warnings=0 src/ example/src/
- name: Build
run: EXPO_NONINTERACTIVE=true yarn build
- name: Build plugin
run: EXPO_NONINTERACTIVE=true yarn build plugin
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn typecheck
yarn lint-staged
EXPO_NONINTERACTIVE=true yarn build
EXPO_NONINTERACTIVE=true yarn build plugin
3 changes: 2 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@babel/runtime": "^7.12.5",
"babel-plugin-module-resolver": "^4.0.0",
"metro-react-native-babel-preset": "^0.64.0",
"react-native-svg-transformer": "^1.0.0"
"react-native-svg-transformer": "^1.0.0",
"typescript": "^4.1.3"
}
}
5 changes: 5 additions & 0 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4480,6 +4480,11 @@ type-fest@^0.7.1:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48"
integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==

typescript@^4.1.3:
version "4.9.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==

uglify-es@^3.1.9:
version "3.3.9"
resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677"
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"release": "release-it",
"releaseAppAndroid": "cd example/android && fastlane deploy",
"releaseAppIos": "cd example/ios && fastlane deploy",
"docs": "sed 's/\\.github\\/images/media/g' README.md > README_docs.md && typedoc src/index.tsx --media ./.github/images --readme README_docs.md && rm README_docs.md"
"docs": "sed 's/\\.github\\/images/media/g' README.md > README_docs.md && typedoc src/index.tsx --media ./.github/images --readme README_docs.md && rm README_docs.md",
"typecheck": "yarn tsc --noEmit && cd example && yarn tsc --noEmit"
},
"keywords": [
"react-native",
Expand Down Expand Up @@ -103,8 +104,8 @@
},
"lint-staged": {
"*.(js|ts|tsx)": [
"eslint --ext '.js,.ts,.tsx'",
"prettier --write"
"prettier --write",
"eslint --ext '.js,.ts,.tsx' --max-warnings=0 src/ example/src/"
]
}
}

0 comments on commit e67b443

Please sign in to comment.