From 5d19b8ea819a83391479c9d90c01a12754e6e7dd Mon Sep 17 00:00:00 2001 From: Sean DuBois Date: Sat, 30 Dec 2023 22:21:56 -0500 Subject: [PATCH] Add eslint --- .github/workflows/dockerhub.yaml | 1 - .github/workflows/lint.yaml | 12 ++++++++++++ web/package-lock.json | 8 ++++---- web/package.json | 1 + 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dockerhub.yaml b/.github/workflows/dockerhub.yaml index 5668b62..d61bccb 100644 --- a/.github/workflows/dockerhub.yaml +++ b/.github/workflows/dockerhub.yaml @@ -3,7 +3,6 @@ on: push: branches: - main - pull_request: jobs: docker: diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index e7fb458..f02d893 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -20,3 +20,15 @@ jobs: uses: golangci/golangci-lint-action@v3 with: version: 'latest' + + - uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'npm' + cache-dependency-path: web/package-lock.json + + - run: npm ci + working-directory: web + + - run: npm run lint + working-directory: web diff --git a/web/package-lock.json b/web/package-lock.json index 250870b..a72a642 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -16229,16 +16229,16 @@ } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=14.17" + "node": ">=4.2.0" } }, "node_modules/unbox-primitive": { diff --git a/web/package.json b/web/package.json index fe19537..94749b7 100644 --- a/web/package.json +++ b/web/package.json @@ -12,6 +12,7 @@ "scripts": { "start": "dotenv -e ../.env.development react-scripts start", "build": "dotenv -e ../.env.production react-scripts build", + "lint": "eslint ./src --max-warnings 0", "eject": "react-scripts eject" }, "eslintConfig": {