linting-neostandard-eslint9

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

When to use

适用场景

Use this skill when you need to:
  • Set up linting in a JavaScript or TypeScript project
  • Use
    neostandard
    as a Standard-like ESLint v9 flat-config baseline
  • Configure
    eslint@9
    with the flat config system (
    eslint.config.js
    /
    eslint.config.mjs
    )
  • Migrate from
    standard
    to
    neostandard
    or ESLint v9
  • Migrate from legacy
    .eslintrc*
    configuration to ESLint v9
  • Run linting consistently in CI and local development
当你需要以下操作时,可以使用本技能:
  • 在JavaScript或TypeScript项目中搭建代码检查(Linting)环境
  • neostandard
    作为类Standard风格的ESLint v9扁平配置基准
  • 使用扁平配置系统(
    eslint.config.js
    /
    eslint.config.mjs
    )配置
    eslint@9
  • standard
    迁移到
    neostandard
    或ESLint v9
  • 从传统的
    .eslintrc*
    配置迁移到ESLint v9
  • 在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
    standard
    to
    neostandard
    or ESLint v9
  • rules/migration-from-legacy-eslint.md - Migrate from
    .eslintrc*
    to flat config safely
  • 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
    迁移到
    neostandard
    或ESLint v9
  • 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运行时不使用修复模式进行验证