Eslint Config Generator
Create a starter ESLint configuration for your project with our free online ESLint Config Generator.
Project
Environment
Recommended Rules
Custom Rules
Suggested Packages
What Is an ESLint Config?
An ESLint config defines the rules and settings ESLint uses to analyze your code. It can determine which environments your project targets and which linting rules should be applied to your source files.
An ESLint configuration can be used to help identify code issues, enforce consistent coding practices, and keep a project's JavaScript or TypeScript code easier to maintain.
How to Generate an ESLint Config
Select the project type that matches your application.
Choose the configuration options available for your project.
Generate the ESLint configuration.
Review the generated configuration.
Copy the configuration for your project.
The generated result provides a starting point that you can further customize according to your project's requirements.
ESLint Config for Different Projects
The generator can create a starter configuration for several common project types.
JavaScript
Create an ESLint configuration for JavaScript projects to establish a starting point for code linting.
TypeScript
Generate an ESLint config starter for TypeScript projects and adapt the configuration to your TypeScript codebase.
React
Create a starting ESLint configuration for React projects to help organize linting settings around a React-based application.
Node.js
Generate an ESLint configuration for Node.js projects and use it as the starting configuration for your server-side JavaScript application.
Browser
Create an ESLint configuration for JavaScript projects that run in a browser environment.
ESLint Config Example
Input:
Project Type: JavaScript
Config Format: Flat Config - eslint.config.js
Module System: ES Modules
Environment: Node.js
Recommended Rules: ESLint recommended rules
Custom Rules:
Quotes: Single
Semicolons: Always
Indentation: 2 spaces
Output:
import globals from 'globals';
export default [
{
languageOptions: {
globals: {
...globals.node,
},
},
rules: {
'no-unused-vars': 'warn';
'no-console': 'warn';
}
}
];
Why Use an ESLint Config Generator?
An ESLint configuration contains settings that can be repetitive to write manually. A generator gives you a quick starting point instead of creating the configuration structure from scratch.
It can be useful when:
Starting a new JavaScript project
Setting up TypeScript linting
Creating a React project
Configuring ESLint for Node.js
Setting up browser-based JavaScript
Creating a starter ESLint configuration
Reviewing an example ESLint config
Copy the Generated ESLint Config
After generating your configuration, copy the output and add it to your project as your ESLint configuration file.
You can then modify the generated rules, plugins, and other settings as your project develops.