feat(cli): ANSI-16 縛りの導入と PLUGIN 色の変更 - #18
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
src/cli.ts)paintの全色は ANSI-16 の SGR パラメータ(31–36 系)で構成されているpackage.jsonに devDependencies なし)、この規約を検査する仕組みが存在しなかったWhat
CLI(PLUGIN の描画)
paintにgold(\u001b[93m= ANSI-16 bright yellow)を追加statusColorと doctor 集計列の PLUGIN をpaint.dim→paint.goldに変更ESLint / CI
eslint.config.mjs新規:@eslint/js+typescript-eslintの recommended を適用no-restricted-syntaxで38;5;/48;5;(256-color)と38;2;/48;2;(truecolor)をsrc/**全体で禁止\u001b/\x1b)はsrc/cli.ts以外で禁止し、paint.*経由を強制package.jsonにlintscript と devDependencies を追加、bun.lockを新規生成lintレシピを追加bun install --frozen-lockfileとbun run lintをbun testの前段として追加Test
bunx eslint .bun testsrc/cli.tsの93mを38;5;178mに置換してbunx eslint .no-restricted-syntaxエラー(src/cli.ts:108:42)で fail、復元後 cleanNotes
typescriptは^6に固定 — typescript-eslint が TS 7.0 未対応のため(Enhancement: Use TS 7 (tsgo / typescript-go) for type information typescript-eslint/typescript-eslint#10940)。対応後にピンを外せる33m)とは別スロット(93m)なので、severity の見分けは端末テーマが normal / bright を区別する限り保たれる