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
17 changes: 17 additions & 0 deletions .github/workflows/react-no-warnings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "React Code Has No Warnings"
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
working-directory: ./portal-ui
run: yarn
- name: Check for Warnings in build output
working-directory: ./portal-ui
continue-on-error: false
run: |
chmod +x check-warnings.sh && ./check-warnings.sh
2 changes: 2 additions & 0 deletions portal-ui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ build-static:
@echo "Building frontend static assets to 'build'"
NODE_OPTIONS=--openssl-legacy-provider yarn build

test-warnings:
./check-warnings.sh
6 changes: 6 additions & 0 deletions portal-ui/check-warnings.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

if yarn build | grep "Compiled with warnings"; then
echo "There are warnings in the code"
exit 1
fi
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const QueryMultiSelector = ({
// Use effect to get the initial values from props
useEffect(() => {
if (
currentKeys.length === 1 &&
currentKeys.length == 1 &&
currentKeys[0] === "" &&
currentValues.length === 1 &&
currentValues[0] === "" &&
Expand Down