Skip to content

d-zero-dev/linters

Repository files navigation

ディーゼロ 開発環境 リンター&フォーマッター

パッケージ

メインパッケージ

パッケージ名 内容
@d-zero/linters 以下の設定などをまとめたパッケージ
@d-zero/cspell-config CSpellの設定ファイル
@d-zero/eslint-config ESLintの設定ファイル
@d-zero/lint-staged-config lint-stagedの設定ファイル
@d-zero/markuplint-config Markuplintの設定ファイル
@d-zero/prettier-config Prettierの設定ファイル
@d-zero/pug-lint-config pug-lintの設定ファイル
@d-zero/stylelint-config Stylelintの設定ファイル
@d-zero/textlint-config textlintの設定ファイル

サブパッケージ

パッケージ名 内容
@d-zero/csstree-scss-syntax @d-zero/stylelint-rules内で使用されているCSSTree用のSCSSパーサープラグイン
@d-zero/stylelint-rules @d-zero/stylelint-configに設定されているディーゼロ独自のStylelintルール

メンテナンス環境

  • Voltaによって管理しています。
  • actionlintによってGitHub Actionsの設定ファイルを検証しています。

メンテ用コマンド

コマンド 内容
yarn build 各パッケージのビルドを行います
yarn lint リポジトリ内のファイルのリント・自動フォーマット・型チェック・スペルチェックを行います
yarn test テスト(Vitestを実行します)

GitHub Actions


Dependabot

依存パッケージの脆弱性を検知する機能を導入しています。

Dependabot alertsの一覧から対象のパッケージと深刻度を確認します。

脆弱性のあるパッケージが、どのパッケージに依存しているかは次のコマンドで発見できます。

yarn why <package_name>

依存関係を確認後、対応方法を検討し、必要があれば対象のパッケージをアップデートしてください。

もしくは、次のことに関係ある場合「Dismiss alert」から該当のものを選択して解決としてください。

  • A fix has already been started (既に修正しようとしている)
  • No bandwidth to fix this (修正の余裕なし)
  • Risk is tolerable to this project (リスクが許容範囲)
  • This alert is inaccurate or incorrect (不正確なアラート)
  • Vulnerable code is not actually used (脆弱のあるコードが実際に使用されることはない)