Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lint-text

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lint-text - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

lib/index.js
const { CLIEngine } = require('eslint')
const lintText = (options, texts) => {
const lintText = (options, text) => {
const cliEngine = new CLIEngine(options)
return cliEngine.executeOnText(...texts)
return cliEngine.executeOnText(text)
}
module.exports = lintText
{
"name": "lint-text",
"version": "1.0.0",
"version": "1.0.1",
"description": "Convenience wrapper for ESLint’s CLIEngine.prototype.executeOnText()",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -13,3 +13,3 @@ [![Build Status](https://travis-ci.org/mightyiam/lint-text?branch=master)](https://travis-ci.org/mightyiam/lint-text)

const cli = new CLIEngine({ some: 'options' })
cli.executeOnText('some', 'texts')
cli.executeOnText('"some" && "code"')
```

@@ -21,3 +21,3 @@

const lintText = require('lint-text')
lintText({ some: 'options' }, ['some', 'texts'])
lintText({ some: 'options' }, ['"some" && "code"'])
```

@@ -33,9 +33,9 @@

### `lintText(options, texts)`
### `lintText(options, text)`
- `options`:
will be passed to the `CLIEngine` constructor ([ESLint docs](http://eslint.org/docs/developer-guide/nodejs-api#cliengine))
- `texts`:
will be passed as arguments to `executeOnText` ([ESLint docs](http://eslint.org/docs/developer-guide/nodejs-api#executeontext))
- `text`:
will be passed as first argument to `executeOnText` ([ESLint docs](http://eslint.org/docs/developer-guide/nodejs-api#executeontext))
Returns what `executeOnText` returns.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc