@ycookiey/lint-config
v1.2.0
Published
oxlint (main) + ESLint (supplement) shared config. TypeScript, React, Next.js. v1.2.0 で eslint-plugin-react-hooks (rules-of-hooks: error / exhaustive-deps: warn) を default 有効化。
Maintainers
Readme
lint-config
@ycookiey/lint-config — oxlint をメインに、ESLint で補完するための共有設定。
install
npm i -D @ycookiey/lint-config oxlint eslint typescriptoxlint
oxlint.json:
{
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
"extends": ["./node_modules/@ycookiey/lint-config/oxlint/.oxlintrc.json"]
}ESLint
eslint.config.mjs (Flat Config):
import lintConfig from '@ycookiey/lint-config/eslint';
export default [
...lintConfig,
// 必要に応じてプロジェクト固有 override
];Strict 版 (opt-in)
型情報要求の @typescript-eslint/naming-convention (boolean prefix 強制等) を有効化したい場合:
import lintConfig from '@ycookiey/lint-config/eslint-strict';
export default [
...lintConfig,
// parserOptions.project の設定が別途必要 (monorepo 等では重い)
];v1.2.0 changelog
- react-hooks 有効化:
eslint-plugin-react-hooksを依存追加し、ESLint default で 2 rule を有効化:react-hooks/rules-of-hooks: error (hook 呼び出し規則違反は runtime crash 直結のため強制)react-hooks/exhaustive-deps: warn (deps 漏れは bug 候補だが意図的 disable も多いため warn 起点。プロジェクト側で error 上書き可)
- 既存 v1.1.0 の挙動は変更なし。
./eslint-strictも継続。
v1.1.0 changelog
- breaking-ish: ESLint default から
@typescript-eslint/naming-conventionを削除し軽量化。 従来挙動は./eslint-strictで opt-in に変更。 - K-2 緩和:
@typescript-eslint/no-magic-numbersのignoreを[-1, 0, 1, 2, 100, 1000]に拡張、ignoreDefaultValues/ignoreClassFieldInitialValuesを追加。 - test override 追加:
**/*.test.*/**/*.spec.*/**/__tests__/**でno-magic-numbersを off (テストの expected/fixture 値での誤検出回避)。
