npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

Iโ€™ve always been into building performant and accessible sites, but lately Iโ€™ve been taking it extremely seriously. So much so that Iโ€™ve been building a tool to help me optimize and monitor the sites that I build to make sure that Iโ€™m making an attempt to offer the best experience to those who visit them. If youโ€™re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, ๐Ÿ‘‹, Iโ€™m Ryan Hefnerย  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If youโ€™re interested in other things Iโ€™m working on, follow me on Twitter or check out the open source projects Iโ€™ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soonโ€“ish.

Open Software & Tools

This site wouldnโ€™t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you ๐Ÿ™

ยฉ 2024 โ€“ย Pkg Stats / Ryan Hefner

eslint-plugin-putout

v23.2.0

Published

ESLint plugin for ๐ŸŠPutout

Downloads

47,073

Readme

eslint-plugin-putout NPM version Coverage Status

ESLint plugin for ๐ŸŠPutout with built-in rules from @putout/eslint-config.

Installation

npm i putout eslint eslint-plugin-putout -D

โ˜๏ธIf you installed eslint globally (using the -g flag) then you must also install putout and eslint-plugin-putout globally.

Usage

Add putout to the plugins section of your .eslintrc.json configuration file. You can omit the eslint-plugin- prefix:

{
    "extends": ["plugin:putout/recommended"],
    "plugins": ["putout"]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "putout/add-newlines-between-types-in-union": "error",
        "putout/add-newlines-between-specifiers": "error",
        "putout/add-newline-before-return": "error",
        "putout/add-newline-before-function-call": "error",
        "putout/add-newline-after-function-call": "error",
        "putout/putout": "error",
        "putout/array-element-newline": "error",
        "putout/single-property-destructuring": "error",
        "putout/multiple-properties-destructuring": "error",
        "putout/long-properties-destructuring": "error",
        "putout/destructuring-as-function-argument": "error",
        "putout/align-spaces": "error",
        "putout/keyword-spacing": "error",
        "putout/newline-function-call-arguments": "error",
        "putout/function-declaration-paren-newline": "error",
        "putout/remove-newline-after-default-import": "error",
        "putout/remove-newline-between-declarations": "error",
        "putout/remove-newline-from-empty-object": "error",
        "putout/remove-empty-newline-before-first-specifier": "error",
        "putout/remove-empty-newline-after-last-specifier": "error",
        "putout/remove-empty-newline-after-last-element": "error",
        "putout/remove-empty-newline-after-import": "error",
        "putout/remove-empty-specifiers": "error",
        "putout/objects-braces-inside-array": "error",
        "putout/object-property-newline": "error",
        "putout/tape-add-newline-between-tests": "error",
        "putout/tape-add-newline-before-assertion": "error",
        "putout/tape-remove-newline-before-t-end": "error"
    }
}

Rules

๐ŸŠ Putout

๐Ÿ“ผ Supertape

TypeScript

ESM

Formatting

Safe mode

When using ๐ŸŠPutout in IDE with --fix on save, or when you want to disable the most dangerous rules, use:

{
    "extends": ["plugin:putout/safe"],
    "plugins": ["putout"]
}

Disabled ESLint rules:

Disabled ๐ŸŠPutout rules:

safe+align

When you want to enable ability to align spaces on empty lines, while have all benefits of safe preset: use safe+align.

jsx

When you need to support jsx in files using js extension, use:

{
    "extends": [
        "plugin:putout/jsx"
    ],
    "plugins": [
        "putout"
    ]
}

esm

If you want to use ESM plugins of ๐ŸŠPutout you need to use esm preset:

{
    "extends": [
        "plugin:putout/esm"
    ],
    "plugins": [
        "putout"
    ]
}

Flat

The time is came for a FlatConfig. To use it with eslint-plugin-putout add to eslint.config.js:

const {recommended} = require('eslint-plugin-putout/config');

module.exports = [
    ...recommended,
    {},
];

safe and safeAlign supported as well.

License

MIT