You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### What?
This PR removes the automatic ESLint linting that previously ran during `next build`. The documentation has been updated to reflect this change.
### Why?
As part of Next.js 16, we're removing the automatic build-time linting that was previously included in the build process. This gives developers more control over when linting runs by explicitly invoking their linter via npm scripts.
### How?
- Updated documentation to clarify that automatic build-time linting has been removed in Next.js 16
- Removed the `runLint` parameter and related linting code from the build process
- Removed the `verifyAndLint.ts` file which is no longer needed
- Simplified type checking code by removing lint-related functionality
- Removed ESLint telemetry during builds
If you use ESLint, create an explicit config (recommended `eslint.config.mjs`). ESLint supports both [the legacy `.eslintrc.*` and the newer `eslint.config.mjs` formats](https://eslint.org/docs/latest/use/configure/configuration-files#configuring-eslint). See the [ESLint API reference](/docs/app/api-reference/config/eslint#with-core-web-vitals) for a recommended setup.
348
348
349
-
> **Good to know**: If an ESLint config is present, `next build`will still run linting in Next.js 15, but this automatic build-time linting will be removed in Next.js 16. Control when linting runs by invoking your linter via npm scripts.
349
+
> **Good to know**: Prior to Next.js 16, `next build`ran linting automatically. Now, this automatic build-time linting has been removed. Control when linting runs by invoking your linter via npm scripts.
350
350
351
351
See the [ESLint Plugin](/docs/app/api-reference/config/next-config-js/eslint) page for more information.
-[ESLint in Next.js config](/docs/pages/api-reference/config/next-config-js/eslint)
123
117
124
-
Keep in mind that this may produce faulty deploys due to type errors or linting issues.
118
+
Keep in mind that this may produce faulty deploys due to type errors.
125
119
We strongly recommend only promoting builds to production after static analysis has completed.
126
120
If you deploy to Vercel, you can check out the [guide for staging deployments](https://vercel.com/docs/deployments/managing-deployments#staging-and-promoting-a-production-deployment) to learn how to promote builds to production after custom tasks have succeeded.
Copy file name to clipboardExpand all lines: docs/01-app/03-api-reference/05-config/03-eslint.mdx
-30Lines changed: 0 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,36 +230,6 @@ module.exports = {
230
230
}
231
231
```
232
232
233
-
## Disabling linting during production builds
234
-
235
-
If you do not want ESLint to run during `next build`, you can set the `eslint.ignoreDuringBuilds` option in `next.config.js` to `true`:
236
-
237
-
```ts filename="next.config.ts" switcher
238
-
importtype { NextConfig } from'next'
239
-
240
-
const nextConfig:NextConfig= {
241
-
eslint: {
242
-
// Warning: This allows production builds to successfully complete even if
243
-
// your project has ESLint errors.
244
-
ignoreDuringBuilds: true,
245
-
},
246
-
}
247
-
248
-
exportdefaultnextConfig
249
-
```
250
-
251
-
```js filename="next.config.js" switcher
252
-
constnextConfig= {
253
-
eslint: {
254
-
// Warning: This allows production builds to successfully complete even if
255
-
// your project has ESLint errors.
256
-
ignoreDuringBuilds:true,
257
-
},
258
-
}
259
-
260
-
exportdefaultnextConfig
261
-
```
262
-
263
233
### Migrating existing config
264
234
265
235
If you already have ESLint configured in your application, we recommend extending from this plugin directly instead of including `eslint-config-next` unless a few conditions are met.
"postsetup": "echo 'create the read token by following the rest of the guide: https://github.com/vercel/next.js/tree/canary/examples/cms-sanity#creating-a-read-token'",
0 commit comments