Skip to content
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
40 changes: 40 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# EditorConfig — https://editorconfig.org
# Keeps whitespace consistent across editors and IDEs before
# Prettier / rustfmt / ruff get a chance to run.

root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
# Markdown: trailing spaces are significant (hard line-break).
# Let Prettier handle wrapping; don't trim here.
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2

[*.{json,jsonc}]
indent_size = 2

[*.toml]
indent_size = 4

[Makefile]
indent_style = tab

[*.rs]
# rustfmt handles Rust formatting; EditorConfig just sets the baseline.
indent_size = 4

[*.py]
indent_size = 4

[*.{cpp,cc,c,h,hpp}]
indent_size = 4
54 changes: 43 additions & 11 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,54 @@
name: lint
# The org-wide lint gate. Drop this file in as
# .github/workflows/lint.yml and change nothing else.
#
# The five checks it publishes are exactly the five contexts the
# org ruleset requires:
#
# lint / actionlint
# lint / JSON validity
# lint / prettier
# lint / markdownlint
# lint / yamllint
#
# Those strings come from the job being called `lint` and calling a
# reusable workflow - a check publishes as "<caller job> / <called job>".
# Do NOT convert this to a matrix: a matrix publishes
# "lint (actionlint)" instead and will not satisfy the ruleset.
#
# Also copy .prettierrc, .prettierignore, .markdownlint.jsonc and
# .yamllint.yaml from nyuchi/.github into your repo root.

name: Lint

on:
pull_request:
push:
branches: [master]

permissions:
contents: read
# Every default-branch name in the estate: `main` covers 68 repos,
# `master` covers siafudb-kuzu, `scaffold` covers shamwari-core,
# shamwari-gateway and shamwari-web. Drop a name and merging to that
# repo's default branch fires nothing, so the five contexts never
# land on the default-branch head - which is how `lint / prettier`
# stayed red in bundu-labs/.github from 2026-05-02 unnoticed.
#
# A list rather than a bare `push:`, because unfiltered push would
# run the gate on every feature-branch push in 74 repos and bill it
# twice per PR. Add a name here if a repo ever adopts a fourth.
branches: [main, master, scaffold]
# Required for repos whose ruleset uses a MERGE QUEUE: required checks
# must report on the gh-readonly-queue/** ref, and only merge_group
# produces that. Without it a queued PR stalls for the full
# check_response_timeout and nothing can ever land. Harmless where
# there is no queue, so it stays in the one identical caller.
merge_group:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

jobs:
lint:
uses: nyuchi/.github/.github/workflows/reusable-lint.yml@main
with:
# .svelte is excluded — formatting it needs prettier-plugin-svelte,
# which the org's reusable-lint workflow does not install. Svelte
# files stay locally-formattable; CI lints the rest.
prettier-glob: "**/*.{md,mdx,json,jsonc,ts,css,mjs}"
13 changes: 0 additions & 13 deletions .markdownlint-cli2.jsonc

This file was deleted.

30 changes: 28 additions & 2 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -1,13 +1,39 @@
// markdownlint-cli2 config — relaxed defaults that match nyuchi/.github.
// markdownlint-cli2 config for nyuchi/.github.
//
// Relaxed defaults that accommodate:
// - Long prose lines in docs (we format for readability, not width)
// - Inline HTML in the org profile (<div align="center">)
// - Files that start with an HTML comment or a <div> instead of an H1
// - Fenced code blocks without a language tag
//
// See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
{
"default": true,

// Line length — we wrap for readability, not at a fixed column.
"MD013": false,

// Inline HTML — profile/README.md uses <div align="center"> for the
// landing-page layout and that's intentional.
"MD033": false,

// First line must be a top-level heading — profile/README.md opens
// with an HTML comment, which is correct.
"MD041": false,

// Fenced code blocks without a language — acceptable for output
// blocks and plain-text fences.
"MD040": false,

// Duplicate headings are fine as long as they aren't siblings
// (e.g. "## Summary" appears in multiple docs; that's expected).
"MD024": { "siblings_only": true },

// Unordered list indentation — 2 spaces, matching our house style.
"MD007": { "indent": 2 },
"MD060": false,

// Table-column-style — re-enabled now that Prettier is in CI and
// auto-formats tables. Prettier's table output should satisfy
// MD060's "aligned" style.
"MD060": true,
}
33 changes: 29 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
.svelte-kit
build
.vercel
node_modules
# Prettier ignore for nyuchi/.github.

# Standard ignores
node_modules/
.git/

# Files with structural meaning that Prettier would harm
LICENSE
CODEOWNERS
CODEOWNERS.example
.github/CODEOWNERS

# YAML is handled by yamllint and actionlint, not Prettier — they have
# stronger guarantees about GitHub Actions semantics that Prettier does
# not understand (e.g. the `on:` truthy quirk).
*.yml
*.yaml

# Governance documents are authored by the Founder as legal / formal
# documents. Prettier's markdown formatter reflows numbered paragraphs
# ("2.2 The company pursues...") after a list as loose list-item
# continuations, which corrupts the document's structure. Hand-format
# these files.
profile/governance/

# Lockfiles, generated output
*-lock.json
*-lock.yaml
package-lock.json
pnpm-lock.yaml
15 changes: 12 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{
"semi": true,
"singleQuote": false,
"printWidth": 80,
"proseWrap": "preserve",
"tabWidth": 2,
"useTabs": false,
"endOfLine": "lf",
"trailingComma": "all",
"printWidth": 80
"overrides": [
{
"files": ["*.md", "*.mdx"],
"options": {
"embeddedLanguageFormatting": "off"
}
}
]
}
54 changes: 50 additions & 4 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,82 @@
# yamllint config — matches nyuchi/.github.
# yamllint config for nyuchi/.github.
#
# Relaxed defaults that accommodate:
# - GitHub Actions workflows (which use `on:` — a YAML 1.1 boolean)
# - Long lines in shell heredocs and comment blocks inside workflows
# - Files without `---` document-start markers
#
# See https://yamllint.readthedocs.io/en/stable/configuration.html

extends: default

ignore: |
node_modules/
.svelte-kit/
.vercel/
build/
# Lockfiles are generated, not authored. .prettierignore already
# exempts them under "Lockfiles, generated output"; yamllint not doing
# the same was an oversight that only stayed hidden because this repo
# has no lockfile. pnpm writes registry deprecation notices verbatim
# into pnpm-lock.yaml, which routinely exceeds the 140-char limit and
# cannot be rewrapped without invalidating the lockfile.
pnpm-lock.yaml
package-lock.json
yarn.lock
**/pnpm-lock.yaml
**/package-lock.json
**/yarn.lock

# Rails fixtures are ERB TEMPLATES, not YAML documents. campfire's
# test/fixtures/users.yml opens with
# <% password_digest = BCrypt::Password.create("secret123456") %>
# and only becomes valid YAML after Rails renders it, so yamllint
# reports a hard syntax error and always will. The ActionText fixtures
# alongside them are HTML blobs that tests assert on byte-for-byte, so
# rewrapping their long lines would be a test change, not a formatting
# change. Seven files in that repo are ERB-templated YAML; the others
# only parse because their ERB happens to sit inside quoted scalars,
# which is luck rather than correctness.
test/fixtures/
**/test/fixtures/

rules:
# 140-char limit. Workflow files have legitimately long shell URLs
# (the actionlint download script, action references) and issue-
# template `about:` strings render as a single line in the picker,
# so wrapping them would change user-visible behaviour. 140 is
# tight enough to flag truly excessive lines without forcing
# awkward breaks on URLs. Strict CI fails on any violation.
line-length:
max: 140
level: error
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true

# GitHub Actions uses `on:` as a key, which YAML 1.1 treats as a
# boolean. Disable the truthy check on keys to stop yamllint from
# rejecting every workflow.
truthy:
check-keys: false
level: error

# We don't prefix YAML files with `---`.
document-start: disable

# Be lenient about how many spaces follow `#` in comments.
comments:
min-spaces-from-content: 1

# Comments-indentation flags standalone comments that don't match the
# indent of surrounding content. Real-world configs use comments to
# delimit sections (long `# ----` separator banners) and to mark
# commented-out blocks at the level of the code they replace, neither
# of which fits the rule cleanly. Disabled.
comments-indentation: disable

# GitHub issue forms have deeply nested lists and mappings.
indentation:
spaces: 2
indent-sequences: consistent

# Stops a warning on the trailing-empty-line check for files that
# end cleanly with a single newline.
empty-lines:
max-end: 1
Loading