home / skills / ehtbanton / claudeskillsrepo / eslint-config-generator
This skill generates production-ready ESLint configuration files for JavaScript and TypeScript projects, including modern flat config and legacy setups
npx playbooks add skill ehtbanton/claudeskillsrepo --skill eslint-config-generatorReview the files below or copy the command above to add this skill to your agents.
---
name: eslint-config-generator
description: Generate ESLint configuration files (.eslintrc.js, eslint.config.js) for JavaScript/TypeScript projects with framework-specific rules. Triggers on "create ESLint config", "generate eslint configuration", "eslint setup for", "linting rules for".
---
# ESLint Config Generator
Generate production-ready ESLint configuration files with appropriate rules, plugins, and extends for various JavaScript/TypeScript projects.
## Output Requirements
**File Output:** `.eslintrc.js`, `.eslintrc.json`, or `eslint.config.js`
**Format:** Valid ESLint configuration
**Standards:** ESLint 8.x / 9.x (flat config)
## When Invoked
Immediately generate a complete ESLint configuration file with appropriate plugins, extends, and rules for the specified project type.
## Configuration Templates
### Modern Flat Config (ESLint 9.x)
```javascript
// eslint.config.js
import js from '@eslint/js';
import typescript from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
export default [
js.configs.recommended,
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
},
plugins: {
'@typescript-eslint': typescript,
},
rules: {
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-explicit-any': 'warn',
},
},
];
```
### Legacy Config
```javascript
// .eslintrc.js
module.exports = {
root: true,
env: { node: true, es2022: true },
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
};
```
## Example Invocations
**Prompt:** "Create ESLint config for React TypeScript"
**Output:** Complete `.eslintrc.js` with React, TypeScript, and hooks rules.
This skill generates production-ready ESLint configuration files (.eslintrc.js, .eslintrc.json, or eslint.config.js) for JavaScript and TypeScript projects. It produces framework-aware configs (React, Node, Next.js, etc.) and supports both legacy and modern flat ESLint formats for v8/v9+. The output is ready to paste or save and includes plugins, parsers, extends, and sensible rule sets.
On invocation it inspects the requested project type and target format (legacy .eslintrc or modern flat eslint.config.js) and emits a complete config with parserOptions, plugins, recommended extends, and tuned rules. It can include TypeScript parser/plugin setup, React and hooks rules, Node/Next specifics, and common stylistic or error-prevention rules. The generator defaults to ESLint 8/9 compatibility and flags recommended rule severities.
Which format should I pick, .eslintrc.js or eslint.config.js?
Use eslint.config.js (flat) for ESLint v9 and modern projects; use .eslintrc.js when you need compatibility with older tooling or ESLint v8.
Does the generator include TypeScript type-aware rules?
Yes — it can add @typescript-eslint with parserOptions.project pointing at ./tsconfig.json so type-aware rules work when desired.