Socket
Book a DemoInstallSign in
Socket

@percolate/eslint-plugin

Package Overview
Dependencies
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@percolate/eslint-plugin

Percolate's ESlint rules and configs

1.1.25
latest
Source
npmnpm
Version published
Maintainers
4
Created
Source

@percolate/eslint-plugin

Percolate ESlint configs/rules optimized for TypeScript.

Installation

$ yarn add @percolate/eslint-plugin --dev

Usage

Node

// .eslintrc.js
module.exports = {
    extends: ['plugin:@percolate/base', 'plugin:@percolate/node'],
    rules: {
        // configure rule
        '@percolate/import-blacklist': [
            'error',
            [
                {
                    import: 'underscore',
                    reason: 'Use lodash instead',
                },
            ],
        ],
    },
}

React

React, be sure to leverage the following config:

// .eslintrc.js
module.exports = {
    extends: ['plugin:@percolate/base', 'plugin:@percolate/react'],
}

eslint-plugin-import

The rule import/no-unresolved is on by default which means eslint-plugin-import has to be configured. plugin:@percolate/node configures eslint-import-resolver-node automatically.

Webpack

If you're using Webpack, you'll need to yarn add eslint-import-resolver-webpack --dev and configure it:

// .eslintrc.js
module.exports = {
    extends: ['plugin:@percolate/base', 'plugin:@percolate/react'],
    settings: {
        'import/resolver': {
            'eslint-import-resolver-webpack': {
                config: 'webpack.dev.config.js',
            },
        },
    },
}

Supported Configs

  • See configs

Supported Rules

See root README.md

FAQs

Package last updated on 28 May 2024

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.