Socket
Socket
Sign inDemoInstall

@babel/eslint-plugin

Package Overview
Dependencies
Maintainers
4
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/eslint-plugin

Companion rules for @babel/eslint-parser


Version published
Weekly downloads
462K
decreased by-1.83%
Maintainers
4
Weekly downloads
 
Created

What is @babel/eslint-plugin?

@babel/eslint-plugin is an ESLint plugin that allows you to lint your Babel code. It provides rules and configurations to ensure that your code adheres to best practices and coding standards when using Babel.

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

Linting Babel Code

This configuration file sets up ESLint to use the @babel/eslint-parser and includes several rules from the @babel/eslint-plugin. These rules help enforce coding standards and best practices for Babel code.

module.exports = {
  parser: '@babel/eslint-parser',
  plugins: ['@babel'],
  rules: {
    '@babel/new-cap': 'error',
    '@babel/no-invalid-this': 'error',
    '@babel/no-unused-expressions': 'error',
    '@babel/object-curly-spacing': ['error', 'always'],
    '@babel/semi': ['error', 'always']
  }
};

Custom Babel Rules

This example demonstrates how to configure ESLint to use specific rules from the @babel/eslint-plugin. The rules '@babel/no-invalid-this' and '@babel/no-unused-expressions' are enabled to catch common issues in Babel code.

module.exports = {
  parser: '@babel/eslint-parser',
  plugins: ['@babel'],
  rules: {
    '@babel/no-invalid-this': 'error',
    '@babel/no-unused-expressions': 'error'
  }
};

Other packages similar to @babel/eslint-plugin

Keywords

FAQs

Package last updated on 08 Apr 2024

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc