or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

index.mdmixins.mdpatches.mdprofiles.md
tile.json

tessl/npm-rushstack--eslint-config

A TypeScript ESLint ruleset designed for large teams and projects

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/@rushstack/eslint-config@4.4.x

To install, run

npx @tessl/cli install tessl/npm-rushstack--eslint-config@4.4.0

index.mddocs/

@rushstack/eslint-config

@rushstack/eslint-config is a TypeScript ESLint ruleset designed for large teams and projects. It provides battle-tested configurations optimized for scalability, readability, and maintainability in enterprise development environments. The package offers three distinct profiles along with multiple mixins for additional functionality, designed to work seamlessly with Prettier and modern development workflows.

Package Information

  • Package Name: @rushstack/eslint-config
  • Package Type: npm
  • Language: JavaScript/TypeScript
  • Installation: npm install --save-dev @rushstack/eslint-config eslint typescript

Core Imports

For legacy ESLint configurations:

// Required at the top of .eslintrc.js
require('@rushstack/eslint-config/patch/modern-module-resolution');

module.exports = {
  extends: ["@rushstack/eslint-config/profile/node"],
  parserOptions: { tsconfigRootDir: __dirname }
};

For flat ESLint configurations (ESLint 9+):

import nodeProfile from "@rushstack/eslint-config/flat/profile/node";

export default [
  ...nodeProfile
];

Basic Usage

Simple Node.js project:

// .eslintrc.js
require('@rushstack/eslint-config/patch/modern-module-resolution');

module.exports = {
  extends: ["@rushstack/eslint-config/profile/node"],
  parserOptions: { tsconfigRootDir: __dirname }
};

Web application with React:

// .eslintrc.js
require('@rushstack/eslint-config/patch/modern-module-resolution');

module.exports = {
  extends: [
    "@rushstack/eslint-config/profile/web-app",
    "@rushstack/eslint-config/mixins/react"
  ],
  parserOptions: { tsconfigRootDir: __dirname },
  settings: {
    react: {
      version: "18.0"
    }
  }
};

Flat configuration for Node.js:

// eslint.config.js
import nodeProfile from "@rushstack/eslint-config/flat/profile/node";
import tsdocMixin from "@rushstack/eslint-config/flat/mixins/tsdoc";

export default [
  ...nodeProfile,
  ...tsdocMixin
];

Architecture

@rushstack/eslint-config is designed around several key principles:

  • Profile-based Configuration: Three foundational profiles (node, node-trusted-tool, web-app) provide base rule sets optimized for different environments
  • Mixin System: Optional enhancements that can be layered on top of profiles for specific functionality (React, TSDoc, etc.)
  • Patch System: Required and optional patches for ESLint compatibility and extended functionality
  • Dual Format Support: Both legacy ESLint configuration and modern flat configuration formats
  • Monorepo Friendly: Self-contained dependencies to avoid peer dependency management overhead
  • Explicit Configuration: No "recommended" templates to avoid precedence issues and configuration conflicts

Capabilities

Profile Configurations

Core ESLint configuration profiles that form the foundation of the ruleset. Each profile is optimized for specific runtime environments and security requirements.

// Legacy format exports
const profileConfig: {
  extends?: string[];
  rules: Record<string, any>;
  plugins?: string[];
  env?: Record<string, boolean>;
  parser?: string;
  parserOptions?: Record<string, any>;
  overrides?: Array<{
    files: string[];
    rules: Record<string, any>;
  }>;
};

// Flat format exports
const flatConfig: Array<{
  files?: string[];
  rules: Record<string, any>;
  plugins?: Record<string, any>;
  languageOptions?: {
    parser?: any;
    parserOptions?: Record<string, any>;
  };
}>;

Profile Configurations

Mixin Configurations

Optional configuration extensions that add specialized functionality to base profiles. Mixins must be loaded after profiles in the extends array.

// Legacy mixin structure
const mixinConfig: {
  plugins?: string[];
  settings?: Record<string, any>;
  overrides: Array<{
    files: string[];
    rules: Record<string, any>;
  }>;
};

// Flat mixin structure  
const flatMixinConfig: Array<{
  files?: string[];
  plugins?: Record<string, any>;
  rules: Record<string, any>;
  settings?: Record<string, any>;
}>;

Mixin Configurations

Patch Utilities

Essential utilities for ESLint configuration resolution and extended functionality. The modern-module-resolution patch is required for proper operation.

// Patch modules (require-only, no exports)
require('@rushstack/eslint-config/patch/modern-module-resolution');
require('@rushstack/eslint-config/patch/eslint-bulk-suppressions');
require('@rushstack/eslint-config/patch/custom-config-package-names');

Patch Utilities

Deprecated Entry Points

Legacy entry points that throw errors and redirect users to updated paths for better organization and clarity.

// Deprecated entry points (throw errors with migration instructions)
require('@rushstack/eslint-config'); // Error: Use profile paths instead
require('@rushstack/eslint-config/react'); // Error: Use mixins/react instead  
require('@rushstack/eslint-config/patch-eslint6'); // Error: Use patch/modern-module-resolution instead

Deprecated Paths:

  • @rushstack/eslint-config → Use @rushstack/eslint-config/profile/[node|web-app|node-trusted-tool]
  • @rushstack/eslint-config/react → Use @rushstack/eslint-config/mixins/react
  • @rushstack/eslint-config/patch-eslint6 → Use @rushstack/eslint-config/patch/modern-module-resolution

Types

interface ESLintConfig {
  extends?: string[];
  rules: Record<string, RuleConfig>;
  plugins?: string[];
  env?: Record<string, boolean>;
  parser?: string;
  parserOptions?: {
    tsconfigRootDir?: string;
    project?: string | string[];
    ecmaVersion?: number;
    sourceType?: 'module' | 'script';
  };
  overrides?: Array<{
    files: string[];
    rules: Record<string, RuleConfig>;
  }>;
  settings?: Record<string, any>;
}

interface FlatESLintConfig {
  files?: string[];
  ignores?: string[];
  rules: Record<string, RuleConfig>;
  plugins?: Record<string, any>;
  languageOptions?: {
    parser?: any;
    parserOptions?: Record<string, any>;
    globals?: Record<string, boolean>;
  };
  settings?: Record<string, any>;
}

type RuleConfig = 
  | 'off' | 'warn' | 'error'
  | 0 | 1 | 2
  | ['off' | 'warn' | 'error' | 0 | 1 | 2, ...any[]];

interface ReactSettings {
  react: {
    version: string;
  };
}