dingjun1028/esggo/eslint-optimizer

Claude Code and agent skill by dingjun1028/esggo

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Configure ESLint for Next.js/React/TypeScript projects with optimal rule settings. Balances strictness with CI pass rate. Use when setting up ESLint, tuning rules, or reducing lint noise while keeping code quality.

Install

npx vskill@latest install dingjun1028/esggo/eslint-optimizer

SKILL.md

The same SKILL.md was published earlier as dingjun1028/esggo/eslint-optimizer.

ESLint Optimizer Skill

Configure ESLint for maximum CI pass rate with minimum code quality loss.

Flat Config Template (eslint.config.js)

js
const nextPlugin = require('@next/eslint-plugin-next');
const typescriptEslint = require('typescript-eslint');
const reactPlugin = require('eslint-plugin-react');
const reactHooksPlugin = require('eslint-plugin-react-hooks');
const importPlugin = require('eslint-plugin-import');
const jsxA11yPlugin = require('eslint-plugin-jsx-a11y');
const globals = require('globals');
module.exports = [
...typescriptEslint.configs.recommended,
{
ignores: [
'.next/**', 'out/**', 'build/**', 'node_modules/', 'dist/',
'**/*.cjs', '**/*.mjs', // ← use ** for subdirectory match
'assets/vendor/', 'esggo/', 'apps/', 'packages/',
],
},
{
files: ['**/*.{js,jsx,mjs,ts,tsx,mts,cts}'],
plugins: {
react: reactPlugin,
'react-hooks': reactHooksPlugin,
import: importPlugin,
'jsx-a11y': jsxA11yPlugin,
'@next/next': nextPlugin,
},
languageOptions: {
parser: typescriptEslint.parser,
parserOptions: {
requireConfigFile: false,
sourceType: 'module',
allowImportExportEverywhere: true,
ecmaVersion: 2022,
ecmaFeatures: { jsx: true },
},
globals: { ...globals.browser, ...globals.node },
},
rules: {
// ── Base configs ──
...reactPlugin.configs.recommended.rules,
...reactHooksPlugin.configs.recommended.rules,
...nextPlugin.configs.recommended.rules,
// ── Relaxed rules (reduce noise) ──
'import/no-anonymous-default-export': 'warn',
'react/no-unknown-property': 'off',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/jsx-no-target-blank': 'off',
'react/no-unescaped-entities': 'off',
'@next/next/no-img-element': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-require-imports': 'warn',
'@typescript-eslint/no-var-requires': 'warn',
// ── React Compiler rules (too strict for existing code) ──
'react-hooks/set-state-in-effect': 'off', // fetch-in-useEffect is standard
'react-hooks/preserve-manual-memoization': 'warn',
'react-hooks/refs': 'warn',
'react-hooks/immutability': 'warn',
'react-hooks/purity': 'warn',
},
},
];

Key Decisions

Why **/*.cjs instead of *.cjs?

ESLint flat config *.cjs only matches root-level files. Use **/*.cjs to match files in subdirectories (e.g., scripts/gen-gallery-index.cjs).

Why disable set-state-in-effect?

The React Compiler rule flags the standard pattern of calling fetchData() inside useEffect, which internally calls setState. This is the recommended React pattern for data fetching. The rule creates false positives.

Why warn instead of error for no-explicit-any?

In large codebases, converting all any to proper types in one PR is impractical. Set to warn to track technical debt without blocking CI.

Tuning Workflow

  1. Start strict — use recommended configs
  2. Run `pnpm lint` — count errors vs warnings
  3. Downgrade to warn — for rules that flag valid patterns
  4. Disable — only for rules that are fundamentally wrong for your codebase
  5. Never suppress per-file — prefer project-wide rule config

Security

  • Security scanPassed, 96 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/dingjun1028/esggo/eslint-optimizer/badge)](https://verified-skill.com/skills/dingjun1028/esggo/eslint-optimizer)

Something wrong with this skill or its page? Tell us.