mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### What? - Added separate links for the app and pages router in the shared documentation. - Added comment at the top of all shared documentation. - Fixed typos in pages documentation comment. ### Why? - To limit the switching between the different routers in shared documentation when clicking the links.
23 lines
1.1 KiB
Plaintext
23 lines
1.1 KiB
Plaintext
---
|
|
title: eslint
|
|
description: Next.js reports ESLint errors and warnings during builds by default. Learn how to opt-out of this behavior here.
|
|
---
|
|
|
|
{/* The content of this doc is shared between the app and pages router. You can use the `<PagesOnly>Content</PagesOnly>` component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */}
|
|
|
|
When ESLint is detected in your project, Next.js fails your **production build** (`next build`) when errors are present.
|
|
|
|
If you'd like Next.js to produce production code even when your application has ESLint errors, you can disable the built-in linting step completely. This is not recommended unless you already have ESLint configured to run in a separate part of your workflow (for example, in CI or a pre-commit hook).
|
|
|
|
Open `next.config.js` and enable the `ignoreDuringBuilds` option in the `eslint` config:
|
|
|
|
```js filename="next.config.js"
|
|
module.exports = {
|
|
eslint: {
|
|
// Warning: This allows production builds to successfully complete even if
|
|
// your project has ESLint errors.
|
|
ignoreDuringBuilds: true,
|
|
},
|
|
}
|
|
```
|