You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@next/eslint-plugin-next

Package Overview
Dependencies
Maintainers
5
Versions
1891
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@next/eslint-plugin-next

ESLint plugin for Next.js.


Version published
Weekly downloads
5M
increased by0.04%
Maintainers
5
Install size
220 kB
Created
Weekly downloads
 

Package description

What is @next/eslint-plugin-next?

The @next/eslint-plugin-next package provides a set of ESLint rules specifically tailored for Next.js applications. It helps developers follow best practices and avoid common pitfalls when building applications with Next.js.

What are @next/eslint-plugin-next's main functionalities?

Page-level configuration enforcement

This feature enforces that page navigation within a Next.js application is done using the Link component from Next.js instead of raw HTML anchor tags. This ensures client-side navigation is properly handled.

module.exports = {
  extends: ['plugin:@next/next/recommended'],
  rules: {
    '@next/next/no-html-link-for-pages': 'error'
  }
};

No sync scripts

This rule prevents the use of synchronous scripts in Next.js pages, which can lead to performance issues. It encourages the use of Next.js's built-in script optimization features.

module.exports = {
  extends: ['plugin:@next/next/recommended'],
  rules: {
    '@next/next/no-sync-scripts': 'error'
  }
};

No CSS tags

This rule ensures that CSS is imported using Next.js's built-in CSS support rather than through raw <link> tags in the document head, which can lead to unoptimized loading of styles.

module.exports = {
  extends: ['plugin:@next/next/recommended'],
  rules: {
    '@next/next/no-css-tags': 'error'
  }
};

Other packages similar to @next/eslint-plugin-next

Readme

Source

@next/eslint-plugin-next

Documentation for @next/eslint-plugin-next can be found at: https://nextjs.org/docs/basic-features/eslint#eslint-plugin

FAQs

Package last updated on 07 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc