You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@poool/eslint-plugin

Package Overview
Dependencies
Maintainers
7
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@poool/eslint-plugin

Custom set of ESLint rules we need and enforce at Poool

3.0.0
latest
Source
npm
Version published
Weekly downloads
386
-65.99%
Maintainers
7
Weekly downloads
 
Created
Source

Poool ESLint Plugin

Custom set of ESLint rules we need and enforce at Poool

Installation

yarn add eslint @poool/eslint-plugin --dev

Usage

Load the plugin in your .eslintrc.json file:

{
  "plugins": ["@poool/eslint-plugin"]
}

Finally, enable all the rules you would like to use (don't forget to disable the corresponding core rule!):

{
  "rules": {
    "no-extra-parens": "off",
    "@poool/no-extra-parens": "error",
    "no-unneeded-ternary": "off",
    "@poool/no-unneeded-ternary": "error"
  }
}

Rules

NameDescriptionDocs
@poool/camelcasecamelcase, but doesn't complain about optional chainingdocumentation
@poool/no-extra-parensno-extra-parens, but allows conditional spreads to be wrapped with parenthesesdocumentation
@poool/no-unneeded-ternaryno-unneeded-ternary, but with an extra condition to disallow ternary expressions as expression statementsdocumentation

Shareable configurations

This plugin exports a recommended configuration that enforces some of our rules.

To enable this configuration use the extends property in your .eslintrc.json config file:

{
  "extends": ["plugin:@poool/eslint-plugin/recommended"]
}

FAQs

Package last updated on 08 Jun 2023

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