karma-eslint
A Karma plugin for checking Syntax of JavaScript using ESLint.
Last updated 4 years ago by iamjoetaylor .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install karma-eslint 
SYNC missed versions from official npm registry.

karma-eslint

Installation

npm install karma-eslint --save-dev

Usage

In your karma.conf.js file:

  preprocessors: {
    '**/*.js': ['eslint']
  }

Options

Karma-eslint accepts these options:

stopOnError

  • fails a test on any error default: true

errorThreshold

  • a threshold value for total errors default: null
  • use with stopAboveErrorThreshold to stop build if errors exceed threshold

stopAboveErrorThreshold

  • stops build if errorThreshold exceeded default: false

stopOnWarning

  • fails a test on any Warning default: false
  • if set true, Warnings are always displayed

showWarnings

  • to display Warning messages default: true
  • has no effect if stopOnWarning is set true
  • in such case Warnings are displayed anyway

engine

Example:

  eslint: {
    errorThreshold: 1000,
    stopAboveErrorThreshold: true,
    stopOnError: false,
    stopOnWarning: true,
    showWarnings: true,
    engine: {
      configFile: 'client/.eslintrc'
    }
  }

ESLint

This plugin leverages ESLints normal configuration methods. The full list of ESLint rules are here.


For more information on Karma visit the Karma site.

Current Tags

  • 2.2.0                                ...           latest (4 years ago)

4 Versions

  • 2.2.0                                ...           4 years ago
  • 2.1.0                                ...           4 years ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 18
This Month 42
Last Day 7
Last Week 20
Last Month 71
Dependencies (2)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |