The CLI uses a structured set of interactive prompts to gather user preferences and generate appropriate ESLint configurations. This document outlines the question flow and available options.
Prompt: "What do you want to lint?"
Type: Multiple selection
Options:
Default: JavaScript (pre-selected)
Prompt: "How would you like to use ESLint?"
Type: Single selection
Options:
Default: "To check syntax and find problems"
Prompt: "What type of modules does your project use?"
Options:
Prompt: "Which framework does your project use?"
Options:
Prompt: "Does your project use TypeScript?"
Type: Yes/No toggle
Default: No
Prompt: "Where does your code run?"
Type: Multiple selection
Options:
Prompt: "What flavor of Markdown do you want to lint?"
Options:
Default: CommonMark
Prompt: "What format do you want your config file to be in?"
Options:
Default: JavaScript
Prompt: "Would you like to add Jiti as a devDependency?"
Type: Yes/No toggle
Context: Appears when TypeScript config is chosen on Node.js versions that don't natively support TypeScript config files
Prompt: "Would you like to install them now?"
Type: Yes/No toggle
Context: Shows list of packages to be installed
Default: Yes
Prompt: "Which package manager do you want to use?"
Options:
Default: Detected from lock files or npm if none found
? What do you want to lint? › JavaScript, JSON
? How would you like to use ESLint? › To check syntax and find problems
? What type of modules does your project use? › JavaScript modules (import/export)
? Which framework does your project use? › React
? Does your project use TypeScript? › Yes
? Where does your code run? › Browser, Node
? What format do you want your config file to be in? › JavaScript
? Would you like to install them now? › Yes
? Which package manager do you want to use? › npmThis sequence generates a React + TypeScript configuration with both browser and Node.js environments.