mirror of
https://github.com/formax68/memoChron.git
synced 2026-07-22 05:45:44 +00:00
TypeScript bumped 4.7.4 → ^5.9.3: mandatory deviation; typescript-eslint@8 peer-requires typescript >=4.8.4 <6.1.0. Current 4.7.4 was below the floor. Two TS 5.x narrowing bugs fixed in-place (src/settings/SettingsTab.ts lines 76 and 262: unreachable ?? fallback on negated Map.get() result). Three view files updated with `as TFile` cast to resolve TS 5.x dual-module TFile type mismatch from obsidian-daily-notes-interface bundling its own older obsidian. eslint.config.mjs authors the DOC-01 flat config: obsidianmd recommended (brings @typescript-eslint recommendedTypeChecked, no-unsanitized, @microsoft/sdl no-inner-html, 26 obsidianmd/* rules), plus Phase 5 tightenings (no-unused-vars → error; no-restricted-syntax DIR-04 selector for document.createElement) and three phase-tagged override blocks that name Phase 6/7/8 as the removal owners. Dry-run discovery: obsidianmd/ui/sentence-case fires on all UI-facing strings with proper nouns/acronyms — added to Phase 6 override block. detach-leaves, no-unnecessary-type-assertion, prefer-active-doc in colorValidation.ts and viewRenderers.ts added to Phase 7 override block. npm run lint exits 0. lint.yml uses actions/checkout@v4 and actions/setup-node@v4 (sample-plugin canonical pins); release.yml retains its existing @v3 pins (deferred per Phase 5 plan 02 purist-path decision). Closes DOC-01.
28 lines
589 B
YAML
28 lines
589 B
YAML
# .github/workflows/lint.yml
|
|
# Source: https://github.com/obsidianmd/obsidian-sample-plugin/blob/master/.github/workflows/lint.yml
|
|
|
|
name: Lint
|
|
|
|
on:
|
|
push:
|
|
branches: ['**']
|
|
pull_request:
|
|
branches: ['**']
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [20.x, 22.x]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'npm'
|
|
- run: npm ci
|
|
- run: npm run lint
|