chore(tooling): use yarn for linting scripts (#149)

* chore(tooling): use yarn for linting scripts

* chore: fixes and tweaks

* chore(ci): more permissions

* chore: clean up, lint fixes

* chore: clean up, lint fixes

* chore: clean up, lint fixes

* chore(lint): fix yamllint errors and warnings

* chore(lint): lint fixes

* chore(lint): lint fixes
This commit is contained in:
2025-08-15 09:06:22 +03:00
committed by GitHub
parent 9c68e8b05c
commit 5f59851c7a
25 changed files with 193 additions and 2342 deletions

View File

@@ -12,7 +12,7 @@ trim_trailing_whitespace = true
max_line_length = 80
[*.md]
max_line_length = 100
max_line_length = 120
[*.lua]
max_line_length = 90
@@ -38,6 +38,9 @@ space_redirects = true
keep_padding = false
function_next_line = true # --func-next-line
[config/git/config]
indent_style = tab
# Ignore the entire "third_party" directory when calling shfmt on directories,
# such as "shfmt -l -w .". When formatting files directly,
# like "shfmt -w third_party/foo.sh" or "shfmt --filename=third_party/foo.sh",

View File

@@ -1,11 +1,21 @@
{
"Version": "v3.3.0",
"Verbose": false,
"Debug": false,
"IgnoreDefaults": false,
"SpacesAfterTabs": false,
"NoColor": false,
"Exclude": [],
"Exclude": [
"base/plan",
"config/fish/completions/.*",
"config/fish/conf.d/.*",
"config/fish/functions/.*",
"config/fzf/key-bindings.fish",
"config/irssi/scripts/autorun/.*",
"config/vim/autoload/.*",
"docs/.*",
"local/man/.*",
"local/share/.*"
],
"AllowedContentTypes": [],
"PassedFiles": [],
"Disable": {

1
.envrc
View File

@@ -1 +0,0 @@
use asdf

30
.github/AGENTS.md vendored
View File

@@ -1,30 +0,0 @@
# Guidelines for AI contributors
These instructions help language models work with this repository.
## Setup
1. Run `yarn install` to get linting tools and the Bats test framework.
## Formatting
- Format code and docs with Prettier and markdownlint:
```bash
yarn fix:prettier
yarn fix:markdown
```
- Shell scripts should pass `shellcheck`.
## Testing
- When code changes, run `yarn test` to execute Bats tests.
- If only comments or documentation change, tests may be skipped.
## Commits and PRs
- Use Semantic Commit messages: `type(scope): summary`.
- Keep PR titles in the same format.
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->

View File

@@ -1,3 +1,4 @@
---
version: 2
updates:
# Maintain dependencies for GitHub Actions

View File

@@ -2,6 +2,7 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Lint Code Base
# yamllint disable-line
on:
pull_request:
branches: [master, main]
@@ -18,9 +19,11 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
statuses: write
contents: read
issues: write
packages: read
pull-requests: write
statuses: write
steps:
- name: Checkout
@@ -32,5 +35,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run PR Lint
# https://github.com/ivuorinen/actions
uses: ivuorinen/actions/pr-lint@fa0232d3c4ba16d087b606296435354a69c01756 # 25.8.11

View File

@@ -2,8 +2,9 @@
# $schema: "https://json.schemastore.org/github-workflow.json"
name: Semantic PR
# yamllint disable-line
on:
pull_request_target:
pull_request:
types:
- opened
- edited

View File

@@ -6,4 +6,4 @@ config/tmux/plugins/*
local/bin/asdf/*
tools/*
node_modules/*
.git/*

View File

@@ -2,7 +2,6 @@
# Configuration file for MegaLinter
# See all available variables at
# https://megalinter.io/configuration/ and in linters documentation
APPLY_FIXES: all
SHOW_ELAPSED_TIME: false # Show elapsed time at the end of MegaLinter run
PARALLEL: true
@@ -15,15 +14,13 @@ PRINT_ALPACA: false # Print Alpaca logo in console
SARIF_REPORTER: true # Generate SARIF report
SHOW_SKIPPED_LINTERS: false # Show skipped linters in MegaLinter log
TYPESCRIPT_DEFAULT_STYLE: prettier # Default style for TypeScript
DISABLE_LINTERS:
- REPOSITORY_DEVSKIM
- JAVASCRIPT_ES
YAML_YAMLLINT_CONFIG_FILE: .yamllint.yml
MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .markdownlint.json
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.json
TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.json
REPOSITORY_GIT_DIFF_DISABLE_ERRORS: true
FILTER_REGEX_EXCLUDE: >
(node_modules|tools|config/cheat/cheatsheets/community|config/cheat/cheatsheets/tldr|config/fzf|config/zsh|config/tmux/plugins)

View File

@@ -1,3 +1,4 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0

View File

@@ -8,6 +8,7 @@ module.exports = {
options: {
printWidth: 120,
proseWrap: 'preserve',
tabWidth: 2,
},
},
],

21
.yamllint.yml Normal file
View File

@@ -0,0 +1,21 @@
---
extends: default
ignore: |
node_modules
tools
config/tmux/plugins
rules:
empty-lines:
level: warning
max: 1
line-length:
max: 200
level: warning
truthy:
check-keys: false
comments:
min-spaces-from-content: 1
trailing-spaces:
level: warning

View File

@@ -1,12 +1,19 @@
# Project guidelines
This repository contains configuration files and helper scripts for managing a development environment. Dotbot drives the installation and host specific folders under `hosts/` include extra configs.
This repository contains configuration files and helper scripts for managing
a development environment.
Dotbot drives installation, and host-specific folders under `hosts/` contain extra configs.
## Setup
1. Run `yarn install` to fetch linting tools and the Bats test framework.
2. Re-run `yarn install` whenever `package.json` changes.
3. Yarn is the package manager of choice; avoid `npm` commands.
## Keeping the repository up to date
1. Update submodules with `git submodule update --remote --merge`.
2. Pull the latest changes and run `./install`.
3. Run `yarn install` whenever `package.json` changes.
## Linting and tests
@@ -17,13 +24,20 @@ This repository contains configuration files and helper scripts for managing a d
yarn fix:markdown
```
- Shell scripts must pass `shellcheck`. Run:
- Shell scripts must pass `shellcheck`.
```bash
find . -path ./node_modules -prune -o -name '*.sh' -print0 | xargs -0 shellcheck
```
- Execute tests with `yarn test`.
- Ensure `.editorconfig` rules pass:
```bash
tools/install-ec.sh
ec
```
- Execute tests with `yarn test` when code changes.
## Debugging lint issues
@@ -32,3 +46,10 @@ This repository contains configuration files and helper scripts for managing a d
- Consult `.shellcheckrc` for project specific checks.
Scripts rely on helpers in `config/shared.sh` so they run under Bash, Zsh and Fish by default.
## Commits and PRs
- Use Semantic Commit messages: `type(scope): summary`.
- Keep PR titles in the same format.
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->

View File

@@ -180,7 +180,7 @@ swap-main:
# Move focus to the n-th screen in the list; e.g.,
# focus-screen-3 will move mouse focus to the 3rd screen.
# Note that the main window in the given screen will be focused.
#focus-screen-n:
# focus-screen-n:
# focus-screen-<screen-number>:
# mod: mod1
# key: y
@@ -197,12 +197,12 @@ swap-main:
# key: i
# Select tall layout
#select-tall-layout:
# select-tall-layout:
# mod: mod1
# key: a
# Select wide layout
#select-wide-layout:
# select-wide-layout:
# mod: mod1
# key: s

View File

@@ -1,3 +1,4 @@
---
prSections:
- title: My Pull Requests
filters: is:open author:@me

View File

@@ -1,3 +1,4 @@
---
# mouse support (TUI-mode only)
mouse: false
# use pager to display markdown

View File

@@ -1,331 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.27058823529411763</real>
<key>Green Component</key>
<real>0.2784313725490196</real>
<key>Blue Component</key>
<real>0.35294117647058826</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 1 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9529411764705882</real>
<key>Green Component</key>
<real>0.5450980392156862</real>
<key>Blue Component</key>
<real>0.6588235294117647</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 2 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.6509803921568628</real>
<key>Green Component</key>
<real>0.8901960784313725</real>
<key>Blue Component</key>
<real>0.6313725490196078</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 3 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9764705882352941</real>
<key>Green Component</key>
<real>0.8862745098039215</real>
<key>Blue Component</key>
<real>0.6862745098039216</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 4 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5372549019607843</real>
<key>Green Component</key>
<real>0.7058823529411765</real>
<key>Blue Component</key>
<real>0.9803921568627451</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 5 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9607843137254902</real>
<key>Green Component</key>
<real>0.7607843137254902</real>
<key>Blue Component</key>
<real>0.9058823529411765</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 6 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5803921568627451</real>
<key>Green Component</key>
<real>0.8862745098039215</real>
<key>Blue Component</key>
<real>0.8352941176470589</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 7 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.7294117647058823</real>
<key>Green Component</key>
<real>0.7607843137254902</real>
<key>Blue Component</key>
<real>0.8705882352941177</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 8 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.34509803921568627</real>
<key>Green Component</key>
<real>0.3568627450980392</real>
<key>Blue Component</key>
<real>0.4392156862745098</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 9 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9529411764705882</real>
<key>Green Component</key>
<real>0.5450980392156862</real>
<key>Blue Component</key>
<real>0.6588235294117647</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 10 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.6509803921568628</real>
<key>Green Component</key>
<real>0.8901960784313725</real>
<key>Blue Component</key>
<real>0.6313725490196078</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 11 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9764705882352941</real>
<key>Green Component</key>
<real>0.8862745098039215</real>
<key>Blue Component</key>
<real>0.6862745098039216</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 12 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5372549019607843</real>
<key>Green Component</key>
<real>0.7058823529411765</real>
<key>Blue Component</key>
<real>0.9803921568627451</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 13 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9607843137254902</real>
<key>Green Component</key>
<real>0.7607843137254902</real>
<key>Blue Component</key>
<real>0.9058823529411765</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 14 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5803921568627451</real>
<key>Green Component</key>
<real>0.8862745098039215</real>
<key>Blue Component</key>
<real>0.8352941176470589</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Ansi 15 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.6509803921568628</real>
<key>Green Component</key>
<real>0.6784313725490196</real>
<key>Blue Component</key>
<real>0.7843137254901961</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Background Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.11764705882352941</real>
<key>Green Component</key>
<real>0.11764705882352941</real>
<key>Blue Component</key>
<real>0.1803921568627451</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Foreground Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Link Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.5372549019607843</real>
<key>Green Component</key>
<real>0.8627450980392157</real>
<key>Blue Component</key>
<real>0.9215686274509803</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Bold Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Cursor Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9607843137254902</real>
<key>Green Component</key>
<real>0.8784313725490196</real>
<key>Blue Component</key>
<real>0.8627450980392157</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Cursor Text Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Cursor Guide Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>0.07</real>
</dict>
<key>Selection Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.34509803921568627</real>
<key>Green Component</key>
<real>0.3568627450980392</real>
<key>Blue Component</key>
<real>0.4392156862745098</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
<key>Selected Text Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.803921568627451</real>
<key>Green Component</key>
<real>0.8392156862745098</real>
<key>Blue Component</key>
<real>0.9568627450980393</real>
<key>Alpha Component</key>
<real>1</real>
</dict>
</dict>
</plist>

File diff suppressed because it is too large Load Diff

View File

@@ -1,410 +0,0 @@
{
"Badge Text": "",
"Working Directory": "/Users/ivuorinen/Code",
"Prompt Before Closing 2": false,
"Selected Text Color": {
"Red Component": 0.80392156862745101,
"Color Space": "sRGB",
"Blue Component": 0.95686274509803926,
"Alpha Component": 1,
"Green Component": 0.83921568627450982
},
"Rows": 25,
"Ansi 11 Color": {
"Red Component": 0.97647058823529409,
"Color Space": "sRGB",
"Blue Component": 0.68627450980392157,
"Alpha Component": 1,
"Green Component": 0.88627450980392153
},
"Use Italic Font": true,
"Foreground Color": {
"Red Component": 0.80392156862745101,
"Color Space": "sRGB",
"Blue Component": 0.95686274509803926,
"Alpha Component": 1,
"Green Component": 0.83921568627450982
},
"Right Option Key Sends": 0,
"Character Encoding": 4,
"Selection Color": {
"Red Component": 0.34509803921568627,
"Color Space": "sRGB",
"Blue Component": 0.4392156862745098,
"Alpha Component": 1,
"Green Component": 0.35686274509803922
},
"Blend": 0.24709154211956524,
"Mouse Reporting": true,
"Cursor Boost": 0,
"Ansi 4 Color": {
"Red Component": 0.53725490196078429,
"Color Space": "sRGB",
"Blue Component": 0.98039215686274506,
"Alpha Component": 1,
"Green Component": 0.70588235294117652
},
"Non-ASCII Anti Aliased": true,
"Sync Title": false,
"Badge Font": "JetBrainsMonoNerdFontCompleteM-Bold",
"Disable Window Resizing": true,
"Description": "Default",
"Close Sessions On End": true,
"Jobs to Ignore": ["rlogin", "ssh", "slogin", "telnet"],
"Scrollback Lines": 0,
"Draw Powerline Glyphs": true,
"Flashing Bell": true,
"Cursor Guide Color": {
"Red Component": 0.80392156862745101,
"Color Space": "sRGB",
"Blue Component": 0.95686274509803926,
"Alpha Component": 0.070000000000000007,
"Green Component": 0.83921568627450982
},
"BM Growl": true,
"Ansi 3 Color": {
"Red Component": 0.97647058823529409,
"Color Space": "sRGB",
"Blue Component": 0.68627450980392157,
"Alpha Component": 1,
"Green Component": 0.88627450980392153
},
"Icon": 1,
"Use Non-ASCII Font": false,
"Link Color": {
"Red Component": 0.53725490196078429,
"Color Space": "sRGB",
"Blue Component": 0.92156862745098034,
"Alpha Component": 1,
"Green Component": 0.86274509803921573
},
"Shortcut": "",
"Background Image Location": "",
"Bold Color": {
"Red Component": 0.80392156862745101,
"Color Space": "sRGB",
"Blue Component": 0.95686274509803926,
"Alpha Component": 1,
"Green Component": 0.83921568627450982
},
"Use Cursor Guide": false,
"Unlimited Scrollback": true,
"Custom Command": "No",
"Title Components": 512,
"Keyboard Map": {
"0xf700-0x260000": {
"Action": 10,
"Text": "[1;6A"
},
"0x37-0x40000": {
"Action": 11,
"Text": "0x1f"
},
"0x32-0x40000": {
"Action": 11,
"Text": "0x00"
},
"0xf709-0x20000": {
"Action": 10,
"Text": "[17;2~"
},
"0xf70c-0x20000": {
"Action": 10,
"Text": "[20;2~"
},
"0xf729-0x20000": {
"Action": 10,
"Text": "[1;2H"
},
"0xf72b-0x40000": {
"Action": 10,
"Text": "[1;5F"
},
"0xf705-0x20000": {
"Action": 10,
"Text": "[1;2Q"
},
"0xf703-0x260000": {
"Action": 10,
"Text": "[1;6C"
},
"0xf700-0x220000": {
"Action": 10,
"Text": "[1;2A"
},
"0xf701-0x280000": {
"Action": 11,
"Text": "0x1b 0x1b 0x5b 0x42"
},
"0x38-0x40000": {
"Action": 11,
"Text": "0x7f"
},
"0x33-0x40000": {
"Action": 11,
"Text": "0x1b"
},
"0xf703-0x220000": {
"Action": 10,
"Text": "[1;2C"
},
"0xf701-0x240000": {
"Action": 10,
"Text": "[1;5B"
},
"0xf70d-0x20000": {
"Action": 10,
"Text": "[21;2~"
},
"0xf702-0x260000": {
"Action": 10,
"Text": "[1;6D"
},
"0xf729-0x40000": {
"Action": 10,
"Text": "[1;5H"
},
"0xf706-0x20000": {
"Action": 10,
"Text": "[1;2R"
},
"0x34-0x40000": {
"Action": 11,
"Text": "0x1c"
},
"0xf700-0x280000": {
"Action": 11,
"Text": "0x1b 0x1b 0x5b 0x41"
},
"0x2d-0x40000": {
"Action": 11,
"Text": "0x1f"
},
"0xf70e-0x20000": {
"Action": 10,
"Text": "[23;2~"
},
"0xf702-0x220000": {
"Action": 10,
"Text": "[1;2D"
},
"0xf703-0x280000": {
"Action": 11,
"Text": "0x1b 0x1b 0x5b 0x43"
},
"0xf700-0x240000": {
"Action": 10,
"Text": "[1;5A"
},
"0xf707-0x20000": {
"Action": 10,
"Text": "[1;2S"
},
"0xf70a-0x20000": {
"Action": 10,
"Text": "[18;2~"
},
"0x35-0x40000": {
"Action": 11,
"Text": "0x1d"
},
"0xf70f-0x20000": {
"Action": 10,
"Text": "[24;2~"
},
"0xf703-0x240000": {
"Action": 10,
"Text": "[1;5C"
},
"0xf701-0x260000": {
"Action": 10,
"Text": "[1;6B"
},
"0xf702-0x280000": {
"Action": 11,
"Text": "0x1b 0x1b 0x5b 0x44"
},
"0xf72b-0x20000": {
"Action": 10,
"Text": "[1;2F"
},
"0x36-0x40000": {
"Action": 11,
"Text": "0x1e"
},
"0xf708-0x20000": {
"Action": 10,
"Text": "[15;2~"
},
"0xf701-0x220000": {
"Action": 10,
"Text": "[1;2B"
},
"0xf70b-0x20000": {
"Action": 10,
"Text": "[19;2~"
},
"0xf702-0x240000": {
"Action": 10,
"Text": "[1;5D"
},
"0xf704-0x20000": {
"Action": 10,
"Text": "[1;2P"
}
},
"Ansi 14 Color": {
"Red Component": 0.58039215686274515,
"Color Space": "sRGB",
"Blue Component": 0.83529411764705885,
"Alpha Component": 1,
"Green Component": 0.88627450980392153
},
"Ansi 2 Color": {
"Red Component": 0.65098039215686276,
"Color Space": "sRGB",
"Blue Component": 0.63137254901960782,
"Alpha Component": 1,
"Green Component": 0.8901960784313725
},
"Send Code When Idle": false,
"ASCII Anti Aliased": true,
"Tags": [],
"Ansi 9 Color": {
"Red Component": 0.95294117647058818,
"Color Space": "sRGB",
"Blue Component": 0.6588235294117647,
"Alpha Component": 1,
"Green Component": 0.54509803921568623
},
"Badge Right Margin": 10,
"Use Bold Font": true,
"Silence Bell": false,
"Ansi 12 Color": {
"Red Component": 0.53725490196078429,
"Color Space": "sRGB",
"Blue Component": 0.98039215686274506,
"Alpha Component": 1,
"Green Component": 0.70588235294117652
},
"Window Type": 0,
"Use Bright Bold": true,
"Cursor Text Color": {
"Red Component": 0.80392156862745101,
"Color Space": "sRGB",
"Blue Component": 0.95686274509803926,
"Alpha Component": 1,
"Green Component": 0.83921568627450982
},
"Default Bookmark": "No",
"Cursor Color": {
"Red Component": 0.96078431372549022,
"Color Space": "sRGB",
"Blue Component": 0.86274509803921573,
"Alpha Component": 1,
"Green Component": 0.8784313725490196
},
"Ansi 1 Color": {
"Red Component": 0.95294117647058818,
"Color Space": "sRGB",
"Blue Component": 0.6588235294117647,
"Alpha Component": 1,
"Green Component": 0.54509803921568623
},
"Name": "Default",
"Blinking Cursor": false,
"Guid": "82636119-EA17-4A26-9AA7-408172F4A9C8",
"Badge Max Width": 0.45000000000000001,
"Idle Code": 0,
"Ansi 10 Color": {
"Red Component": 0.65098039215686276,
"Color Space": "sRGB",
"Blue Component": 0.63137254901960782,
"Alpha Component": 1,
"Green Component": 0.8901960784313725
},
"Ansi 8 Color": {
"Red Component": 0.34509803921568627,
"Color Space": "sRGB",
"Blue Component": 0.4392156862745098,
"Alpha Component": 1,
"Green Component": 0.35686274509803922
},
"Badge Color": {
"Red Component": 1,
"Color Space": "sRGB",
"Blue Component": 0,
"Alpha Component": 0.5,
"Green Component": 0.14910030364990234
},
"Smart Cursor Color": true,
"Ambiguous Double Width": false,
"Blur Radius": 9.5927277260638313,
"Badge Max Height": 0.10000000000000001,
"Ansi 0 Color": {
"Red Component": 0.27058823529411763,
"Color Space": "sRGB",
"Blue Component": 0.35294117647058826,
"Alpha Component": 1,
"Green Component": 0.27843137254901962
},
"Blur": true,
"Normal Font": "JetBrainsMonoNerdFontCompleteM-Light 15",
"Vertical Spacing": 1,
"Ansi 7 Color": {
"Red Component": 0.72941176470588232,
"Color Space": "sRGB",
"Blue Component": 0.87058823529411766,
"Alpha Component": 1,
"Green Component": 0.76078431372549016
},
"Command": "",
"Terminal Type": "xterm-256color",
"Horizontal Spacing": 1,
"Option Key Sends": 0,
"Only The Default BG Color Uses Transparency": true,
"Minimum Contrast": 0.14973958333333334,
"Ansi 15 Color": {
"Red Component": 0.65098039215686276,
"Color Space": "sRGB",
"Blue Component": 0.78431372549019607,
"Alpha Component": 1,
"Green Component": 0.67843137254901964
},
"Ansi 6 Color": {
"Red Component": 0.58039215686274515,
"Color Space": "sRGB",
"Blue Component": 0.83529411764705885,
"Alpha Component": 1,
"Green Component": 0.88627450980392153
},
"Badge Top Margin": 10,
"Transparency": 0.10293218085106381,
"Background Color": {
"Red Component": 0.11764705882352941,
"Color Space": "sRGB",
"Blue Component": 0.1803921568627451,
"Alpha Component": 1,
"Green Component": 0.11764705882352941
},
"Screen": -2,
"Non Ascii Font": "Monaco 12",
"Ansi 13 Color": {
"Red Component": 0.96078431372549022,
"Color Space": "sRGB",
"Blue Component": 0.90588235294117647,
"Alpha Component": 1,
"Green Component": 0.76078431372549016
},
"Columns": 120,
"Visual Bell": true,
"ASCII Ligatures": false,
"Ansi 5 Color": {
"Red Component": 0.96078431372549022,
"Color Space": "sRGB",
"Blue Component": 0.90588235294117647,
"Alpha Component": 1,
"Green Component": 0.76078431372549016
},
"Custom Directory": "Yes"
}

View File

@@ -1,165 +0,0 @@
snippet php "php"
<?php
${1}
snippet ec "ec"
echo '${1}'${2};
snippet vd "vd"
var_dump(${1});
# Includes and requires
snippet inc "inc"
include_once '${1}';${2}
snippet req "req"
require_once '${1}';${2}
# define(...)
snippet def "def"
define('${1}'${2});${3}
# Doxygen comments
snippet d "/**"
/**
* ${1}
*/${2}
snippet code "code"
* @code
* ${1}
* @endcode
# Class
snippet cl "cl"
class ${1} {
${2}
function ${3:__construct}(${4}) {
${5}
}
}
snippet pubf "public method"
public function ${1}(${2}): $3
{
${0}
}
snippet prof "protected method"
protected function ${1}(${2}): $3
{
${0}
}
snippet prif "private method"
protected function ${1}(${2}): $3
{
${0}
}
snippet testt "test method (prefix)"
public function test_${1}()
{
${0}
}
snippet testa "test method (annotation)"
/** @test */
public function ${1}()
{
${0}
}
# $this->
snippet . "$this->" i
$this->
# If statement
snippet if "if"
if (${1}) {
${2}
}
snippet ife "ife"
if (${1}) {
${2}
} else {
${3}
}
snippet elif "elif"
else if (${1}) {
${2}
}
snippet el "el"
else {
${1}
}
# Switch
snippet sw "sw"
switch (${1}) {
default:
break;
}
snippet case "case"
case '${1}':
${2}
break;${3}
# Do-while loop
snippet do "do"
do {
${2}
} while (${1});
# While loop
snippet wh "wh"
while (${1}) {
${2}
}
# For loop
snippet for "for"
for (${1}; ${2}; ${3}) {
${4}
}
snippet fore "fore"
foreach (${1} as ${2}) {
${3}
}
# Functions and methods
snippet fun "fun"
function ${1}(${2}) {
${3}
}
snippet met "met"
${1}function ${2}(${3}) {
${4}
}
# Return
snippet r "return"
return ${1}
# Todos
snippet todo "todo"
// TODO ${1}

View File

@@ -41,19 +41,23 @@ shift + cmd - return : wezterm
# Floating windows
# float / unfloat window and center on screen medium size
alt - t : yabai -m window --toggle float;\
alt - t : \
yabai -m window --toggle float;\
yabai -m window --grid 9:16:1:1:14:7
# float / unfloat window and center on screen large size
shift + alt - t : yabai -m window --toggle float;\
shift + alt - t : \
yabai -m window --toggle float;\
yabai -m window --grid 90:160:5:5:150:80
# make floating window fill screen
alt - y : yabai -m window --toggle float;\
alt - y : \
yabai -m window --toggle float;\
yabai -m window --grid 1:1:0:0:1:1
# toggle float window and center on screen medium size
shift + alt - y : yabai -m window --toggle float \
shift + alt - y : \
yabai -m window --toggle float \
&& yabai -m window --resize \
abs:$(($(yabai -m query --displays --display | jq .frame.w) / 2)):$(($(yabai -m query --displays --display | jq .frame.h) * 4 / 5)) \
&& yabai -m window --move \
@@ -86,11 +90,16 @@ shift + alt - k : yabai -m window --swap north
shift + alt - l : yabai -m window --swap east
## resize windows
ctrl + alt - h : yabai -m window --resize left:-50:0; \
ctrl + alt - h : \
yabai -m window --resize left:-50:0; \
yabai -m window --resize right:-50:0
ctrl + alt - j : yabai -m window --resize bottom:0:50; \
ctrl + alt - j : \
yabai -m window --resize bottom:0:50; \
yabai -m window --resize top:0:50
ctrl + alt - k : yabai -m window --resize top:0:-50; \
ctrl + alt - k : \
yabai -m window --resize top:0:-50; \
yabai -m window --resize bottom:0:-50
ctrl + alt - l : yabai -m window --resize right:50:0; \
ctrl + alt - l : \
yabai -m window --resize right:50:0; \
yabai -m window --resize left:50:0

View File

@@ -1,12 +1,14 @@
# git-dirty
A powerful tool to recursively check Git repository status across multiple directories.
A powerful tool to recursively check Git repository status across
multiple directories.
## Overview
`git-dirty` scans directories to identify Git repositories and reports their status.
It quickly shows which repositories have uncommitted changes, untracked files, or need
to be pushed, making it easy to maintain clean workspaces across multiple projects.
`git-dirty` scans directories to identify Git repositories and reports their
status. It quickly shows which repositories have uncommitted changes,
untracked files, or need to be pushed, making it easy to maintain clean
workspaces across multiple projects.
## Features
@@ -95,9 +97,10 @@ The script uses the following status indicators:
## Branch Display
The script shows branch names for repositories not on main branches. This helps identify
repositories where work is happening on feature branches. Main branches (configurable as
`main`, `master`, and `trunk` by default) are hidden to reduce output clutter.
The script shows branch names for repositories not on main branches.
This helps identify repositories where work is happening on feature branches.
Main branches (configurable as `main`, `master`, and `trunk` by default) are
hidden to reduce output clutter.
## Configuration
@@ -132,41 +135,44 @@ GIT_DIRTY_EXCLUDE="node_modules vendor .cache build dist tmp"
## Skip Directories from Checking
If you want to skip a directory from being checked, add a `.ignore` file next to the `.git` folder.
You can add `.ignore` to your global `.gitignore` file to avoid committing these files.
If you want to skip a directory from being checked, add a `.ignore` file next
to the `.git` folder. You can add `.ignore` to your global `.gitignore` file
to avoid committing these files.
## Performance Features
- **Parallel processing**: Significant speed improvements when using the `-p` flag
- **Parallel processing**: Significant speed improvements when
using the `-p` flag
- **Progress bars**: Real-time feedback on scanning progress with ETA
- **Rate limiting**: Controls parallel jobs to prevent system overloading
- **Smart directory traversal**: Skips excluded directories for faster processing
- **Smart directory traversal**: Skips excluded directories for
faster processing
## Tips
1. **Add an alias**: Create an alias in your shell configuration:
Add an alias: Create an alias in your shell configuration:
```bash
alias gd='git-dirty'
```
```bash
alias gd='git-dirty'
```
2. **Use it with specific directories**:
Use it with specific directories:
```bash
git-dirty ~/specific/project
```
```bash
git-dirty ~/specific/project
```
3. **Run in parallel mode for large codebases**:
Run in parallel mode for large codebases:
```bash
git-dirty -p ~/huge-monorepo
```
```bash
git-dirty -p ~/huge-monorepo
```
4. **Turn off branch display for cleaner output**:
Turn off branch display for cleaner output:
```bash
git-dirty -b
```
```bash
git-dirty -b
```
## Requirements

View File

@@ -6,11 +6,14 @@
"doc": "docs"
},
"scripts": {
"lint:markdown": "npx markdownlint -d .",
"fix:markdown": "npx markdownlint -df .",
"lint:prettier": "npx prettier . --check",
"fix:prettier": "npx prettier . --write",
"test": "bash test-all.sh"
"lint:markdown": "markdownlint -d .",
"fix:markdown": "markdownlint -df .",
"lint:prettier": "prettier . --check",
"fix:prettier": "prettier . --write",
"test": "bash test-all.sh",
"lint:ec": "ec -f gcc",
"lint": "yarn lint:markdown && yarn lint:prettier && yarn lint:ec",
"fix": "yarn fix:markdown && yarn fix:prettier"
},
"repository": {
"type": "git",
@@ -30,6 +33,9 @@
"@ivuorinen/base-configs": "^2.0.0",
"@types/node": "^24.0.1",
"bats": "^1.12.0",
"editorconfig-checker": "^6.1.0",
"markdownlint": "^0.38",
"prettier": "^3.6.2",
"typescript": "^5.8.3"
},
"packageManager": "yarn@1.22.22"

18
tools/install-ec.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Install editorconfig-checker if not already installed
set -euo pipefail
if command -v ec > /dev/null 2>&1; then
exit 0
fi
if ! command -v yarn > /dev/null 2>&1; then
echo "yarn is required to install editorconfig-checker" >&2
exit 1
fi
if yarn --version | grep -q '^1\.'; then
yarn global add --silent editorconfig-checker@"${VERSION:-latest}"
else
yarn dlx --quiet editorconfig-checker@"${VERSION:-latest}" --version > /dev/null
fi

View File

@@ -954,13 +954,20 @@
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-2.1.0.tgz#052aa67a48eccc4309d7f0191b7e41434b90bb78"
integrity sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==
"@types/node@*", "@types/node@^24.0.1":
"@types/node@*":
version "24.1.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-24.1.0.tgz#0993f7dc31ab5cc402d112315b463e383d68a49c"
integrity sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==
dependencies:
undici-types "~7.8.0"
"@types/node@^24.0.1":
version "24.2.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-24.2.1.tgz#83e41543f0a518e006594bb394e2cd961de56727"
integrity sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==
dependencies:
undici-types "~7.10.0"
"@types/normalize-package-data@^2.4.0", "@types/normalize-package-data@^2.4.3":
version "2.4.4"
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901"
@@ -1822,6 +1829,11 @@ eastasianwidth@^0.2.0:
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
editorconfig-checker@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/editorconfig-checker/-/editorconfig-checker-6.1.0.tgz#e6c47a7b93fbd8839673c9a585b9b973bb67ea9c"
integrity sha512-i25NwXlcWhadiO62AFUauucFPi9LwasoMRqoM8KkG3rJp6bx09mL/fDQpNMz2f6Nx/7EPVIZHK5/tIdztWzflA==
electron-to-chromium@^1.5.173:
version "1.5.190"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.190.tgz#f0ac8be182291a45e8154dbb12f18d2b2318e4ac"
@@ -3727,7 +3739,7 @@ markdownlint-cli@^0.45.0:
run-con "~1.3.2"
smol-toml "~1.3.4"
markdownlint@~0.38.0:
markdownlint@^0.38, markdownlint@~0.38.0:
version "0.38.0"
resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.38.0.tgz#862ca9d08f3a28f4149bd388ac369bb95865534e"
integrity sha512-xaSxkaU7wY/0852zGApM8LdlIfGCW8ETZ0Rr62IQtAnUMlMuifsg09vWJcNYeL4f0anvr8Vo4ZQar8jGpV0btQ==
@@ -4886,7 +4898,7 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
prettier@^3:
prettier@^3, prettier@^3.6.2:
version "3.6.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393"
integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==
@@ -5906,11 +5918,16 @@ typed-array-length@^1.0.7:
possible-typed-array-names "^1.0.0"
reflect.getprototypeof "^1.0.6"
typescript@>=4.2.0, typescript@^5.8.3:
typescript@>=4.2.0:
version "5.8.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.3.tgz#92f8a3e5e3cf497356f4178c34cd65a7f5e8440e"
integrity sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==
typescript@^5.8.3:
version "5.9.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.2.tgz#d93450cddec5154a2d5cabe3b8102b83316fb2a6"
integrity sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==
uc.micro@^2.0.0, uc.micro@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee"
@@ -5931,6 +5948,11 @@ unbox-primitive@^1.1.0:
has-symbols "^1.1.0"
which-boxed-primitive "^1.1.1"
undici-types@~7.10.0:
version "7.10.0"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.10.0.tgz#4ac2e058ce56b462b056e629cc6a02393d3ff350"
integrity sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==
undici-types@~7.8.0:
version "7.8.0"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.8.0.tgz#de00b85b710c54122e44fbfd911f8d70174cd294"