From c6cf6ef8632f1d1c166baef9b506c2cc3beef8d0 Mon Sep 17 00:00:00 2001 From: Jarno Bakker Date: Thu, 25 Jul 2024 09:37:45 +0200 Subject: [PATCH] add eslint --- .github/workflows/eslint.yml | 16 ++++++++++++++++ .github/workflows/pylint.yml | 2 +- src/browser/src/App.test.js | 8 -------- src/browser/src/components/facets.tsx | 6 ++++-- 4 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/eslint.yml delete mode 100644 src/browser/src/App.test.js diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml new file mode 100644 index 0000000..d0dc318 --- /dev/null +++ b/.github/workflows/eslint.yml @@ -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 diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index e22a6f0..85f92b0 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -3,7 +3,7 @@ name: Pylint on: [push] jobs: - build: + pylint: runs-on: ubuntu-latest strategy: matrix: diff --git a/src/browser/src/App.test.js b/src/browser/src/App.test.js deleted file mode 100644 index 1f03afe..0000000 --- a/src/browser/src/App.test.js +++ /dev/null @@ -1,8 +0,0 @@ -import { render, screen } from '@testing-library/react'; -import App from './App'; - -test('renders learn react link', () => { - render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/src/browser/src/components/facets.tsx b/src/browser/src/components/facets.tsx index d09a15b..2ca4dc8 100644 --- a/src/browser/src/components/facets.tsx +++ b/src/browser/src/components/facets.tsx @@ -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 - case "number": + } + case "number": { const numFacet = facet as INumberFacet return + } } })