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

babel-plugin-eslint-test-generator

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-eslint-test-generator

This is a Babel Plugin which will generate ci tests based on eslint results. Basically developers can't ignore linting when it's in CI

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

babel-plugin-eslint-test-generator

This is a Babel Plugin which will generate ci tests based on eslint results. Basically developers can't ignore linting when it's in CI

Installation

$ npm install babel-plugin-eslint-test-generator

Example

The following is an example .babelrc file:

{
  "presets": ["es2015"],
  "plugins": [
    ["eslint-test-generator", {
      "template": "mocha",
      "paths": [
        "src/**/*.js",
        "test/**/*.js",
      ]
    }]
  ]
}

Using with .eslintrc

It should be noted when using this module you should use explicit paths to plugins in your .eslintrc. For instance:

"extends": [
  "./node_modules/coding-standard/eslintDefaults.js",
  "./node_modules/coding-standard/.eslintrc-es6",
  "./node_modules/coding-standard/.eslintrc-jsx"
]

More on that here: http://eslint.org/docs/user-guide/configuring#using-a-configuration-file

Plugin Options

  • template- Required String which can be either be a handlebars template. Or one of the following if you'd like to use a pre-existing template:
    • mocha
    • qunit
  • paths - Required Array or String. Paths can be an Array of glob strings defining which files should be linted. You can also pass in a glob string instead of an Array.
  • file - A String that is a file that we'd like to append the generated tests into. eg. 'test-lint.js'
  • optsEslint - Optional eslint options object.
  • maxWarnings - Optional (default: -1), equivalent to --max-warnings on eslint's CLI. -1 means there is no maximum.

License

MIT, see LICENSE.md for details.

Keywords

FAQs

Package last updated on 20 Oct 2016

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