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

@nldoc/configs

v1.5.6

Published

A package containing default configuration for NLDoc Typescript projects

Downloads

188

Readme

@nldoc/configs

pipeline status Latest Release

Shared TypeScript, ESLint, and Prettier configurations for NLdoc projects

Features

  • 🎯 ESLint Configuration - Strict TypeScript-first ESLint setup with recommended rules
  • 💅 Prettier Configuration - Consistent code formatting across all NLdoc projects
  • 🔧 Next.js Support - Specialized configurations for Next.js applications
  • 🛠️ Utility Functions - Helper functions for ESLint compatibility with legacy plugins
  • 📦 Zero Config - Works out of the box with sensible defaults
  • 🔄 ESLint 9+ Flat Config - Modern ESLint flat configuration format

Installation

Prerequisites

  • Node.js >= 22
  • npm or yarn
  • TypeScript project with tsconfig.json

Install the package

npm install @nldoc/configs --save-dev

Getting Started

Basic Setup

Create the following configuration files in your project root:

ESLint Configuration

Create eslint.config.mjs:

// @ts-check
import baseConfig from '@nldoc/configs/eslint.config.mjs'
import tseslint from 'typescript-eslint'

export default tseslint.config(...baseConfig, {
  // Add your custom rules here
})

Prettier Configuration

Create prettier.config.mjs:

// @ts-check
import baseConfig from '@nldoc/configs/prettier.config.mjs'

export default {
    ...baseConfig,
    // Add your custom rules here
}

Next.js Projects

For Next.js applications, use the specialized configurations:

Next.js ESLint Configuration

// eslint.config.mjs
// @ts-check
import baseConfig from '@nldoc/configs/nextjs.eslint.config.mjs'
import tseslint from 'typescript-eslint'

export default tseslint.config(...baseConfig, {
  // Add your custom rules here
})

Next.js Prettier Configuration

// prettier.config.mjs
// @ts-check
import baseConfig from '@nldoc/configs/nextjs.prettier.config.mjs'

export default {
    ...baseConfig,
    // Add your custom rules here
}

Configuration Details

ESLint Configuration

The base ESLint configuration includes:

  • TypeScript strict type checking
  • Stylistic rules for consistent code style
  • Promise plugin for async/await best practices
  • Prettier integration for formatting
  • Custom rules for common patterns

Prettier Configuration

Default formatting rules:

  • Tab width: 4 spaces
  • Print width: 120 characters
  • Single quotes
  • No semicolons
  • Trailing commas (ES5)

Next.js Configurations

The Next.js variants include:

  • JSX/React specific rules
  • Accessibility rules (jsx-a11y)
  • Next.js recommended settings
  • React Hooks rules

Available Scripts

Add these scripts to your package.json:

{
  "scripts": {
    "lint": "eslint . --cache",
    "lint:fix": "eslint . --cache --fix",
    "format": "prettier . --write",
    "format:check": "prettier . --check",
    "typecheck": "tsc --noEmit"
  }
}

Troubleshooting

ESLint Legacy Plugin Compatibility

If you're using ESLint plugins that haven't been updated for ESLint 9's flat config format, use the provided utility functions:

import { fixCompatibility } from '@nldoc/configs/eslint.utils.mjs'

// Use fixCompatibility to wrap legacy configs
const legacyConfigs = fixCompatibility('plugin:some-legacy-plugin/recommended')

Documentation

License

This project is licensed under the European Union Public License 1.2 - see LICENSE for details.

Acknowledgements