Skip to content

Commit

Permalink
feat(tasks.toml): generate default.json to use preset without filename (
Browse files Browse the repository at this point in the history
#7)

* feat(tasks.toml): generate default.json to use preset without filename

* ci(.github/workflows/lint.yml): include build task in lint tasks

* chore(tasks.toml): include build in check task

* style: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
risu729 and autofix-ci[bot] authored Jan 2, 2025
1 parent 9b2fee2 commit 4508dbb
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
* text=auto eol=lf
.gitignore linguist-generated=true
default.json linguist-generated=true
2 changes: 1 addition & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
extends: ["github>risu729/renovate-config:default.json5"],
extends: ["github>risu729/renovate-config"],
}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: |
tasks=$(mise tasks ls --json \
| jq --raw-output --compact-output \
'map(select(.name | test("^(check:)")) | {name: (.name | sub("^.+:" ; "")), task: .name})')
'map(select(.name | test("^check:|^build$")) | {name: (.name | sub("^.+:" ; "")), task: .name})')
echo "tasks=${tasks}" >> "${GITHUB_OUTPUT}"
lint:
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"files.readonlyInclude": {
// auto-generated
"**/.gitignore": true,
"**/bun.lock": true
"**/bun.lock": true,
"default.json": true
},

"typescript.disableAutomaticTypeAcquisition": true,
Expand Down
6 changes: 5 additions & 1 deletion biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": true
"ignoreUnknown": true,
"ignore": [
// ignore auto-generated files
"default.json"
]
},
"formatter": {
"formatWithErrors": true
Expand Down
1 change: 1 addition & 0 deletions cspell.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = {
// ignore auto-generated files
".gitignore",
"bun.lock",
"default.json",
// ignore license files
"LICENSE",
],
Expand Down
1 change: 1 addition & 0 deletions default.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ exclude_path = [
# ignore autogenerated files
".gitignore",
"bun.lock",
"default.json",
]

exclude = [
# exclude ${} patterns
".*\\$(%7B.*%7D.*)?$",
# renovate.json5
# src/default.json5
# seems to have a strict too many requests policy
"https://regex101.com",
# .vscode/
Expand Down
1 change: 1 addition & 0 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ yamllint = "1.35.1"
"cargo:lychee" = "0.18.0"
typos = "1.29.0"
"npm:ignore-sync" = "8.0.0"
"npm:json5" = "2.2.3"

[settings]
experimental = true
Expand Down
File renamed without changes.
11 changes: 9 additions & 2 deletions tasks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ depends = ["buni"]
run = "bun run git-cz"

[check]
depends = ["check:*"]
depends = ["build", "check:*"]

["build"]
run = "json5 src/default.json5 --out-file default.json"
depends_post = [
"{% if env.CI is defined %}util:nodiff{% else %}util:donothing{% endif %}",
]

["check:biome"]
run = "biome {% if env.LINT is undefined %}check --write{% else %}ci{% endif %} --error-on-warnings"
Expand Down Expand Up @@ -60,7 +66,8 @@ run = "yamllint --strict ."
["check:renovate"]
run = [
"renovate-config-validator --strict",
"renovate-config-validator --strict default.json5",
"renovate-config-validator --strict src/default.json5",
"renovate-config-validator --strict default.json",
]

["check:cspell"]
Expand Down

0 comments on commit 4508dbb

Please sign in to comment.