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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@derklinke/miedinger

v0.9.7

Published

Shared formatter configs

Downloads

2,484

Readme

miedinger

npm publish

This is my go-to collection of formatter configs that I use across all my projects. It's small, does what it says, and drops right into any repo with a single command. You get the config files, a Justfile recipe, pre-commit hooks, and even a sync workflow to keep things up to date.

Named after Max Miedinger, the designer behind Helvetica. Just like that typeface is timeless and beautiful, I'm aiming for the same kind of clean consistency in my code.

[!ATTENTION] Heads up: this tool is pretty opinionated about cleaning up your repo. It'll remove alternate configs (even in subfolders), overwrite your format recipe in Justfile, and replace .pre-commit-config.yaml entirely. Only use this if you're cool with that.

What’s inside

  • Swift: .swiftlint.yml, .swiftformat
  • C/C++/Obj-C: .clang-format, .clang-format-ignore
  • Markdown: .markdownlint.json, .markdownlintignore
  • Web: .prettierrc.json, .prettierignore
  • SQL: .sqlfluff

Getting started

Just run this and you're done:

npx @derklinke/miedinger --detect --force

Want it to commit the changes automatically? Add --commit (only works if your repo is clean).

Picking what you need

There are a few ways to choose which configs to install:

  • Auto-detect (default): --detect — looks at your repo and figures out what you need
  • Interactive menu: --interactive — shows you a picker to choose manually
  • Specific presets: --only swift,web — just install what you specify
  • See what's available: --list — shows all presets and files

The --force flag will overwrite any existing config files without asking.

How auto-detect works

When you use --detect, it looks at what's actually in your repo and picks the right configs for you. If you're in a git repo, it'll use git ls-files to scan. Otherwise, it walks the filesystem while skipping the usual suspects (.git, node_modules, .build, DerivedData, external).

Here's what triggers each preset:

  • Swift: Any .swift files, Package.swift, .xcodeproj, or .xcworkspace
  • Web: package.json, lockfiles, or any .js/.ts/.jsx/.tsx/.css/.scss/.html/.vue/.svelte/.astro files
  • Markdown: .md or .mdx files
  • C-family: .c/.h/.cpp/.hpp/.m/.mm/.cc/.cxx/.hxx files
  • SQL: .sql files

What the installer does

Behind the scenes, the installer tidies things up:

  • Removes old or alternate config filenames, including duplicates hiding in subfolders
  • Keeps one canonical config per tool at your repo root
  • If you've got a package.json, it'll install the Tailwind Prettier plugin (and the Astro plugin if it detects Astro files)
  • Auto-commits config changes only if you pass --commit
  • Sets up SQLFluff to ignore **/migrations/** by default (your migrations stay untouched)
  • Drops in a GitHub Actions workflow (.github/workflows/sync-format-configs.yml) that listens for updates from the miedinger-sync GitHub App

Justfile integration

If you already have a Justfile (or justfile), miedinger will take over the format recipe and replace any fmt/f aliases with its own managed block. This way just format works the same way in all your repos.

Some handy flags:

  • --just — creates a new Justfile if you don't have one yet
  • --no-just — skip Justfile stuff entirely
  • --commit — auto-commits the changes if it's safe to do so

The managed block adds:

  • An alias so you can type just fmt instead of just format
  • A [group('formatting')] tag to keep things organized
  • A format: recipe that runs just --fmt --unstable before formatting your code

The recipe is smart about what's installed — it only runs the tools you actually have available. Everything's wrapped in # format-configs / # /format-configs markers so it knows what it's managing.

Keeping configs in sync (recommended for multi-repo setups)

If you've got multiple repos and want them all to stay in sync, install the miedinger-sync GitHub App. It'll automatically trigger a sync on each repo whenever there's a new release.

The app sends a repository_dispatch event to your repos, and the workflow takes care of the rest.

GitHub Action for syncing

Want to run this in CI? There's a composite action you can use:

- name: Sync format configs
  uses: derKlinke/miedinger/.github/actions/sync-format-configs@main
  with:
    mode: detect
    force: "true"
    commit: "true"
    push: "true"

Here's what you can configure:

  • modedetect | interactive | only
  • only — comma or space-separated presets (when using mode: only)
  • force — set to "true" to overwrite existing files
  • target-dir — where to install (defaults to .)
  • commit — automatically commit changes
  • push — push the commit to origin
  • commit-message — customize the commit message
  • git-user-name, git-user-email — who shows up as the commit author

How releases work

This repo uses semantic-release to handle everything automatically:

  • Figures out version numbers from your commit messages (using Conventional Commits)
  • Updates CHANGELOG.md and package.json
  • Tags the release
  • Creates GitHub Releases
  • Publishes to npm

Every push to main kicks off a release (no more PRs for releases).

Pre-commit hooks

This works with prek (which is compatible with pre-commit). To set it up:

prek install

The installer will create a .pre-commit-config.yaml based on whichever presets you picked. The hooks are smart — they only run on files you've staged and only use the formatters that make sense for those files. If you've already got prek installed, the installer will run prek install for you automatically.

Project structure

  • configs/ — the actual config files that get copied to your repos
  • dist/ — the built CLI (what actually runs)
  • src/ — the TypeScript source code for the CLI

License

MIT. Check out LICENSE for details.