oxlint-config-smarthr
v0.1.32
Published
A sharable oxlint config for SmartHR
Maintainers
Keywords
Readme
oxlint-config-smarthr
SmartHR 全社共通の oxlint 設定です。 React + TypeScript プロジェクトでの利用を想定しています。
インストール
pnpm add --dev oxlint # peerDependencies
pnpm add --dev oxlint-config-smarthr使い方
oxlint.config.ts で設定をインポートし、extends に追加してください。
import { defineConfig } from 'oxlint'
import smarthrConfig from 'oxlint-config-smarthr'
export default defineConfig({
extends: [smarthrConfig],
// NOTE: plugins / jsPlugins は extends によって上書きされるため、
// 共有設定分も含めて必要なプラグインをすべて再宣言する必要があります。
plugins: ['typescript', 'import', 'react', 'jsx-a11y'],
jsPlugins: ['eslint-plugin-smarthr'],
rules: {
// プロダクト固有のルール
},
})oxlint コマンドで実行可能です。 eslint で使用できる大半のコマンドを利用できます。
pnpm oxlintType-aware linting
この共有設定には options.typeAware は含まれていません。
TypeScript の型情報を利用するルール(typescript/dot-notation など)を有効にするには、追加パッケージをインストールし、設定ファイルを調整してください。
pnpm add -D oxlint-tsgolintexport default defineConfig({
extends: [smarthrConfig],
options: {
typeAware: true,
},
// ...
})