Logo
  • DB
  • About
  • Updates
@next/eslint-plugin-next

ESLint plugin for Next.js.

❯ npm i --save-dev @next/eslint-plugin-next
📖 README🐛 BugsGitHub LogoGitHubnpm Logonpmnext
🕵️‍♂️ Linter
  • 2 Configs
  • 21 Rules
GitHub LogoGitHub
  • JavaScript
  • 116.3K Stars
  • 1.4K Watchers
npm Logonpm
  • 2.5M Wkly Downloads
  • +33% WoW
  • 14.0.4 79.5 kB
🗂️ Keywords
  • blog
  • browser
  • compiler
  • components
  • hybrid
  • ...
ConfigurationRules
🔴 core-web-vitals2
recommended6 error • 15 warn
RuleDescription🔧💡💭🗂️⚙️🔴
google-font-display

Enforce font-display behavior with Google Fonts.

⚠️
google-font-preconnect

Ensure preconnect is used with Google Fonts.

⚠️
inline-script-id

Enforce id attribute on next/script components with inline content.

next-script-for-ga

Prefer next/script component when using the inline script for Google Analytics.

⚠️
no-assign-module-variable

Prevent assignment to the module variable.

no-async-client-component

Prevent client components from being async functions.

⚠️
no-before-interactive-script-outside-document

Prevent usage of next/script's beforeInteractive strategy outside of pages/_document.js.

⚠️
no-css-tags

Prevent manual stylesheet tags.

⚠️
no-document-import-in-page

Prevent importing next/document outside of pages/_document.js.

no-duplicate-head

Prevent duplicate usage of <Head> in pages/_document.js.

no-head-element

Prevent usage of <head> element.

⚠️
no-head-import-in-document

Prevent usage of next/head in pages/_document.js.

no-html-link-for-pages

Prevent usage of <a> elements to navigate to internal Next.js pages.

🔴⚠️
no-img-element

Prevent usage of <img> element due to slower LCP and higher bandwidth.

⚠️
no-page-custom-font

Prevent page-only custom fonts.

⚠️
no-script-component-in-head

Prevent usage of next/script in next/head component.

no-styled-jsx-in-document

Prevent usage of styled-jsx in pages/_document.js.

⚠️
no-sync-scripts

Prevent synchronous scripts.

🔴⚠️
no-title-in-document-head

Prevent usage of <title> with Head component from next/document.

⚠️
no-typos

Prevent common typos in Next.js data fetching functions.

⚠️
no-unwanted-polyfillio

Prevent duplicate polyfills from Polyfill.io.

⚠️
© 2024 Lintbase