Skip to content

Commit

Permalink
don't fail production builds because of eslint errors
Browse files Browse the repository at this point in the history
we still need to check eslint somewhere in this process though. so I'm
creating the build-test-lint workflow.

ref: https://nextjs.org/docs/pages/api-reference/next-config-js/eslint
  • Loading branch information
alishaevn committed Dec 15, 2023
1 parent 0002bf7 commit b257bc6
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 25 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build-test-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Build Test Lint"
run-name: Build Test Lint of ${{ github.ref_name }} by @${{ github.actor }}
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false

jobs:
build:
uses: scientist-softserv/actions/.github/workflows/[email protected]
secrets: inherit
with:
platforms: 'linux/amd64'
webTarget: web
test:
needs: build
uses: scientist-softserv/actions/.github/workflows/[email protected]
with:
cypress-container-name: cypress-tests
lint:
needs: build
uses: scientist-softserv/actions/.github/workflows/[email protected]
with:
rubocop_cmd: docker-compose run web -- bash -c 'yarn && yarn lint:all'
24 changes: 0 additions & 24 deletions .github/workflows/build.yml

This file was deleted.

5 changes: 4 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ const nextConfig = {
reactStrictMode: true,
swcMinify: true,
eslint: {
dirs: ['pages', 'utils'], // Only run ESLint on the 'pages' and 'utils' directories during production builds
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
// ref: https://nextjs.org/docs/pages/api-reference/next-config-js/eslint
ignoreDuringBuilds: true,
},
sentry: {
// Use `hidden-source-map` rather than `source-map` as the Webpack `devtool`
Expand Down

0 comments on commit b257bc6

Please sign in to comment.