Linting Neostandard Eslint9

作者 mcollina72b727514771無授權條款收錄於 2026年10月8日更新於 2026年10月8日

Configures ESLint v9 flat config and neostandard for JavaScript and TypeScript projects, including migrating from legacy `.eslintrc*` files or the `standard` package. Use when you need to set up or fix linting with `eslint.config.js` or `eslint.config.mjs`, troubleshoot lint errors, configure neostandard rules, migrate from `.eslintrc` to flat config, or integrate linting into CI pipelines and pre-commit hooks.

AI 產生的概覽

為 JavaScript 與 TypeScript 專案設定 ESLint v9 扁平設定與 neostandard,並支援移轉。

功能
提供設定 ESLint v9 扁平設定檔,以及將 neostandard 當作類 Standard 基準的指引。內容涵蓋安裝相依套件、撰寫最小設定、加入規則覆寫,以及執行 lint 檢查。也記錄了從 standard 套件或舊版 .eslintrc 檔案移轉的路徑,以及 CI 與編輯器整合。
適用情境
適用於在 JavaScript 或 TypeScript 專案中開始使用 lint、採用 neostandard,或移轉到 ESLint v9 扁平設定的情境。也適合排查 lint 錯誤,以及將 lint 接入 CI 流程或提交前掛鉤。
執行需求
需要 Node.js 與 npm 來安裝 eslint@9 和 neostandard。僅為說明文件,不附帶指令碼。

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

Quick start: basic neostandard setup

Install dependencies and create a minimal eslint.config.js:

bash
npm install --save-dev eslint@9 neostandard
js
// eslint.config.jsimport neostandard from 'neostandard'
export default neostandard()

Verify the config works:

bash
npx eslint .

Common setup workflow (new project)

  1. Install eslint@9 and neostandard (see Quick start above)
  2. Create eslint.config.js with neostandard() as the base
  3. Add any project-specific rule overrides on top
  4. Run npx eslint . to confirm no config errors
  5. Add a lint script to package.json: "lint": "eslint ."
  6. Integrate into CI with a non-fix run; use --fix only in local workflows

How to use

Read individual rule files for implementation details and examples:

  • rules/neostandard.md [blocked] - Install, configure, and extend neostandard with ESLint
  • rules/eslint-v9-flat-config.md [blocked] - Build ESLint v9 flat config for JS/TS projects
  • rules/migration-from-standard.md [blocked] - Migrate from standard to neostandard or ESLint v9
  • rules/migration-from-legacy-eslint.md [blocked] - Migrate from .eslintrc* to flat config safely
  • rules/ci-and-editor-integration.md [blocked] - CI scripts, pre-commit, and editor setup

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

來源與署名

來源:mcollina/skills位於skills/linting-neostandard-eslint9提交72b7275

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架