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

@putout/eslint

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/eslint

Wrapper that simplifies ESLint API and makes it compatible with 🐊Putout

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3K
decreased by-0.33%
Maintainers
1
Weekly downloads
 
Created
Source

@putout/eslint NPM version

Wrapper that simplifies ESLint API and makes it compatible with 🐊Putout.

Install

npm i @putout/eslint

API

ESLint begins his work as a formatter when 🐊Putout done his transformations. That's why it used a lot in different parts of application, for testing purpose and using API in a simplest possible way. You can access it with:

import eslint from '@putout/eslint';

To use it simply write:

const [source, places] = await eslint({
    name: 'hello.js',
    code: `const t = 'hi'\n`,
    fix: false,
});

Isn't it looks similar to 🐊Putout way? It definitely is! But... It has a couple differences you should remember:

And you can even override any of ESLint ⚙️ options with help of config property:

const [source, places] = await eslint({
    name: 'hello.js',
    code: `const t = 'hi'\n`,
    fix: false,
    config: {
        extends: [
            'plugin:putout/recommended',
        ],
    },
});

If you want to apply 🐊Putout transformations using putout/putout ESLint rule, enable 🐊Putout with the same called flag lowercased:

const [source, places] = await eslint({
    name: 'hello.js',
    code: `const t = 'hi'\n`,
    fix: true,
    putout: true,
    config: {
        extends: [
            'plugin:putout/recommended',
        ],
    },
});

It is disabled by default, because ESLint always runs after 🐊Putout transformations, so there is no need to traverse tree again.

License

MIT

Keywords

FAQs

Package last updated on 28 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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