Skip to content

Commit

Permalink
Fix tsc (again) (mrousavy#50)
Browse files Browse the repository at this point in the history
* Test forbid `<View>`

* Update validate-js.yml

* Run yarn lint with custom formatter lib

* Revert "Test forbid `<View>`"

This reverts commit d36ab54.

* Test: Intentional tsc error

* Update notice-new-dependencies.yml

* Update validate-js.yml

* Use reviewdog again, but with custom efm

* Fix <Camera> props

* Update validate-js.yml

* Try use github-check

* Update validate-js.yml

* Update validate-js.yml

* Add two reporters

* Update validate-js.yml

* Level error

* Use github-pr-review

* Update validate-js.yml

* Revert "Test: Intentional tsc error"

This reverts commit a4e7f6f.
  • Loading branch information
mrousavy authored Mar 12, 2021
1 parent 36d9a89 commit 2bf5c96
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/notice-new-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check for new dependencies
uses: hiwelo/new-dependencies-action@master
uses: hiwelo/new-dependencies-action@1.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
17 changes: 9 additions & 8 deletions .github/workflows/validate-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install reviewdog
uses: reviewdog/action-setup@v1

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand All @@ -42,8 +45,11 @@ jobs:
- name: Install node_modules (example/)
run: yarn install --frozen-lockfile --cwd example

- name: Run TypeScript
uses: ypresto/typescript-error-reporter-action@6cb6a970f0783c19f55fb83079f7846a583c7543
- name: Run TypeScript # Reviewdog tsc errorformat: %f:%l:%c - error TS%n: %m
run: |
yarn typescript | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-on-error -tee
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lint:
name: Lint JS (eslint, prettier)
Expand All @@ -69,9 +75,4 @@ jobs:
run: yarn install --frozen-lockfile --cwd example

- name: Run ESLint
uses: reviewdog/action-eslint@v1
with:
reporter: github-pr-review
eslint_flags: '--ext .js,.ts,.jsx,.tsx src'
fail_on_error: true
filter_mode: nofilter
run: yarn lint -f @jamesacarr/github-actions
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"@jamesacarr/eslint-formatter-github-actions": "^0.1.0",
"@react-native-community/eslint-config": "^2.0.0",
"@react-native-community/eslint-plugin": "^1.1.0",
"@release-it/conventional-changelog": "^2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/Camera.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ interface CameraState {
*
* The `<Camera>` component's most important (and therefore _required_) properties are:
*
* * {@linkcode CameraDeviceProps.device | device}: Specifies the {@linkcode CameraDevice} to use. Get a {@linkcode CameraDevice} by using the {@linkcode useCameraDevices | useCameraDevices()} hook, or manually by using the {@linkcode Camera.getAvailableCameraDevices Camera.getAvailableCameraDevices()} function.
* * {@linkcode CameraDynamicProps.isActive | isActive}: A boolean value that specifies whether the Camera should actively stream video frames or not. This can be compared to a Video component, where `isActive` specifies whether the video is paused or not. If you fully unmount the `<Camera>` component instead of using `isActive={false}`, the Camera will take a bit longer to start again.
* * {@linkcode CameraProps.device | device}: Specifies the {@linkcode CameraDevice} to use. Get a {@linkcode CameraDevice} by using the {@linkcode useCameraDevices | useCameraDevices()} hook, or manually by using the {@linkcode Camera.getAvailableCameraDevices Camera.getAvailableCameraDevices()} function.
* * {@linkcode CameraProps.isActive | isActive}: A boolean value that specifies whether the Camera should actively stream video frames or not. This can be compared to a Video component, where `isActive` specifies whether the video is paused or not. If you fully unmount the `<Camera>` component instead of using `isActive={false}`, the Camera will take a bit longer to start again.
*
* @example
* ```tsx
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# yarn lockfile v1


"@actions/core@^1.2.6":
version "1.2.6"
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.2.6.tgz#a78d49f41a4def18e88ce47c2cac615d5694bf09"
integrity sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==

"@babel/code-frame@7.12.11":
version "7.12.11"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f"
Expand Down Expand Up @@ -1091,6 +1096,13 @@
resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98"
integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==

"@jamesacarr/eslint-formatter-github-actions@^0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@jamesacarr/eslint-formatter-github-actions/-/eslint-formatter-github-actions-0.1.0.tgz#d00814b5b8b309cf97d488773cfdb140edf00932"
integrity sha512-ysXRx5C5pPVJ0t3Q1DpsMLWLQw5Fj8erEM0WnGhaOIgjLwZkOLmEiIw+4b5UhPsVCaf6jbUgdZuH2StR3jW0Ug==
dependencies:
"@actions/core" "^1.2.6"

"@jest/console@^24.9.0":
version "24.9.0"
resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.9.0.tgz#79b1bc06fb74a8cfb01cbdedf945584b1b9707f0"
Expand Down

0 comments on commit 2bf5c96

Please sign in to comment.