Skip to content

Commit

Permalink
Skip pagesDirRules when pagesDir is not present (#41075)
Browse files Browse the repository at this point in the history
Follow up for #40132

Do not apply pages lint rule `@next/next/no-html-link-for-pages` for
appDir
  • Loading branch information
huozhi committed Sep 30, 2022
1 parent fd6c907 commit a7f0332
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/lib/eslint/runLintCheck.ts
Expand Up @@ -154,7 +154,6 @@ async function lint(

let nextEslintPluginIsEnabled = false
const nextRulesEnabled = new Map<string, Severity>()
const pagesDirRules = ['@next/next/no-html-link-for-pages']

for (const configFile of [eslintrcFile, pkgJsonPath]) {
if (!configFile) continue
Expand Down Expand Up @@ -187,6 +186,7 @@ async function lint(
}

const pagesDir = findPagesDir(baseDir, hasAppDir).pages
const pagesDirRules = pagesDir ? ['@next/next/no-html-link-for-pages'] : []

if (nextEslintPluginIsEnabled) {
let updatedPagesDir = false
Expand Down

0 comments on commit a7f0332

Please sign in to comment.