deno-json-lint
#deno.json #Deno #Linter
概要
deno.json向けのLinterです
リポジトリ:
パッケージ: @uki00a/deno-json-lint
使い方
code:shell
$ deno run --allow-read=deno.json jsr:@uki00a/deno-json-lint
出力例
code:shell
testdata/deno.e2e.json: require-minimum-dependency-age minimumDependencyAge should be configured
testdata/deno.e2e.json:2:11: require-lockfile A lockfile should be enabled
testdata/deno.e2e.json:4:23: ban-allow-all --allow-all/-A should not be used
testdata/deno.e2e.json:5:27: require-allow-list An allow list should be specified for --allow-read
testdata/deno.e2e.json:8:32: ban-allow-all all: true should not be used
ルール
ban-allow-all - --allow-allの使用を検出します
require-allow-list - allow listなしで使用されている--allow-*の使用を検出します
require-lockfile - deno.lockが無効化されている場合にエラーを報告します
require-minimum-dependency-age - minimumDependencyAgeが定義されていない場合にエラーを報告します
設定
deno.jsonのdeno-json-lintキーでルールに関する設定が可能です
code:deno.json
{
"deno-json-lint": {
"rules": {
"require-allow-list": "off",
"require-minimum-dependency-age": "warn"
}
}
}