[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EEY5ZDQXC2MS01ZBNTYSGX":3,"skill-same:01M6EEY5ZDQXC2MS01ZBNTYSGX":61},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M6EEY5ZDQXC2MS01ZBNTYSGX","eslint",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Feslint\u002FSKILL.md",[],[5],"2026-11-10 10:12:30",false,"# ESLint — JavaScript and TypeScript Linting\n\nESLint reads your source code, applies a set of rules, and reports problems ranging from stylistic inconsistencies to genuine bugs. It catches unused variables, missing return statements, inconsistent naming, accessibility violations, and hundreds of other issues that slip past even careful code review.\n\nThis skill covers ESLint 9+ with the modern flat config format. If you're starting a new project or migrating from the legacy `.eslintrc` format, flat config is the way forward.\n\n## Installing ESLint\n\nESLint 9 ships as a single package. TypeScript and React support come from companion plugins.\n\n```bash\n# Install ESLint and common plugins for a TypeScript React project\nnpm install --save-dev eslint @eslint\u002Fjs typescript-eslint eslint-plugin-react eslint-plugin-react-hooks\n```\n\n## Flat Config Basics\n\nThe flat config lives in `eslint.config.js` (or `.mjs`, `.ts`) at your project root. Instead of deeply nested JSON with `extends` and `overrides`, flat config uses an array of configuration objects. Each object applies to files matching its `files` glob pattern.\n\n```javascript\n\u002F\u002F eslint.config.js — Flat config for a TypeScript project\nimport js from '@eslint\u002Fjs';\nimport tseslint from 'typescript-eslint';\n\nexport default [\n  \u002F\u002F Base JavaScript recommended rules\n  js.configs.recommended,\n\n  \u002F\u002F TypeScript recommended rules (type-aware)\n  ...tseslint.configs.recommended,\n\n  \u002F\u002F Custom configuration for source files\n  {\n    files: ['src\u002F**\u002F*.ts', 'src\u002F**\u002F*.tsx'],\n    languageOptions: {\n      parserOptions: {\n        project: '.\u002Ftsconfig.json',\n      },\n    },\n    rules: {\n      \u002F\u002F Warn on console.log left in code\n      'no-console': ['warn', { allow: ['warn', 'error'] }],\n\n      \u002F\u002F Enforce consistent return types\n      '@typescript-eslint\u002Fexplicit-function-return-type': 'off',\n\n      \u002F\u002F Prevent unused variables (ignore underscore-prefixed)\n      '@typescript-eslint\u002Fno-unused-vars': ['error', {\n        argsIgnorePattern: '^_',\n        varsIgnorePattern: '^_',\n      }],\n    },\n  },\n\n  \u002F\u002F Ignore build output and dependencies\n  {\n    ignores: ['dist\u002F', 'node_modules\u002F', 'coverage\u002F', '*.config.js'],\n  },\n];\n```\n\nThe flat config is pure JavaScript. You can use conditionals, spread operators, and factory functions to compose configurations. There's no magic — each array element is a config object that gets merged in order.\n\n## Adding React Support\n\nReact projects need JSX parsing and rules for hooks. The flat config makes it straightforward to layer these on top of your base configuration.\n\n```javascript\n\u002F\u002F eslint.config.js — Full config for a React TypeScript project\nimport js from '@eslint\u002Fjs';\nimport tseslint from 'typescript-eslint';\nimport react from 'eslint-plugin-react';\nimport reactHooks from 'eslint-plugin-react-hooks';\n\nexport default [\n  js.configs.recommended,\n  ...tseslint.configs.recommended,\n\n  \u002F\u002F React plugin configuration\n  {\n    files: ['src\u002F**\u002F*.tsx', 'src\u002F**\u002F*.jsx'],\n    plugins: {\n      react,\n      'react-hooks': reactHooks,\n    },\n    languageOptions: {\n      parserOptions: {\n        ecmaFeatures: { jsx: true },\n      },\n    },\n    settings: {\n      react: { version: 'detect' },\n    },\n    rules: {\n      \u002F\u002F React rules\n      'react\u002Freact-in-jsx-scope': 'off', \u002F\u002F Not needed with React 17+ JSX transform\n      'react\u002Fprop-types': 'off', \u002F\u002F Using TypeScript for prop validation\n      'react\u002Fjsx-no-target-blank': 'error',\n\n      \u002F\u002F Hooks rules — these catch real bugs\n      'react-hooks\u002Frules-of-hooks': 'error',\n      'react-hooks\u002Fexhaustive-deps': 'warn',\n    },\n  },\n\n  { ignores: ['dist\u002F', 'node_modules\u002F', '.next\u002F'] },\n];\n```\n\n## Understanding Rules\n\nEvery ESLint rule has three severity levels: `'off'` (0), `'warn'` (1), and `'error'` (2). Warnings appear in your editor but don't fail CI. Errors break the build.\n\nRules can also take options as a second array element. The pattern is always `[severity, ...options]`.\n\n```javascript\n\u002F\u002F eslint.config.js — Examples of rule configuration patterns\nexport default [\n  {\n    files: ['src\u002F**\u002F*.ts'],\n    rules: {\n      \u002F\u002F Simple on\u002Foff\n      'no-debugger': 'error',\n\n      \u002F\u002F Rule with options\n      'no-restricted-imports': ['error', {\n        patterns: [{\n          group: ['..\u002F..\u002F*'],\n          message: 'Use path aliases (@\u002F) instead of relative imports above two levels.',\n        }],\n      }],\n\n      \u002F\u002F Naming conventions via TypeScript plugin\n      '@typescript-eslint\u002Fnaming-convention': ['error',\n        { selector: 'interface', format: ['PascalCase'] },\n        { selector: 'typeAlias', format: ['PascalCase'] },\n        { selector: 'enum', format: ['PascalCase'] },\n        { selector: 'enumMember', format: ['UPPER_CASE'] },\n      ],\n\n      \u002F\u002F Complexity limits\n      'max-depth': ['warn', 4],\n      'max-lines-per-function': ['warn', { max: 100, skipBlankLines: true, skipComments: true }],\n    },\n  },\n];\n```\n\n## Writing Custom Rules\n\nWhen the built-in rules and plugins don't cover your team's specific conventions, you can write custom rules. ESLint rules are functions that receive an AST node and report problems.\n\n```javascript\n\u002F\u002F eslint-rules\u002Fno-hardcoded-urls.js — Custom rule to prevent hardcoded API URLs\nexport default {\n  meta: {\n    type: 'problem',\n    docs: {\n      description: 'Disallow hardcoded API URLs in source files',\n    },\n    messages: {\n      hardcodedUrl: 'Use environment variables instead of hardcoded URLs. Found: \"{{url}}\"',\n    },\n  },\n  create(context) {\n    const urlPattern = \u002F^https?:\\\u002F\\\u002F(api|staging|prod)\\.\u002F;\n\n    return {\n      Literal(node) {\n        if (typeof node.value === 'string' && urlPattern.test(node.value)) {\n          context.report({\n            node,\n            messageId: 'hardcodedUrl',\n            data: { url: node.value },\n          });\n        }\n      },\n    };\n  },\n};\n```\n\nRegister the custom rule in your flat config using the `plugins` field.\n\n```javascript\n\u002F\u002F eslint.config.js — Registering a custom rule\nimport noHardcodedUrls from '.\u002Feslint-rules\u002Fno-hardcoded-urls.js';\n\nexport default [\n  {\n    files: ['src\u002F**\u002F*.ts'],\n    plugins: {\n      custom: {\n        rules: {\n          'no-hardcoded-urls': noHardcodedUrls,\n        },\n      },\n    },\n    rules: {\n      'custom\u002Fno-hardcoded-urls': 'error',\n    },\n  },\n];\n```\n\n## Auto-Fix\n\nMany ESLint rules support automatic fixing. The `--fix` flag rewrites your source files to resolve fixable violations — things like adding missing semicolons, removing unused imports, or reordering object keys.\n\n```bash\n# Fix all auto-fixable issues\nnpx eslint --fix src\u002F\n\n# Preview what would change without writing files\nnpx eslint --fix-dry-run src\u002F\n\n# Fix only specific rules\nnpx eslint --fix --rule '{\"import\u002Forder\": \"error\"}' src\u002F\n```\n\nIn your editor, configure ESLint to fix on save for a seamless experience.\n\n```json\n\u002F\u002F .vscode\u002Fsettings.json — Auto-fix ESLint issues on save\n{\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll.eslint\": \"explicit\"\n  },\n  \"eslint.validate\": [\n    \"javascript\",\n    \"typescript\",\n    \"javascriptreact\",\n    \"typescriptreact\"\n  ]\n}\n```\n\n## Running ESLint in CI\n\nIn continuous integration, ESLint should run as a blocking check. Any error-level violation fails the pipeline, preventing the code from being merged.\n\n```yaml\n# .github\u002Fworkflows\u002Flint.yml — ESLint as a required CI check\nname: Lint\non: [push, pull_request]\n\njobs:\n  eslint:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: 20\n          cache: npm\n\n      - run: npm ci\n      - run: npx eslint src\u002F --max-warnings 0\n```\n\nThe `--max-warnings 0` flag treats warnings as errors in CI. This prevents warning count from growing unbounded while still letting developers see warnings in their editors during development.\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Feslint",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill eslint",{"tool":37,"command":38},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill eslint",{"tool":40,"command":41},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill eslint","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Feslint\u002FSKILL.md",true,[45,51,57],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"checklist.md","REFERENCE","参考文档",1792,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-performance-test\u002Fchecklist.md",{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"customize.toml","OTHER","其他",1638,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-performance-test\u002Fcustomize.toml",{"path":58,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":59,"sourceHtmlUrl":60},"performance-template.md",5859,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-performance-test\u002Fperformance-template.md",[62,71,80,89,95,101],{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[68,69,70],"model","model hierarchy","model hierarchy skill",{"skillNo":72,"name":73,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[77,78,79],"MCP","zoom","zoom mcp",{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[86,87,88,78],"sdk","zoom apps sdk","apps",{"skillNo":90,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[91],{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[97],{"skillNo":102,"name":103,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":18},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[103]]