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

patched

v0.3.0

Published

Patched is a comprehensive and opinionated linter and formatter

Downloads

2

Readme

Patched

Comprehensive and opinionated linter and formatter (it's just an ESLint wrapper)

(Inspired by the convenience of XO, the criticism from FreeBSD via Standard, and more...)

After compiling a large number of eslint configs for the many plugins that I try to use, it seemed like a good idea to just bundle them all up together to make things easier. As such, Patched was created!

I haven't written any tests, yet. However, things appear to be functional thus far. That means this is currently a WORK IN PROGRESS.

The goal for Patched, like the other fantastic linters & formatters, is to simplify the very importing linting process by making it:

  • easier: By not requiring any configuration or plugins to install
  • smarter: By detecting features and correctly loading the appropriate rules (and any patches) on it's own).

Installation

yarn add patched

Highlights

  1. Since many plugins often compliment or conflict with eachother, Patched uses predefined plugin groups (based on language, framework, etc.) to load plugins, rather than specifying any plugins individually.
  2. Plugin groups are automatically determined at runtime by testing for some simple criteria (eg: file extension, source code content, dependency existence, etc.)
  3. Each plugin used has its own ruleset loaded which each contain:
  • rules: The default rules to apply for the plugin (as if it were the only rules used).
  • patches: A collection of rules to apply to other plugin's because their rules conflict with ours.
  • options: Any additional options that may need to be included within the final eslint config. (ie: tsconfigRootDir, project, import/resolver, etc.)
  1. Plugins are always loaded in the same order, and the final config is generated in 3 stages to ensure the rules used are always what's expected.
  • Load the rulesets for each plugin.
  • Apply the rules for each plugin (in order)
  • Find & apply any patches (from any sibling rulesets).

Summary

Name | Value --- | --- space type | space space size | 2 if/else style | stroustrup semi | prefer ASI, except for ;((){ }) quotes | double quote props | when necessary line length | 88 (Hi, Black!)

Integrations

  1. coc.nvim: Forking coc-eslint was simple enough, so patched integration will be available soon.