typescript-code-and-test-standards
TypeScript code and test standards
Covers .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, and .cts. It carries the discipline no tool checks: what a comment is allowed to say, what a documentation block owes a reader, when a test is required, and when a mock is justified.
What this skill decides and what it does not
The host project's own tooling owns everything it is configured to check, and this skill never overrides it:
- The formatter owns indentation, quotes, semicolons, line width, trailing commas, and import order.
- The linter owns unused variables, equality operators, brace enforcement, and rule-level style, for every rule the project has turned on.
- The compiler owns types and strictness.
A rule the project configured off is a decision. A rule it never configured is silence, and silence cedes nothing. A linter running two rules has taken no position on the other thousand, so reading its quiet as a verdict is how an entire category goes unreviewed while every command exits 0.
This skill owns comments, documentation blocks, readability judgement, naming, structure, the test mandate, and mocking. It reports and follows configuration. It never creates or edits a configuration file to make a project match itself, which is not the same as setting a value the change itself requires at the level the tool reads it.
What makes a finding this skill's, and the test that keeps it from drifting into a review it cannot do: you can show the code is wrong by pointing at the language, the runtime's documented behaviour, or the type system, without knowing what the program is for. A for...in over an array, an array-spread of a non-iterable, a parseInt with no radix, an as that lies: each is provable from TypeScript or JavaScript alone. A wrong threshold, a wrong business rule, a wrong status code: each needs the intended behaviour to prove it, and this skill does not have that. So every finding names the language fact behind it, and one that would read identically against a file in another language has been written at the wrong altitude.