Skip to content

Commit b1e10c9

Browse files
committed
ci: add lint:ci script
1 parent 4e75c39 commit b1e10c9

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: true
2222
matrix:
23-
script: ["format", "lint", "typecheck:ci"]
23+
script: ["format", "lint:ci", "typecheck:ci"]
2424

2525
steps:
2626
- name: Checkout repo

next.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@ import { withContentlayer } from "next-contentlayer"
33
import withBundleAnalyzer from "@next/bundle-analyzer"
44

55
const nextConfig: NextConfig = {
6+
eslint: {
7+
/**
8+
* Now eslint requires typecheck so we have to run build before executing lint
9+
* These check are performed via `.github/workflows/ci.yml` action
10+
*/
11+
ignoreDuringBuilds: true,
12+
},
613
typescript: {
14+
/** @see `eslint.ignoreDuringBuilds` comment */
715
ignoreBuildErrors: true,
816
},
917
reactStrictMode: true,

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"format:fix": "prettier . --write",
6464
"lint": "next lint",
6565
"lint:fix": "next lint --fix",
66+
"lint:ci": "next build --no-lint && next lint",
6667
"now-build": "pnpm run build",
6768
"start": "next start",
6869
"typecheck": "tsc --noEmit",

0 commit comments

Comments
 (0)