microsoft/TypeScript: 135 test baselines over 256 KiB
TypeScript's repository holds about 61,000 test baselines. A 256 KiB file_ rule found 135 larger than that, most of them test outputs that grew. The same run found trailing whitespace in 6 source files. This config was written to test alint; TypeScript doesn't use alint.
What alint found
- id: ts-baseline-file-max-size
kind: file_max_size
paths:
include: ["tests/baselines/reference/**/*" ]
exclude:
- "tests/baselines/reference/projectOutput/**"
- "tests/baselines/reference/api/**"
max_bytes: 262144
level: warning⚠︎ warning ts-baseline-file-max-size
Of the test baselines, 135 are over 256 KiB, such as binaryArithmeticControlFlowGraphNotTooLarge.
- id: ts-src-no-trailing-whitespace
kind: no_trailing_whitespace
paths:
include: ["src/**/*.ts" , "scripts/**/*.ts" , "scripts/**/*.mjs" , "scripts/**/*.cjs" ]
exclude: ["**/*.generated.*" , "src/lib/*.generated.d.ts" ]
level: warning
fix:
file_trim_trailing_whitespace: {}
- id: ts-src-final-newline
kind: final_newline
paths:
include: ["src/**/*.ts" , "scripts/**/*.ts" , "scripts/**/*.mjs" , "scripts/**/*.cjs" ]
exclude: ["**/*.generated.*" , "src/lib/*.generated.d.ts" ]
level: warning
fix:
file_append_final_newline: {}⚠︎ warning ts-src-no-trailing-whitespace
Six source files have trailing whitespace, such as line 6549 of src/.
⚠︎ warning ts-src-final-newline
One source file has no final newline. alint fix handles both.
The bundled GitHub Actions rules (alint 0.16.1, on the workflows as of 7 May 2026) flag 5 action references that point at a branch, such as microsoft/, one in each of 5 workflows.
The config
The config checks what the lint gates depend on: the lint, format and knip scripts in package, the three dprint plugins and their version, and strict mode in the tsconfig files. It also checks line endings and whitespace in src/, as the .editorconfig asks. ESLint, dprint and knip run from command_ rules.
- id: ts-dprint-ts-plugin-version-agrees
when: facts.has_dprint_config
kind: cross_file_value_equals
source:
file: package.json
extract:
json: "$.devDependencies['@dprint/typescript']"
targets:
- file: .dprint.jsonc
extract:
regex: 'plugins\.dprint\.dev/typescript-([0-9]+\.[0-9]+\.[0-9]+)\.wasm'
level: warningThe dprint TypeScript plugin's version is written twice, in package and in the plugin URL in .dprint. This rule keeps them equal.
Speed
In the May run, on a full checkout, the rules that don't call other tools took 620 ms. Measured with hyperfine on a machine with 10 logical cores.
What stays outside alint
What needs TypeScript's syntax tree or the built compiler stays in the repository's tools:
- the 9 custom ESLint rules, the baseline accept loop, and the generated files, which need their generators;
scripts/, which checks that every diagnostic inerrorCheck .mjs diagnosticMessagesappears in some error baseline. alint has no rule that requires each entry of a list to match somewhere;.json - the package-size check, which compares two git refs, and the browser and module-format checks, which run the built compiler.