Skip to content

Commit

Permalink
feat: 1353 add lint to workflows (#1592)
Browse files Browse the repository at this point in the history
Co-authored-by: Ricardo Campos <[email protected]>
  • Loading branch information
mgaseta and Ricardo Campos authored Sep 3, 2024
1 parent d2b2d30 commit 6e5f518
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ concurrency:
cancel-in-progress: true

jobs:
lint:
name: Typescript lint
runs-on: ubuntu-22.04
steps:
- uses: bcgov-nr/[email protected]
with:
commands: |
npm ci
npm run lint
dir: frontend
node_version: "20"

tests:
name: Java CI
if: ${{ ! github.event.pull_request.draft }}
Expand Down Expand Up @@ -65,7 +77,7 @@ jobs:
results:
name: Analysis Results
if: always() && (!failure()) && (!cancelled())
needs: [tests, trivy]
needs: [lint, tests, trivy]
runs-on: ubuntu-22.04
steps:
- run: echo "Workflow completed successfully!"
14 changes: 7 additions & 7 deletions frontend/src/components/BCHeader/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ export const navItems = [
export const supportItems = {
name: 'Support',
items: [
// Uncomment these as necessary :)
// {
// name: 'Need help?',
// icon: 'Help',
// link: '#',
// disabled: true
// },
// Uncomment these as necessary :)
// {
// name: 'Need help?',
// icon: 'Help',
// link: '#',
// disabled: true
// },
{
name: 'Service status',
icon: 'CloudMonitoring',
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/BCHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,11 @@ const BCHeader = () => {
<SideNavLink
key={supportItem.name}
renderIcon={Icons[supportItem.icon]}
className={supportItem.disabled ? 'disabled-side-nav-option' : 'side-nav-option'}
className={
supportItem.disabled
? 'disabled-side-nav-option'
: 'side-nav-option'
}
onClick={supportItem.disabled ? null : () => navigate(supportItem.link)}
>
{supportItem.name}
Expand Down

0 comments on commit 6e5f518

Please sign in to comment.