From d2d3807493463449c6ffed0b745cdfe6fce98e96 Mon Sep 17 00:00:00 2001 From: Alexander Mills Date: Sat, 5 Sep 2026 10:46:45 -0500 Subject: [PATCH] wip: land uncommitted working-tree changes (20260905) 2 file(s) that existed only in this working tree, committed on a side branch without touching the checked-out master or the working tree. Explicit paths; env/dec, keys, build output, files >5MB and secret-bearing files are excluded. Review before merging. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01KAAGBnXTSw7zE5xnY4tiBY --- .github/workflows/ores-lint.yml | 54 +++++++++++++++++++++++++++++++++ eslint.config.mjs | 11 +++++++ 2 files changed, 65 insertions(+) create mode 100644 .github/workflows/ores-lint.yml create mode 100644 eslint.config.mjs diff --git a/.github/workflows/ores-lint.yml b/.github/workflows/ores-lint.yml new file mode 100644 index 0000000..722a91c --- /dev/null +++ b/.github/workflows/ores-lint.yml @@ -0,0 +1,54 @@ +# Managed by .ores-lint/ - regenerated by the rollout script. +name: ores-lint + +on: + pull_request: + workflow_dispatch: + # Add `push:` here once this repo's lint debt is paid down. + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Detect project types + id: detect + run: | + { [ -f package.json ] || git ls-files '*.js' '*.mjs' '*.cjs' '*.ts' '*.tsx' | grep -q .; } \ + && echo "js=true" >> "$GITHUB_OUTPUT" || echo "js=false" >> "$GITHUB_OUTPUT" + { [ -f Cargo.toml ] || git ls-files '*.rs' | grep -q .; } \ + && echo "rs=true" >> "$GITHUB_OUTPUT" || echo "rs=false" >> "$GITHUB_OUTPUT" + { [ -f pubspec.yaml ] || git ls-files '*.dart' | grep -q .; } \ + && echo "dart=true" >> "$GITHUB_OUTPUT" || echo "dart=false" >> "$GITHUB_OUTPUT" + { [ -f gleam.toml ] || git ls-files '*.gleam' | grep -q .; } \ + && echo "gleam=true" >> "$GITHUB_OUTPUT" || echo "gleam=false" >> "$GITHUB_OUTPUT" + + # Node is the runner for ESLint and for the cross-language require-send + # scanner, so it is installed whenever any supported language is present. + - uses: actions/setup-node@v4 + if: steps.detect.outputs.js == 'true' || steps.detect.outputs.rs == 'true' || steps.detect.outputs.dart == 'true' || steps.detect.outputs.gleam == 'true' + with: + node-version: '22' + + # ESLint is a global tool here, not a repo dependency - so this job never + # runs `npm install` and never needs the repo's node_modules. + - name: Install eslint globally + if: steps.detect.outputs.js == 'true' + run: npm i -g eslint typescript-eslint + + - name: Install clippy + if: steps.detect.outputs.rs == 'true' + run: rustup component add clippy || true + + # Dart/Gleam SDKs are optional. When absent, dart.sh / gleam.sh skip + # with an actionable message; require-send.mjs still runs via Node. + - uses: dart-lang/setup-dart@v1 + if: steps.detect.outputs.dart == 'true' + continue-on-error: true + + - name: Run ores-lint + run: sh .ores-lint/lint.sh + env: + # Warn-only. Set to 1 here to make lint findings fail this repo's CI. + ORES_LINT_STRICT: '0' diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..ee5719d --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,11 @@ +// ores-lint house ESLint config. +// Managed by .ores-lint/ - see .ores-lint/README.md before editing. +// Repo-specific tweaks go in the options object below; the rollout script will +// not overwrite this file once you have changed it. +import oresConfig from './.ores-lint/eslint/base.mjs'; + +export default await oresConfig({ + // requireSend: { loggerNames: ['myLogger'], terminalMethods: ['send', 'flush'] }, + // rules: { 'no-console': 'warn' }, + // ignores: ['**/generated/**'], +});