1.0.1 • Published 7 years ago

eslint-failing-rules v1.0.1

Weekly downloads
17
License
ISC
Repository
github
Last release
7 years ago

Build Status codecov JavaScript Style Guide

eslint-failing-rules

Gets failing ESLint rules.

Why?

You may like to use that somehow, somewhere.

How?

const eslint = require('eslint')
const getFailing = require('eslint-failing-rules')

getFailing(eslint, ['**/*.js']) // ['semi', 'no-unused-vars']

API

getFailing(eslint, files)

  • eslint What eslint@^3 exports
  • files Input for ESLint’s executeOnFiles(). E.g. ['**/*.js', '**/*.jsx']

Returns an array set of failed ESLint rules.

The purpose is to find the same failing rules that would be encountered when running ESLint the way it is usually run in a context.

For this purpose, CLIEngine is called without any options, so that any configuration files that are usually be used, would be used.