linting-neostandard-eslint9
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWhen to use
适用场景
Use this skill when you need to:
- Set up linting in a JavaScript or TypeScript project
- Use as a Standard-like ESLint v9 flat-config baseline
neostandard - Configure with the flat config system (
eslint@9/eslint.config.js)eslint.config.mjs - Migrate from to
standardor ESLint v9neostandard - Migrate from legacy configuration to ESLint v9
.eslintrc* - Run linting consistently in CI and local development
当你需要以下操作时,可以使用本技能:
- 在JavaScript或TypeScript项目中搭建代码检查(Linting)环境
- 将作为类Standard风格的ESLint v9扁平配置基准
neostandard - 使用扁平配置系统(/
eslint.config.js)配置eslint.config.mjseslint@9 - 从迁移到
standard或ESLint v9neostandard - 从传统的配置迁移到ESLint v9
.eslintrc* - 在CI和本地开发环境中保持一致的代码检查执行
How to use
使用方法
Read individual rule files for implementation details and examples:
- rules/neostandard.md - Install, configure, and extend neostandard with ESLint
- rules/eslint-v9-flat-config.md - Build ESLint v9 flat config for JS/TS projects
- rules/migration-from-standard.md - Migrate from to
standardor ESLint v9neostandard - rules/migration-from-legacy-eslint.md - Migrate from to flat config safely
.eslintrc* - rules/ci-and-editor-integration.md - CI scripts, pre-commit, and editor setup
阅读单个规则文件获取实现细节和示例:
- rules/neostandard.md - 安装、配置并扩展基于ESLint的neostandard
- rules/eslint-v9-flat-config.md - 为JS/TS项目构建ESLint v9扁平配置
- rules/migration-from-standard.md - 从迁移到
standard或ESLint v9neostandard - rules/migration-from-legacy-eslint.md - 安全地从迁移到扁平配置
.eslintrc* - rules/ci-and-editor-integration.md - CI脚本、预提交钩子及编辑器配置
Core principles
核心原则
- Prefer reproducible linting with pinned major versions
- Keep config minimal and explicit
- Use flat config for ESLint v9 projects
- Treat lint failures as quality gates in CI
- Enable auto-fix for local workflows, but validate with non-fix CI runs
- 优先使用固定主版本的可复现代码检查
- 保持配置简洁且明确
- 为ESLint v9项目使用扁平配置
- 在CI中将代码检查失败设为质量门禁
- 在本地工作流中启用自动修复,但在CI运行时不使用修复模式进行验证