lint-text
v1.0.1
Published
Convenience wrapper for ESLint’s CLIEngine.prototype.executeOnText()
Maintainers
Readme
lint-text
Convenience wrapper for ESLint’s CLIEngine.prototype.executeOnText()
Instead of
const { CLIEngine } = require('eslint')
const cli = new CLIEngine({ some: 'options' })
cli.executeOnText('"some" && "code"')Do
const lintText = require('lint-text')
lintText({ some: 'options' }, ['"some" && "code"'])Features
- one line less
- no
new - tested better than patience
API
lintText(options, text)
options:
will be passed to theCLIEngineconstructor (ESLint docs)text:
will be passed as first argument toexecuteOnText(ESLint docs)
Returns what executeOnText returns.
