# lint-text

> Convenience wrapper for ESLint’s CLIEngine.prototype.executeOnText()

Latest version **1.0.1** (published 2017-01-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install lint-text
pnpm add lint-text
yarn add lint-text
bun add lint-text
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-01-22 |
| First published | 2017-01-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shahar Or |
| Maintainers | mightyiam |
| Keywords | eslint, cliengine, cli-engine, executeOnText, execute-on-text, wrapper, pure, functional |

## Links

- npm: https://www.npmjs.com/package/lint-text
- Repository: https://github.com/mightyiam/lint-text
- Homepage: https://github.com/mightyiam/lint-text#readme
- Issues: https://github.com/mightyiam/lint-text/issues
- npm.io page: https://npm.io/package/lint-text

## Dependencies (1)

- [eslint](https://npm.io/package/eslint.md) ^3.13.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-01-22
- 1.0.0 — 2017-01-17

## README

[![Build Status](https://travis-ci.org/mightyiam/lint-text?branch=master)](https://travis-ci.org/mightyiam/lint-text)
[![Standard - JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

# lint-text

Convenience wrapper for ESLint’s `CLIEngine.prototype.executeOnText()`

Instead of

```js
const { CLIEngine } = require('eslint')
const cli = new CLIEngine({ some: 'options' })
cli.executeOnText('"some" && "code"')
```

Do

```js
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 the `CLIEngine` constructor ([ESLint docs](http://eslint.org/docs/developer-guide/nodejs-api#cliengine))
- `text`:  
  will be passed as first argument to `executeOnText` ([ESLint docs](http://eslint.org/docs/developer-guide/nodejs-api#executeontext))

Returns what `executeOnText` returns.

---
_Source: https://npm.io/package/lint-text · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
