Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop dprint process plugins #153

Merged
merged 7 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🦕
name: 👕
on:
push:
branches: [main]
Expand All @@ -12,18 +12,39 @@ jobs:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: '1.43.1' # selfup { "regex": "\\d[^']+", "script": "deno --version | head -n 1 | cut -d ' ' -f 2" }
deno-version: '1.43.1' # selfup {"extract":"\\d[^']+","replacer":["bash","-c","deno --version | head -n 1"],"nth": 2}
- run: deno task stylelint

check:
dprint:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dprint/check@v2.2
with:
dprint-version: '0.45.1' # selfup { "regex": "\\d[^']+", "script": "dprint --version | cut -d ' ' -f 2" }
dprint-version: '0.45.1' # selfup { "extract": "\\d[^']+", "replacer": ["dprint", "--version"], "nth": 2 }

deno:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: '1.43.1' # selfup { "regex": "\\d[^']+", "script": "deno --version | head -n 1 | cut -d ' ' -f 2" }
deno-version: '1.43.1' # selfup {"extract":"\\d[^']+","replacer":["bash","-c","deno --version | head -n 1"],"nth": 2}
- run: deno task check

yamlfmt:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
# yamlfmt still uses this ver for the distribution
go-version: '1.18'
- name: Install yamlfmt
# TODO: Apply selfup after https://github.com/google/yamlfmt/pull/180
run: go install github.com/google/yamlfmt/cmd/yamlfmt@v0.12.1
- run: yamlfmt -lint .
3 changes: 1 addition & 2 deletions .github/workflows/merge-bot-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
- name: Judge
id: conclusion
if: >-
steps.dependabot.outputs.update-type != 'version-update:semver-major' ||
contains(steps.dependabot.outputs.dependency-names, 'DeterminateSystems')
steps.dependabot.outputs.update-type != 'version-update:semver-major' || contains(steps.dependabot.outputs.dependency-names, 'DeterminateSystems')
run: echo -n 'merge=true' | tee -a "$GITHUB_OUTPUT"
dependabot:
needs: [judge-dependabot]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
paths:
- '.github/workflows/pages.yml'
- 'public/**'
# Allows you to run this workflow manually from the Actions tab
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-flake-lock-and-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
update-nixpkgs:
uses: kachick/selfup/.github/workflows/reusable-bump-flake-lock-and-selfup.yml@action-v1
uses: kachick/selfup/.github/workflows/reusable-bump-flake-lock-and-selfup.yml@v1.1.2
if: (github.event.sender.login == 'kachick') || (github.event_name != 'pull_request')
with:
dry-run: ${{ github.event_name == 'pull_request' }}
Expand Down
13 changes: 7 additions & 6 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
{
"tasks": {
"serve": "deno run --allow-net --allow-read https://deno.land/std@0.217.0/http/file_server.ts public",
"check": "dprint check && deno fmt --check && deno lint && deno check scripts/*.ts",
"check": "deno fmt --check && deno lint && deno check scripts/*.ts",
// If you want to keep stylelint color print in local, Use `unbuffer deno run --node-modules-dir ...`
"stylelint": "deno task cache && deno run --node-modules-dir --allow-env --allow-read --allow-sys npm:stylelint@16.2.1/stylelint **/*.css | deno run --allow-sys scripts/isEmpty.ts",
"check-all": "dprint check && yamlfmt -lint . && deno task stylelint && deno task check",
"deps": "nix --version && nil --version && deno --version && dprint --version",
"cache": "deno cache --node-modules-dir npm:stylelint@16.2.1 npm:stylelint-config-recommended@14.0.0",
"fmt": "deno fmt && dprint fmt && nix fmt ./*.nix"
"fmt": "deno fmt && dprint fmt && yamlfmt . && nix fmt ./*.nix",
},
"lint": {
"include": ["scripts/"],
"rules": {
"tags": ["recommended"]
}
"tags": ["recommended"],
},
},
"fmt": {
"singleQuote": true,
"include": ["scripts/"]
}
"include": ["scripts/"],
},
}
12 changes: 6 additions & 6 deletions dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
},
"markdown": {
},
"prettier": {
"printWidth": 120,
"singleQuote": true
"malva": {
"quotes": "preferSingle"
},
"excludes": [
"**/*-lock.json"
],
"plugins": [
"https://plugins.dprint.dev/json-0.17.4.wasm",
"https://plugins.dprint.dev/markdown-0.16.0.wasm",
"https://plugins.dprint.dev/prettier-0.27.0.json@3557a62b4507c55a47d8cde0683195b14d13c41dda66d0f0b0e111aed107e2fe"
"https://plugins.dprint.dev/json-0.19.2.wasm",
"https://plugins.dprint.dev/markdown-0.17.0.wasm",
"https://plugins.dprint.dev/g-plane/malva-v0.3.1.wasm",
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.8.0.wasm"
]
}
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
edge-pkgs.deno
edge-pkgs.dprint
edge-pkgs.typos
edge-pkgs.yamlfmt
edge-pkgs.go-task
];
};
Expand Down
18 changes: 11 additions & 7 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<!-- https://github.com/tiaanduplessis/nanoreset -->
<link rel="stylesheet" href="https://unpkg.com/nanoreset/nanoreset.min.css" />
<link
rel="stylesheet"
href="https://unpkg.com/nanoreset/nanoreset.min.css"
/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
Expand All @@ -19,7 +22,9 @@
<div id="index">
<main class="main">
<ul class="main-links">
<li><a href="https://github.com/users/kachick/projects/3">Kanban</a></li>
<li>
<a href="https://github.com/users/kachick/projects/3">Kanban</a>
</li>
<li><a href="https://github.com/kachick/dotfiles">Bonsai</a></li>
<li><a href="https://github.com/kachick?tab=stars">Interest</a></li>
<li><a href="https://lishogi.org/@/kachick/all">Shogi</a></li>
Expand All @@ -28,21 +33,20 @@
<a
href="https://github.com/kachick.gpg"
title="key_id: EF6E574D040AE2A5 - key_fingerprint: 9121 5D87 20CA B405 C63F 24D2 EF6E 574D 040A E2A5"
>PGP</a
>
>PGP</a>
</li>
<li>
<a
href="https://github.com/kachick.keys"
title="key_fingerprint(SHA256): Qj9t7RdxsK/sd34tafjR2QamIfogHXNYArZbi0GVo3M"
>SSH</a
>
>SSH</a>
</li>
</ul>
</main>
<footer class="footer">
<div class="footer-body">
<a href="https://github.com/kachick/kachick.github.io/labels/bug">🐛</a>
<a href="https://github.com/kachick/kachick.github.io/labels/bug"
>🐛</a>
</div>
</footer>
</div>
Expand Down
5 changes: 5 additions & 0 deletions yamlfmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
gitignore_excludes: true
line_ending: lf
formatter:
type: basic
retain_line_breaks_single: true
Loading