Step 1: Set Up Your Environment
ESLint requires Node.js. Download and install the LTS version (v20.19.0+, v22.13.0+, or v24+) from nodejs.org.
Verify installation:
node --version
npm --version
Create a new project:
mkdir eslint-learn
cd eslint-learn
npm init -y
This generates a package.json file.