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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@chiastack/eslint

v2.0.4

Published

Shared ESLint configuration package for all projects in the Chiastack monorepo.

Readme

@chiastack/eslint

Shared ESLint configuration package for all projects in the Chiastack monorepo.

Installation

pnpm add -D @chiastack/eslint

Note: This package requires ESLint 9.0.0 or higher as a peer dependency.

Available Configurations

base

Base ESLint configuration suitable for all project types. Includes:

  • TypeScript ESLint: Complete TypeScript rule set, including recommended rules, type-checked rules, and stylistic rules
  • Import Plugin: For checking import statement consistency
  • Turbo Plugin: Rules supporting Turborepo
  • Strict Rules:
    • Disallow unused variables (allows variables prefixed with _)
    • Enforce type imports
    • Disallow non-null assertions
    • Disallow deprecated APIs
    • Warn on any types and unsafe operations

Usage example:

// eslint.config.js
import { baseConfig } from "@chiastack/eslint/base";

export default [
  ...baseConfig,
  // Your other configurations...
];

react

React-specific ESLint configuration. Includes:

  • React Plugin: React recommended rules and JSX Runtime rules
  • React Hooks Plugin: React Hooks rules, including recommended rules and refs warnings

Usage example:

// eslint.config.js
import { baseConfig } from "@chiastack/eslint/base";
import reactConfig from "@chiastack/eslint/react";

export default [
  ...baseConfig,
  ...reactConfig,
  // Your other configurations...
];

nextjs

Next.js-specific ESLint configuration. Includes:

  • Next.js Plugin: Next.js recommended rules and Core Web Vitals rules
  • Next.js Best Practices: Automatically checks common issues in Next.js projects

Usage example:

// eslint.config.js
import { baseConfig } from "@chiastack/eslint/base";
import nextjsConfig from "@chiastack/eslint/nextjs";
import reactConfig from "@chiastack/eslint/react";

export default [
  ...baseConfig,
  ...reactConfig,
  ...nextjsConfig,
  // Your other configurations...
];

Configuration Features

TypeScript Support

  • Type Checking: Uses projectService: true to automatically detect TypeScript projects
  • Strict Mode: Enables all TypeScript ESLint strict rules
  • Type Imports: Enforces import type syntax to separate type imports

Environment Variable Restrictions

Provides restrictEnvAccess configuration to enforce using validated environment variables:

import { restrictEnvAccess } from "@chiastack/eslint/base";

export default [
  restrictEnvAccess,
  // Other configurations...
];

This rule will:

  • Disallow direct use of process.env
  • Require using import { env } from '@/env' to ensure type safety

Ignore Patterns

The following directories are ignored by default:

  • **/*.config.* - Configuration files
  • dist/** - Compiled output directory
  • build/** - Build output directory
  • node_modules/** - Dependencies directory

Rule Details

Main Rules

  • @typescript-eslint/no-unused-vars: Error - Disallow unused variables (allows _ prefix)
  • @typescript-eslint/consistent-type-imports: Warn - Enforce type imports
  • @typescript-eslint/no-non-null-assertion: Error - Disallow non-null assertions
  • @typescript-eslint/no-deprecated: Error - Disallow deprecated APIs
  • @typescript-eslint/no-explicit-any: Warn - Warn on any type usage
  • import/consistent-type-specifier-style: Error - Enforce top-level type specifier style

React Rules

  • react-hooks/rules-of-hooks: Enforce React Hooks rules
  • react-hooks/exhaustive-deps: Check effect dependencies
  • react-hooks/refs: Warn - Check refs usage

Next.js Rules

  • Includes all Next.js recommended rules
  • Includes Core Web Vitals related rules
  • @next/next/no-duplicate-head: Disabled (due to compatibility issues)

Complete Examples

Next.js Project

// eslint.config.js
import { baseConfig } from "@chiastack/eslint/base";
import nextjsConfig from "@chiastack/eslint/nextjs";
import reactConfig from "@chiastack/eslint/react";

export default [...baseConfig, ...reactConfig, ...nextjsConfig];

React Project (Non-Next.js)

// eslint.config.js
import { baseConfig } from "@chiastack/eslint/base";
import reactConfig from "@chiastack/eslint/react";

export default [...baseConfig, ...reactConfig];

TypeScript Project (Non-React)

// eslint.config.js
import { baseConfig } from "@chiastack/eslint/base";

export default [...baseConfig];

Dependencies

This package depends on the following ESLint plugins:

  • @eslint/js - ESLint core rules
  • typescript-eslint - TypeScript ESLint rules
  • eslint-plugin-react - React rules
  • eslint-plugin-react-hooks - React Hooks rules
  • @next/eslint-plugin-next - Next.js rules
  • eslint-plugin-import - Import rules
  • eslint-plugin-turbo - Turborepo rules

License

Uses the same license as the Chiastack monorepo.