Nighttime Possum Meandering
    Have ideas to improve npm?Join in the discussion! »

    babel-plugin-eslint-validation

    1.0.1 • Public • Published

    npm node deps

    babel-plugin-eslint-validation

    A babel plugin that validate files with eslint rules.

    Installation

    npm install --save-dev babel-plugin-eslint-validation

    Usage

    Via .babelrc (Recommended)

    .babelrc

    // without options
    {
      "plugins": ["babel-plugin-eslint-validation"]
    }
     
    // with options
    {
      "plugins": [
        ["babel-plugin-eslint-validation", {
            "fix": false,
            "formatter": "stylish",
            "failOnError": true,
            "failOnWarning": false
        }]
      ]
    }

    Via CLI

    babel --plugins babel-plugin-eslint-validation script.js

    Via Node API

    require("@babel/core").transform("code", {
      plugins: ["babel-plugin-eslint-validation"]
    });

    Options

    fix (default: false)

    This option will enable ESLint autofix feature.

    formatter (default: eslint stylish formatter)

    You can use official eslint formatters, or the path to a custom formatter

    {
      "plugins": [
        ["babel-plugin-eslint-validation", {
            "formatter": "eslint-friendly-formatter"
        }]
      ]
    }

    eslintPath (default: "eslint")

    Path to eslint instance that will be used for linting.

    failOnWarning (default: false)

    Loader will cause the module build to fail if there are any eslint warnings.

    failOnError (default: false)

    Loader will cause the module build to fail if there are any eslint errors.

    Keywords

    Install

    npm i babel-plugin-eslint-validation

    DownloadsWeekly Downloads

    3

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • avatar