Skip to content

Commit

Permalink
add eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
jarno-knaw committed Jul 25, 2024
1 parent 09ac539 commit c6cf6ef
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: ESLint

on: push

jobs:
eslint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./src/browser
steps:
- uses: actions/checkout@v4
- name: Install modules
run: npm install
- name: Run ESLint
run: npx eslint . --ext .js,.jsx,.ts,.tsx
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Pylint
on: [push]

jobs:
build:
pylint:
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
8 changes: 0 additions & 8 deletions src/browser/src/App.test.js

This file was deleted.

6 changes: 4 additions & 2 deletions src/browser/src/components/facets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Facets({registerFacet, unregisterFacet, setFacet, search

const objects = facets.map((facet ) => {
switch (facet.type) {
case "text":
case "text": {
return <ListFacet
registerFacet={registerFacet}
key={facet.field}
Expand All @@ -30,7 +30,8 @@ export default function Facets({registerFacet, unregisterFacet, setFacet, search
usePost={true}
addFilter={true}
searchValues={searchValues}/>
case "number":
}
case "number": {
const numFacet = facet as INumberFacet
return <SliderFacet
key={numFacet.field}
Expand All @@ -41,6 +42,7 @@ export default function Facets({registerFacet, unregisterFacet, setFacet, search
field={numFacet.field}
min={numFacet.min}
max={numFacet.max}/>
}
}
})

Expand Down

0 comments on commit c6cf6ef

Please sign in to comment.