CLAUDE.md — Nakajima-Foundation/ownplate

Nakajima-Foundation/ownplate (61★)

6/19/2026 · 173 viewsCLAUDE.md

← Browse

mulmoclaude eslint config からの取り込み

背景

~/ss/llm/mulmoclaude/eslint.config.mjs で使われている lint rule のうち、ownplate 既存ルールに無く、追加してもノイズが少ないものを取り込む。

取り込んだルール

新規プラグイン依存なし、ownplate に既存違反が 0 〜 数件で実害があるもののみ:

built-in

  • no-throw-literalthrow "string" を禁止
  • default-case-last — switch の default を末尾強制
  • no-self-comparex !== x 等の自己比較禁止
  • no-unmodified-loop-condition — 無限ループ検知
  • prefer-arrow-callbackfunction(){} → アロー関数
  • prefer-object-spreadObject.assign({}, x){...x}
  • object-shorthand{foo: foo}{foo}
  • no-multi-assigna = b = c 禁止
  • no-lonely-ifelse { if {} }else if {}
  • no-floating-decimal.50.5
  • no-undef-initlet x = undefined 禁止
  • no-loop-func — ループ内関数生成警告
  • no-new-wrappersnew String(...) 等禁止
  • no-octal-escape
  • no-proto
  • no-script-urljavascript: URL 禁止
  • no-useless-call
  • no-useless-concat
  • no-useless-rename
  • prefer-rest-paramsarguments → rest
  • prefer-spreadapply → spread
  • prefer-promise-reject-errors
  • prefer-regex-literalsnew RegExp(string)/.../
  • prefer-numeric-literalsparseInt("11", 2)0b11
  • radixparseInt(x)parseInt(x, 10)
  • no-return-assign
  • no-newnew Foo() の捨て呼び禁止

typescript-eslint

  • @typescript-eslint/no-non-null-assertionfoo! 禁止
  • @typescript-eslint/method-signature-style — interface method を property style に統一
  • @typescript-eslint/no-require-importsrequire() 禁止

vue

  • vue/no-useless-mustaches
  • vue/no-useless-v-bind
  • vue/no-empty-component-block

取り込み見送ったルール(理由付き)

Rule違反数理由
arrow-body-style: as-needed457大規模整形、別 PR
prefer-template135同上
vue/prefer-true-attribute-shorthand18auto-fix 不可、別 PR で手作業
@typescript-eslint/no-dynamic-delete1local object の delete で正当用途、disable コメント増えるだけ
各種プラグイン (sonarjs, security, import, prettier)-大量追加で初動コスト高、別途検討
id-length, complexity, max-depth, max-params-ownplate のコードベース規模感に合わない

既存違反の修正

File違反対応
src/app/admin/Restaurants/OrderInfoPage.vue:755no-self-compare (x !== x の NaN チェック)Number.isNaN() に置換
src/components/CustomerInfo.vue:106,111no-new (Google Maps new AdvancedMarkerElement)// eslint-disable-next-line no-new + 理由コメント
src/utils/admin/RestaurantPageUtils.ts:196prefer-regex-literalsnew RegExp("...")/.../
src/utils/pickup.ts:283@typescript-eslint/no-non-null-assertion (menu.id!)key 変数に置換(同じ値)

auto-fix で機械的に修正された箇所

prefer-object-spread / prefer-arrow-callback / object-shorthand / vue/no-useless-v-bind / vue/no-useless-mustaches 等が eslint --fix で自動修正。yarn format を後に流して整形を揃え。

影響ファイル: 35 ファイル, 計 91 insertions / 68 deletions

検証

  • yarn lint 通過
  • yarn build 通過
  • ランタイム挙動変更なし (純文法整形のみ + 4 箇所の意味ある修正)

Source: Nakajima-Foundation/ownplate · 61★