From ab69166d86767ba7837543ef61ddbdd872bceaab Mon Sep 17 00:00:00 2001 From: Jam Balaya Date: Fri, 8 Nov 2024 07:00:29 +0900 Subject: [PATCH] chore: update eslint document path (#72483) ## Description At #72178, [ESLint](https://nextjs.org/docs/app/api-reference/config/eslint) docs was moved. So update the old URLs. ### Improving Documentation - [x] Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - [x] Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com> --- packages/eslint-config-next/package.json | 2 +- packages/eslint-plugin-next/README.md | 2 +- packages/next/src/lib/eslint/customFormatter.ts | 2 +- packages/next/src/lib/eslint/runLintCheck.ts | 6 +++--- packages/next/src/server/config-shared.ts | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json index b8b7af41eefe0..494012c63ea82 100644 --- a/packages/eslint-config-next/package.json +++ b/packages/eslint-config-next/package.json @@ -8,7 +8,7 @@ "url": "vercel/next.js", "directory": "packages/eslint-config-next" }, - "homepage": "https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config", + "homepage": "https://nextjs.org/docs/app/api-reference/config/eslint#eslint-config", "dependencies": { "@next/eslint-plugin-next": "15.0.3", "@rushstack/eslint-patch": "^1.10.3", diff --git a/packages/eslint-plugin-next/README.md b/packages/eslint-plugin-next/README.md index fde98d768f95e..28050944f56c6 100644 --- a/packages/eslint-plugin-next/README.md +++ b/packages/eslint-plugin-next/README.md @@ -1,4 +1,4 @@ # `@next/eslint-plugin-next` Documentation for `@next/eslint-plugin-next` can be found at: -https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-plugin +https://nextjs.org/docs/app/api-reference/config/eslint#eslint-plugin diff --git a/packages/next/src/lib/eslint/customFormatter.ts b/packages/next/src/lib/eslint/customFormatter.ts index b6cb56c767467..233aad791628b 100644 --- a/packages/next/src/lib/eslint/customFormatter.ts +++ b/packages/next/src/lib/eslint/customFormatter.ts @@ -131,7 +131,7 @@ export async function formatResults( ? output + `\n\n${cyan( 'info' - )} - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/app/building-your-application/configuring/eslint#disabling-rules` + )} - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/app/api-reference/config/eslint#disabling-rules` : '', totalNextPluginErrorCount, totalNextPluginWarningCount, diff --git a/packages/next/src/lib/eslint/runLintCheck.ts b/packages/next/src/lib/eslint/runLintCheck.ts index a39b9ed3fe508..9d78b59c08b59 100644 --- a/packages/next/src/lib/eslint/runLintCheck.ts +++ b/packages/next/src/lib/eslint/runLintCheck.ts @@ -52,7 +52,7 @@ async function cliPrompt(cwd: string): Promise<{ config?: any }> { bold( `${cyan( '?' - )} How would you like to configure ESLint? https://nextjs.org/docs/app/building-your-application/configuring/eslint` + )} How would you like to configure ESLint? https://nextjs.org/docs/app/api-reference/config/eslint` ) ) @@ -263,7 +263,7 @@ async function lint( } else { Log.warn('') Log.warn( - 'The Next.js plugin was not detected in your ESLint configuration. See https://nextjs.org/docs/app/building-your-application/configuring/eslint#migrating-existing-config' + 'The Next.js plugin was not detected in your ESLint configuration. See https://nextjs.org/docs/app/api-reference/config/eslint#migrating-existing-config' ) } @@ -423,7 +423,7 @@ export async function runLintCheck( if (selectedConfig == null) { // Show a warning if no option is selected in prompt Log.warn( - 'If you set up ESLint yourself, we recommend adding the Next.js ESLint plugin. See https://nextjs.org/docs/app/building-your-application/configuring/eslint#migrating-existing-config' + 'If you set up ESLint yourself, we recommend adding the Next.js ESLint plugin. See https://nextjs.org/docs/app/api-reference/config/eslint#migrating-existing-config' ) return null } else { diff --git a/packages/next/src/server/config-shared.ts b/packages/next/src/server/config-shared.ts index 0545d534a3294..680164ab6ffc1 100644 --- a/packages/next/src/server/config-shared.ts +++ b/packages/next/src/server/config-shared.ts @@ -631,7 +631,7 @@ export interface NextConfig extends Record { /** * @since version 11 - * @see [ESLint configuration](https://nextjs.org/docs/app/building-your-application/configuring/eslint) + * @see [ESLint configuration](https://nextjs.org/docs/app/api-reference/config/eslint) */ eslint?: ESLintConfig