フロントエンド開発といえば。
react アプリの初期化( pnpm create vite@latest または npm init vite@latest <アプリ名> )

biome より高速、設定が楽、oxlint , oxfmt

● oxlint

・oxlsintのインストール

npm i -D oxlint

・oxlintを実行する

# ソースコードチェックのみ
npx oxlint .

# 自動修正
oxlint --fix .

対象となるファイルが0件の時でもエラーとしない

oxlint --fix --no-error-on-unmatched-pattern .

--no-error-on-unmatched-pattern は、対象となるファイルが選択されなかった(マッチしなかった)場合に oxlint がエラー終了(終了コード > 0)するのを防ぐCLIオプションです

package.json にコマンドを記述しておきます。

  "scripts": {
    "lint": "oxlint . --disable-unicorn-plugin",
    "lint:fix": "oxlint --disable-unicorn-plugin --fix .",
  },

・oxlsintで現在有効なルールの一覧を出力するコマンド

npx oxlint --rules

・VS Codeでoxlintを有効にするオプション

    // oxlint
    "oxc.enable": true,
    "oxc.typeAware": true,

● oxfmt

npm i -D oxfmt

// 設定ファイルの作成
code .oxfmtrc.jsonc

.oxfmtrc.jsonc

{
  "$schema": "./node_modules/oxfmt/configuration_schema.json",
  "printWidth": 80
}
npx oxfmt --check
No.2744
06/24 11:54

edit