Skip to content

Commit

Permalink
ci: add lint:ci script
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalexiei committed Dec 23, 2024
1 parent 4e75c39 commit 57e8442
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: true
matrix:
script: ["format", "lint", "typecheck:ci"]
script: ["format", "lint:ci", "typecheck:ci"]

steps:
- name: Checkout repo
Expand Down
10 changes: 10 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@ import { withContentlayer } from "next-contentlayer"
import withBundleAnalyzer from "@next/bundle-analyzer"

const nextConfig: NextConfig = {
eslint: {
/**
* Now eslint requires typecheck so we have to run build before executing lint
* These check are performed via `.github/workflows/ci.yml` action
*
* @see https://github.com/react-hook-form/documentation/pull/1107
*/
ignoreDuringBuilds: true,
},
typescript: {
/** @see `eslint.ignoreDuringBuilds` comment */
ignoreBuildErrors: true,
},
reactStrictMode: true,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"format:fix": "prettier . --write",
"lint": "next lint",
"lint:fix": "next lint --fix",
"lint:ci": "next build --no-lint && next lint",
"now-build": "pnpm run build",
"start": "next start",
"typecheck": "tsc --noEmit",
Expand Down

0 comments on commit 57e8442

Please sign in to comment.