lint-filesdeprecated

Convenience wrapper for ESLint’s CLIEngine.prototype.executeOnFiles()

Usage no npm install needed!

<script type="module">
  import lintFiles from 'https://cdn.skypack.dev/lint-files';
</script>

README

Build Status Standard - JavaScript Style Guide

lint-files

Convenience wrapper for ESLint’s CLIEngine.prototype.executeOnFiles()

Instead of

const { CLIEngine } = require('eslint')
const cli = new CLIEngine({ some: 'options' })
cli.executeOnFiles(['some', 'files'])

Do

const lintFiles = require('lint-files')
lintFiles({ some: 'options' }, ['some', 'files'])

Features

  • one line less
  • no new
  • tested better than patience

API

lintFiles(options, files)

  • options:
    will be passed to the CLIEngine constructor (ESLint docs)
  • files:
    will be passed to executeOnFiles (ESLint docs)

Returns what executeOnFiles returns.