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

@putout/plugin-putout-config

v7.1.0

Published

๐ŸŠPutout plugin helps to maintain putout config

Downloads

60,135

Readme

@putout/plugin-putout-config NPM version

๐ŸŠPutout plugin helps with ๐ŸŠPutout Config.

Install

npm i @putout/plugin-putout-config -D

Rules

Config

{
    "rules": {
        "putout-config/apply-conditions": "on",
        "putout-config/apply-esm": "on",
        "putout-config/apply-for-of": "on",
        "putout-config/apply-labels": "on",
        "putout-config/apply-math": "on",
        "putout-config/apply-nodejs": "on",
        "putout-config/apply-optional-chaining": "on",
        "putout-config/apply-tape": "on",
        "putout-config/apply-types": "on",
        "putout-config/apply-promises": "on",
        "putout-config/convert-boolean-to-string": "on",
        "putout-config/move-formatter-up": "on",
        "putout-config/remove-empty": "on",
        "putout-config/remove-empty-file": "off",
        "putout-config/rename-rules": "on"
    }
}

apply-esm

Apply esm according to:

{
    "rules": {
-       "remove-empty/import": "on",
-       "remove-empty/export": "on",
+       "esm/remove-empty-import": "on",
+       "esm/remove-empty-export": "on",
-       "group-imports-by-source": "on",
-       "declare-imports-first": "on",
-       "remove-quotes-from-import-assertions": "on",
-       "merge-duplicate-imports": "on"
+       "esm/group-imports-by-source": "on",
+       "esm/declare-imports-first": "on",
+       "esm/remove-quotes-from-import-assertions": "on",
+       "esm/merge-duplicate-imports": "on"
  }
}

apply-optional-chaining

Apply optional-chaining according to:

{
    "rules": {
-       "convert-optional-to-logical/assign": "on",
-       "convert-optional-to-logical/call": "off",
+       "optional-chaining/convert-optional-assign-to-logical": "on",
+       "optional-chaining/convert-optional-to-logical": "off"
-       "apply-optional-chaining/assign": "off"
-       "apply-optional-chaining/use": "on"
+       "optional-chaining/convert-logical-assign-to-optional": "off",
+       "optional-chaining/convert-logical-to-optional": "off"
  }
}

apply-conditions

Apply conditions according to:

{
    "rules": {
-       "apply-comparison-order": "off" ,
-       "apply-if-condition": "off",
-       "convert-comparison-to-boolean": "off",
-       "convert-equal-to-strict-equal": "off",
-       "remove-useless-conditions/evaluate": "off",
-       "remove-useless-conditions/simplify": "off",
-       "convert-comparison-to-boolean": "off",
-       "remove-constant-conditions": "off",
-       "remove-boolean-from-assertions": "off",
+       "conditions/apply-comparison-order": "off",
+       "conditions/apply-if": "off",
+       "conditions/convert-comparison-to-boolean": "off",
+       "conditions/convert-equal-to-strict-equal": "off",
+       "conditions/evaluate": "off"
+       "conditions/simplify": "off",
+       "conditions/convert-comparison-to-boolean": "off",
+       "conditions/remove-constant": "off",
+       "conditions/remove-boolean": "off"
  }
}
{
    "rules": {
-        "remove-useless-else": "off",
-        "merge-if-statements": "off"
+        "conditions/remove-useless-else": "off",
+        "conditions/merge-if-statements": "off"
    }
}

apply-for-of

Apply for-of according to ๐ŸŠPutout v29.

{
    "rules": {
-       "convert-for-to-for-of": "off",
-       "convert-for-each-to-for-of": "off",
-       "convert-for-in-to-for-of": "off",
-       "convert-map-to-for-of": "off",
-       "remove-useless-for-of": "off",
-       "remove-unused-for-of-variables": "off",
-       "remove-useless-array-from": "off",
-       "remove-useless-variables/for-of": "off"
-       "convert-reduce-to-for-of": "off",
+       "for-of/for": "off",
+       "for-of/for-each": "off",
+       "for-of/for-in": "off",
+       "for-of/map": "off",
+       "for-of/remove-useless": "off",
+       "for-of/remove-unused-variables": "off",
+       "for-of/remove-useless-array-from": "off",
+       "for-of/remove-useless-variables": "off",
+       "for-of/reduce": "off"
    }
}

apply-labels

Apply labels according to ๐ŸŠPutout v36. Checkout in ๐ŸŠPutout Editor.

โŒ Example of incorrect code

{
    "rules": {
        "remove-unused-labels": "on",
        "convert-label-to-object": "on"
    }
}

โœ… Example of correct code

{
    "rules": {
        "labels/remove-unused": "on",
        "labels/convert-to-object": "on"
    }
}

apply-math

Apply math according to ๐ŸŠPutout v28.

{
    "rules": {
-        "convert-math-pow": "off",
-        "apply-numeric-separators": "off",
-        "convert-imul-to-multiplication": "off",
-        "convert-sqrt-to-hypot": "off"
+        "math/apply-exponential": "off",
+        "math/apply-numeric-separators": "off",
+        "math/apply-multiplication": "off",
+        "math/convert-sqrt-to-hypot": "off"
    }
}

apply-nodejs

Apply nodejs according to:

{
    "rules": {
-       "convert-top-level-return": "off",
+       "nodejs/convert-top-level-return": "off"
-       "remove-process-exit": "off"
+       "nodejs/remove-process-exit": "off"
    }
}
{
    "rules": {
-    "convert-esm-to-commonjs": "on",
-    "convert-commonjs-to-esm": "on'
+    "nodejs/convert-esm-to-commonjs": "on",
+    "nodejs/convert-commonjs-to-esm": "on'
    }
}
{
    "rules": {
-       "strict-mode/add-missing": "off",
-       "strict-mode/remove-useless": "off"
+       "nodejs/remove-useless-strict-mode": "off",
+       "nodejs/add-missing-strict-mode": "off"
}

apply-promises

Apply promises according to:

{
    "rules": {
-       "remove-useless-variables/await": "off",
+       "promises/remove-useless-variables": "off"
    }
}

apply-tape

Apply tape according to:

โŒ Example of incorrect code

{
    "rules": {
        "convert-mock-require-to-mock-import": "off"
    }
}

โœ… Example of correct code

{
    "rules": {
        "tape/convert-mock-require-to-mock-import": "off"
    }
}

apply-types

Apply types according to:

{
    "rules": {
-       "convert-typeof-to-is-type": "off" ,
-       "remove-useless-type-conversions": "off",
-       "remove-useless-typeof": "off",
-       "apply-is-array": "off",
-       "remove-useless-type-conversion/with-double-negations": "off",
+       "types/convert-typeof-to-is-type": "off",
+       "types/remove-useless-conversion": "off",
+       "types/remove-double-negations": "off",
+       "types/remove-useless-typeof": "off",
+       "types/apply-is-array": "off",
+       "types/remove-double-negations": "off"
  }
}

convert-boolean-to-string

โŒ Example of incorrect code

{
    "rules": {
        "remove-unused-variables": true,
        "remove-debugger": false
    }
}

โœ… Example of correct code

{
    "rules": {
        "remove-unused-variables": "on",
        "remove-debugger": "off"
    }
}

move-formatter-up

Checkout in ๐ŸŠPutout Editor.

โŒ Example of incorrect code

{
    "parser": "babel",
    "rules": {
        "remove-unused-variables": "off"
    },
    "formatter": "progress-bar"
}

โœ… Example of correct code

{
    "parser": "babel",
    "formatter": "progress-bar",
    "rules": {
        "remove-unused-variables": "off"
    }
}

remove-empty

โŒ Example of incorrect code

{
    "rules": {},
    "plugins": [],
    "match": {
        "*.js": {
            "remove-unused-variables": "off"
        }
    }
}

โœ… Example of correct code

{
    "match": {
        "*.js": {
            "remove-unused-variables": "off"
        }
    }
}

remove-empty-file

Checkout in ๐ŸŠPutout Editor. When .putout.json content is:

{}

It has no sense and removed:

 /
 `-- /
-     `-- .putout.json

rename-rules

Rename rules according to:

{
    "rules": {
-       "declare-undefined-variables": "off" ,
+       "declare": "off",
-       "apply-maybe": "off" ,
+       "maybe": "off",
-       "apply-array-at": "off",
+       "apply-at": "off",
    }
}
{
    "rules": {
-       "strict-mode/add": "off",
-       "strict-mode/remove": "off",
+       "strict-mode/add-missing": "off",
+       "strict-mode/remove-useless": "off",
    }
}

License

MIT