Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hint/parser-babel-config

Package Overview
Dependencies
Maintainers
5
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hint/parser-babel-config

webhint parser to analyze babel config

  • 2.1.43
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19K
decreased by-4.77%
Maintainers
5
Weekly downloads
 
Created
Source

Babel config (@hint/parser-babel-config)

The babel-config parser allows the user to analyze the Babel configuration in their projects.

This package is installed automatically by webhint:

npm install hint --save-dev

To use it, activate it via the .hintrc configuration file:

And then activate it via the .hintrc configuration file:

{
    "connector": {...},
    "formatters": [...],
    "hints": {
        ...
    },
    "parsers": ["babel-config"],
    ...
}

This parser detects if a .babelrc configuration file is present, or if the Babel configuration is specified in package.json, and validates the Babel configuration against the schema.

Note: The recommended way of running webhint is as a devDependency of your project.

Events emitted

This parser emits the following events:

  • parse::start::babel-config, of type BabelConfigParseStart which contains the following information:

    • resource: the resource we are going to parse.
  • parse::end::babel-config, of type BabelConfigParse which contains the following information:

    • resource: the parsed resource.
    • config: an object with a valid configuration.
  • parse::error::babel-config::json, of type BabelConfigInvalidJSON which contains the following information:

    • resource: the parsed resource.
    • error: the error emited parsing the configuration file.
  • parse::error::babel-config::circular, of type BabelConfigInvalidJSON which contains the following information:

    • resource: the parsed resource.
    • error: the error emited parsing the configuration file.
  • parse::error::babel-config::extends, of type BabelConfigInvalidJSON which contains the following information:

    • resource: the parsed resource.
    • error: the error emited parsing the configuration file.
  • parse::error::babel-config::schema, of type BabelConfigInvalidSchema which contains the following information:

    • resource: the parsed resource.
    • errors: all the errors that the schama validator returns.

Types

If you need to import any type or enum defined in this parser, you need to import them as follows:

import { TypeOrEnumYouWantToUse } from '@hint/parser-babel-config';

Keywords

FAQs

Package last updated on 29 Aug 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