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

@jacobknightley/fabric-format

v0.0.9

Published

A fast, opinionated formatter for Microsoft Fabric notebooks with Spark SQL and Python support

Readme

fabric-format

A zero-config formatter for Microsoft Fabric notebooks.

Philosophy

Opinionated by design. This formatter has one style, enforced everywhere, with no configuration options—and no plans to add any.

Built this for teams who want consistent notebook formatting without endless debates over style guides. The decisions are made. Your code looks the same every time.

The focus is on clean, consistent output—not tailored experiences or nuanced edge cases.

Browser Extension

Format Fabric notebooks directly in your browser with a single click.

ExtensionDemo

  1. Install the Edge extension Edge Add-ons

    Until Chrome is supported, download the extension and unpack in chrome developer mode

  2. Open a notebook in Microsoft Fabric
  3. Click the Format button in Fabric notebook toolbar button in the notebook toolbar

CLI

Format Fabric notebook-content files synced from a workspace in a repository.

# install
npm install -g @jacobknightley/fabric-format

# format
fabfmt format notebook.py                                # Format a single file
fabfmt format ./src                                      # Format all files in directory
fabfmt format query.sql --print                          # Print formatted output
fabfmt format --type sparksql -i "select * from t"       # Format inline string
echo "select * from t" | fabfmt format --type sparksql   # Format from stdin

# check (exit 1 if changes needed)
fabfmt check notebook.py                                # Check a single file
fabfmt check ./src                                      # Check all files in directory
fabfmt check --type sparksql -i "select * from t"       # Check inline string
echo "select * from t" | fabfmt check --type sparksql   # Check from stdin

Supported File Types

  • .py — Python notebooks
  • .scala — Scala notebooks
  • .r — R notebooks
  • .sql — SQL notebooks

Language Support

Spark SQL

The SQL formatter uses an ANTLR grammar to parse and reformat Spark SQL. All keywords, functions, and syntax are derived directly from the official Spark SQL grammar.

See SQL_STYLE_GUIDE.md for formatting rules.

Python / PySpark

The Python formatter uses Ruff WASM for:

  1. Code formatting — Consistent styling (line length 140, double quotes, trailing commas)
  2. Safe lint auto-fixes — Automatically applies safe fixes from ~60 Ruff rules

Included lint auto-fixes:

  • Import sorting (I001) — Organizes imports by standard library, third-party, local
  • Modernization (UP008, UP018, UP032) — Updates deprecated patterns to modern Python
  • Simplifications (SIM118, SIM201, SIM300) — key in dict instead of key in dict.keys(), etc.
  • Bug fixes (B009, B010) — Use getattr()/setattr() properly
  • Style (E703, E711, F632) — Remove useless semicolons, use is None, etc.
  • Ruff specific (RUF005) — List concatenation with unpacking

Explicitly excluded rules (unsafe for notebooks):

  • F401, F841 — Unused imports/variables may be used in other cells
  • Rules that add imports (RUF017, SIM105, etc.) — Can break cell execution order
  • RET504 — Removing intermediate variables changes code structure

The lint fixes are applied automatically—no configuration needed.

Documentation

Find all documentation at fabric-format wiki