TypeScript Code Quality

This documentation was generated with the assistance of AI. Please report any inaccuracies.

Run this project’s TypeScript static-analysis and formatting tools — ESLint (flat config, plus Oxlint when it’s set up alongside ESLint), tsc --noEmit type-checking, Prettier --check, Biome when the project chose it, and Stylelint for CSS/SCSS when configured — then report every issue found (file, line, rule id, message), grouped by tool and classified by rule id. This is a read-only reporting skill: it runs the configured tools and reports results, it does not fix issues unless asked to as an explicit follow-up.

Purpose

iru-typescript-code-quality gives a single, framework-aware lint/type-check/format pass across the npm ecosystem’s fragmented tooling. It detects the project’s framework (npm/TypeScript library, React, Angular, React Native, Ionic, Hilla frontend, NestJS, Next.js) from package.json to pick the right invocation (e.g. ng lint vs a direct npx eslint) and the right rule-id prefixes to classify against, verifies each tool’s own config file actually exists before trusting a "zero issues" result from it, runs what the project’s own lint script runs, and — unlike Java’s Checkstyle/PMD/SpotBugs trio, which always analyze the whole project — every tool here except tsc accepts a glob directly, so a scoped invocation narrows what actually runs rather than just what gets reported.

Framework-specific behavior:

  • NestJS 12 scaffolds lint with Oxlint (oxlint --type-aware) plus Prettier and no ESLint, so Oxlint is the primary linter there; older Nest projects use ESLint plus Prettier like any other ESLint project.

  • Next.js 16 removed next lint, so the skill runs plain eslint with the eslint-config-next flat config (next lint only on Next 15 or older, or biome check when the project chose Biome), and runs next typegen before tsc --noEmit so the generated route types exist. Rule ids from @next/next/ and jsx-a11y/ are classified alongside the usual ones.

  • React Native resolves a toolchain first (expo in dependencies means expo, even with prebuild output; react-native without expo means metro, a bare CLI app). Metro apps use @react-native/eslint-config (the legacy .eslintrc.js with ESLint 8, or its /flat export; an ESLint 9 crash from an incompatible plugin is reported as a crash, never as zero issues), expo apps use eslint-config-expo. Both run as plain eslint over the whole app because expo lint only covers src/, app/ and components/. Prettier is scoped to source files (*/.{js,jsx,ts,tsx}) so the native android//ios/ projects are not flagged, and tsc --noEmit on Expo with TypeScript 6 may need "types": ["jest"], reported as a single configuration finding. Rule ids from react-native/, @react-native/, ft-flow/, expo/ and import/* are classified.

For UI projects (React/Vite, Next.js, Ionic, Hilla, Angular) it also sums the accessibility lint rules already in the ESLint buckets (jsx-a11y/*, angular-eslint’s template accessibility rules) into one accessibility subtotal so the accessibility level of the catalog’s UI contract (see Building user interfaces) can be read at a glance; when neither plugin is configured it says "accessibility lint not configured" instead, and never adds the plugin or edits the config.

Plugin

Shipped by the iru-typescript plugin of the ai-catalog marketplace (install with /plugin install iru-typescript@ai-catalog; see Plugins).

Invocation

/iru-typescript-code-quality
/iru-typescript-code-quality <path-or-glob>

Inputs

Argument Required Description Default

path-or-glob

No

Scopes both the run and the report to specific files. ESLint, Oxlint, Prettier, and Stylelint accept the glob directly and only analyze what it matches; tsc has no path argument, so it always type-checks the whole project graph and the reported diagnostic lines are filtered afterward to ones whose file matches the scope.

None — omitting it checks and reports the whole project.

Outputs

  • A plain-text summary in the conversation — never a written file.

  • Findings grouped first by tool (ESLint, Oxlint, Biome, tsc, Prettier, Stylelint), then by rule id/diagnostic code within each tool.

  • Per issue: file:line, rule id (or TS<code> or Biome lint/<group>/<rule> category), and message; Prettier findings are filed under a single formatting bucket since it has no rule ids.

  • A total issue count per tool and an overall total; a tool whose config isn’t found is reported as "not configured, skipped" rather than a misleading clean pass.

  • When the prompt supplies a baseline (a prior per-rule-id count, e.g. from iru-typescript-code-one-task-group), only the new-vs-baseline regressions per rule id — not the full current list.

  • For a UI project, an accessibility subtotal right below the overall total (or "accessibility lint not configured").

  • No source, ESLint, tsc, Prettier, or Stylelint configuration is ever modified.

Execution flow

flowchart TD A["Start /iru-typescript-code-quality\n(optional path-or-glob)"] --> B["Detect framework from package.json\n(library, react, angular, react-native [expo or metro], ionic, hilla-frontend, nestjs, nextjs)"] B --> C["Detect package manager\n(npm, pnpm, yarn) from lockfile/packageManager"] C --> D["Verify each tool's config exists\n(eslint.config.*/angular.json lint target,\ntsconfig.json, prettierrc, stylelintrc, oxlintrc)"] D --> D2["Pick linter from the lint script:\nOxlint for NestJS 12, plain eslint for Next 16,\nplain eslint for React Native (not expo lint),\nng lint for Angular"] D2 --> E{Tool configured?} E -- no --> F["Report '&lt;tool&gt; not configured, skipped'"] E -- yes --> G["Run ESLint (or ng lint) --format json,\nOxlint --format json if configured"] G --> H["Run tsc --noEmit --pretty false\n(-b for solution-style tsconfig;\nnext typegen first on Next.js)"] H --> I["Run Prettier --list-different"] I --> I2["Run Biome check\nif configured"] I2 --> J["Run Stylelint --formatter json\nif CSS/SCSS files + config exist"] J --> K["Read each generated report"] K --> L{Scope argument given?} L -- yes --> M["Filter tsc diagnostics to matching files\n(other tools already scoped by glob)"] L -- no --> N["Keep full project-wide results"] M --> O N --> O["Bucket issues by tool, then by rule id/TS code"] O --> P{Baseline supplied?} P -- yes --> Q["Report only new-vs-baseline regressions\nper rule id"] P -- no --> R["Report full per-tool, per-rule-id counts\nplus overall total"]

Dependencies

Invokes

None — iru-typescript-code-quality is a leaf skill; it only runs ESLint/Oxlint/tsc/Prettier/Stylelint and reads their generated reports, it does not call any other skill in this catalog.

Invoked by

  • iru-gate-runner — both callers above always invoke this skill from inside a iru-gate-runner sub-agent they spawn, not inline.

Source

SKILL.md on GitHub — the file this page was generated from.