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
29 changes: 29 additions & 0 deletions .github/workflows/org-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Org-required lint. The openNTL org ruleset names this file in a
# "Require workflows to pass" rule, so GitHub runs it on every pull request
# in every repo in the org — no per-repo .github/workflows/lint.yml needed.
#
# The job is called `lint` and calls nyuchi/.github's reusable workflow, so
# its checks publish as the same five contexts as the per-repo caller:
# lint / actionlint, lint / JSON validity, lint / prettier,
# lint / markdownlint, lint / yamllint
#
# A repo's own .prettierrc, .prettierignore, .markdownlint.jsonc and
# .yamllint.yaml at its root always win. Where one is missing, the reusable
# workflow falls back to the canonical copy in nyuchi/.github.

name: Org lint

on:
pull_request:
merge_group:

concurrency:
group: org-lint-${{ github.repository }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
lint:
uses: nyuchi/.github/.github/workflows/reusable-lint.yml@main
39 changes: 39 additions & 0 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// markdownlint-cli2 config for openNTL/.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 },

// 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,
}
30 changes: 30 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Prettier ignore for openNTL/.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
16 changes: 16 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"printWidth": 80,
"proseWrap": "preserve",
"tabWidth": 2,
"useTabs": false,
"endOfLine": "lf",
"trailingComma": "all",
"overrides": [
{
"files": ["*.md", "*.mdx"],
"options": {
"embeddedLanguageFormatting": "off"
}
}
]
}
82 changes: 82 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# yamllint config for openNTL/.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/
# 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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# .github
Organisation profile and default community health files for openNTL

Organisation profile and default community health files for openNTL.
Loading