Skip to content

Commit

Permalink
feat(ci): add eslint to reviewdog (#12713)
Browse files Browse the repository at this point in the history
* feat(ci): add eslint to reviewdog

Signed-off-by: Fritz Lehnert <13189449+Neudrino@users.noreply.github.com>

* feat(ci): pin react-test-renderer version

Signed-off-by: Fritz Lehnert <13189449+Neudrino@users.noreply.github.com>
  • Loading branch information
Neudrino committed Jun 23, 2022
1 parent 64133f5 commit 388539a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 30 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/reviewdog-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
outputs:
changed_cpp: ${{ steps.changes.outputs.cpp }}
changed_go: ${{ steps.changes.outputs.go }}
changed_javascript: ${{ steps.changes.outputs.javascript }}
changed_python: ${{ steps.changes.outputs.python }}
changed_terraform: ${{ steps.changes.outputs.terraform }}
steps:
Expand All @@ -35,6 +36,8 @@ jobs:
- ["lte/gateway/c/**", "orc8r/gateway/c/**"]
go:
- ["src/go/**"]
javascript:
- ["nms/**", "**/*.js"]
python:
- ["lte/gateway/python/**", "orc8r/gateway/python/**"]
terraform:
Expand Down Expand Up @@ -113,6 +116,26 @@ jobs:
# Ignore DL3005-"Do not use apt-get upgrade or dist-upgrade"
hadolint_ignore: DL3005

eslint:
needs: files_changed
if: ${{ needs.files_changed.outputs.changed_javascript == 'true' }}
name: eslint
runs-on: ubuntu-latest
steps:
- name: Check out code.
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
- name: eslint
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.github_token }}
filter_mode: added
reporter: github-pr-review
workdir: 'nms/'

misspell:
name: misspell
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion nms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"prettier": "^2.0.5",
"puppeteer": "5.5.0",
"react-hot-loader": "^4.8.0",
"react-test-renderer": "^17.0.2",
"react-test-renderer": "^16.9.0",
"regenerator-runtime": "^0.13.7",
"rimraf": "^3.0.0",
"sqlite3": "^5.0.3",
Expand Down
42 changes: 13 additions & 29 deletions nms/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10751,16 +10751,16 @@ react-hot-loader@^4.8.0:
shallowequal "^1.1.0"
source-map "^0.7.3"

"react-is@^16.12.0 || ^17.0.0", "react-is@^16.8.0 || ^17.0.0", react-is@^17.0.1, react-is@^17.0.2:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==

react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.9.0:
react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6, react-is@^16.9.0:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==

"react-is@^16.8.0 || ^17.0.0", react-is@^17.0.1:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==

react-json-view@^1.19.1:
version "1.19.1"
resolved "https://registry.yarnpkg.com/react-json-view/-/react-json-view-1.19.1.tgz#95d8e59e024f08a25e5dc8f076ae304eed97cf5c"
Expand Down Expand Up @@ -10802,23 +10802,15 @@ react-router@6.3.0:
dependencies:
history "^5.2.0"

react-shallow-renderer@^16.13.1:
version "16.14.1"
resolved "https://registry.yarnpkg.com/react-shallow-renderer/-/react-shallow-renderer-16.14.1.tgz#bf0d02df8a519a558fd9b8215442efa5c840e124"
integrity sha512-rkIMcQi01/+kxiTE9D3fdS959U1g7gs+/rborw++42m1O9FAQiNI/UNRZExVUoAOprn4umcXf+pFRou8i4zuBg==
dependencies:
object-assign "^4.1.1"
react-is "^16.12.0 || ^17.0.0"

react-test-renderer@^17.0.2:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-17.0.2.tgz#4cd4ae5ef1ad5670fc0ef776e8cc7e1231d9866c"
integrity sha512-yaQ9cB89c17PUb0x6UfWRs7kQCorVdHlutU1boVPEsB8IDZH6n9tHxMacc3y0JoXOJUsZb/t/Mb8FUWMKaM7iQ==
react-test-renderer@^16.9.0:
version "16.14.0"
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.14.0.tgz#e98360087348e260c56d4fe2315e970480c228ae"
integrity sha512-L8yPjqPE5CZO6rKsKXRO/rVPiaCOy0tQQJbC+UjPNlobl5mad59lvPjwFsQHTvL03caVDIVr9x9/OSgDe6I5Eg==
dependencies:
object-assign "^4.1.1"
react-is "^17.0.2"
react-shallow-renderer "^16.13.1"
scheduler "^0.20.2"
prop-types "^15.6.2"
react-is "^16.8.6"
scheduler "^0.19.1"

react-textarea-autosize@^6.1.0:
version "6.1.0"
Expand Down Expand Up @@ -11459,14 +11451,6 @@ scheduler@^0.19.1:
loose-envify "^1.1.0"
object-assign "^4.1.1"

scheduler@^0.20.2:
version "0.20.2"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"

schema-utils@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770"
Expand Down

0 comments on commit 388539a

Please sign in to comment.