or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

cli-interface.mdindex.mdinteractive-questions.md
tile.json

tessl/npm-eslint--create-config

Utility to create ESLint config files through an interactive setup process.

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

To install, run

npx @tessl/cli install tessl/npm-eslint--create-config@1.10.0

index.mddocs/

@eslint/create-config

@eslint/create-config is a command-line utility for creating ESLint configuration files through an interactive setup process. It simplifies the initial configuration of ESLint projects by guiding users through questions about their project structure, coding style preferences, and framework choices, then generates appropriate ESLint configuration files.

Package Information

  • Package Name: @eslint/create-config
  • Package Type: npm
  • Language: JavaScript (ES modules)
  • Installation: npm init @eslint/config@latest or npx @eslint/create-config@latest

Core Usage

Important: This package is designed as a CLI-only tool and does not provide a public programmatic API. All functionality is accessed through the command-line interface.

# Primary usage - interactive ESLint config creation
npm init @eslint/config@latest

# Alternative using npx
npx @eslint/create-config@latest

Basic Usage

Interactive Mode (Default)

# Interactive mode - prompts for configuration choices
npx @eslint/create-config@latest

# Alternative using npm init
npm init @eslint/config@latest

# Install globally for repeated use
npm install -g @eslint/create-config@latest
create-config

Direct Configuration Mode

# Use a specific shared configuration (flat config format)
npx @eslint/create-config@latest -- --config eslint-config-standard

# Use a specific shared configuration (legacy eslintrc format)
npx @eslint/create-config@latest -- --eslintrc --config eslint-config-standard

# Use scoped packages
npx @eslint/create-config@latest -- --config @company/eslint-config

# Use with popular configurations
npx @eslint/create-config@latest -- --config eslint-config-airbnb
npx @eslint/create-config@latest -- --config @eslint/eslint-config

Architecture

@eslint/create-config is built as a command-line utility with the following internal components:

  • CLI Interface: Main executable (bin/create-config.js) that handles command-line arguments and orchestrates the configuration process
  • Interactive Prompting: Uses the enquirer library to collect user preferences through structured questions
  • Configuration Generation: Internal engine that creates appropriate ESLint config content based on user choices
  • Package Management: Automatic installation of required ESLint packages and plugins as development dependencies
  • Format Support: Generates both modern flat config format and legacy eslintrc format configurations

Capabilities

CLI Interface

Command-line interface for interactive ESLint configuration setup with support for direct configuration modes and legacy formats.

// Main CLI entry point (bin/create-config.js)
// Supports command-line arguments:
// --config <package-name>: Use specific shared configuration
// --eslintrc: Generate legacy eslintrc-style configuration

CLI Interface

Configuration Generation

Automated ESLint configuration file creation based on user preferences, with support for various project types and frameworks.

# Generates eslint.config.js (flat config format, default)
npx @eslint/create-config@latest

# Generates .eslintrc.* (legacy format)
npx @eslint/create-config@latest -- --eslintrc --config <config-name>

# Output files created:
# - eslint.config.js (or .eslintrc.js/.eslintrc.json)
# - package.json (updated with devDependencies)

For details about the configuration generation process, see the CLI Interface documentation.

Question Types

The CLI uses interactive prompts to gather configuration preferences:

# Language Selection
"What do you want to lint?" 
- JavaScript, JSON, Markdown, CSS options

# Purpose Selection  
"How would you like to use ESLint?"
- Syntax checking only vs. syntax + problems

# JavaScript Configuration (if selected)
- Module type: ESM, CommonJS, or script
- Framework: React, Vue.js, or none
- TypeScript usage
- Environment: Browser, Node.js, or both

# Additional Options
- Config file language (JS vs TS)
- Package manager choice
- Dependency installation preference

Interactive Questions Details

Supported Features

Languages Supported

  • JavaScript (ES modules, CommonJS, or scripts)
  • JSON (standard JSON files)
  • JSON with Comments (JSONC format)
  • JSON5 (extended JSON format)
  • Markdown (CommonMark or GitHub Flavored)
  • CSS (stylesheets)

Frameworks Supported

  • React (with JSX/TSX support)
  • Vue.js (with .vue file support)
  • None (vanilla JavaScript/TypeScript)

Configuration Formats

  • Flat Config (eslint.config.js) - Default for ESLint 9+
  • Legacy ESLintRC (.eslintrc.js, .eslintrc.json) - For older ESLint versions

Package Managers

  • npm (default)
  • yarn
  • pnpm
  • bun