Closed
Bug 2088944
Opened 1 month ago
Closed 1 month ago
TypeScript check passes for a tsconfig.json with errors, such as an include list that matches no files
Categories
(Developer Infrastructure :: Linting and Formatting: JavaScript, defect)
Developer Infrastructure
Linting and Formatting: JavaScript
Tracking
(firefox162 fixed)
RESOLVED
FIXED
162 Branch
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: dao, Assigned: dao)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
A tsconfig.json error doesn't fail ./mach ts check or the typescript linter when the project uses the checkRootOnly plugin, as every project does. Both exit 0 and print nothing.
Steps:
- Write a
tsconfig.jsonthat sets thecheckRootOnlyplugin and has"include": ["nothing/*.mjs"], or a misspelled option such as"noImplicitAnyy": false. - Run
./mach ts check <dir>.
Expected: error TS18003: No inputs were found in config file, or error TS5025: Unknown compiler option, and exit code 2. That is what happens without the plugin.
Actual: no output, exit code 0.
tools/ts/plugins/checkRootOnly.js builds a new program with ts.createProgram(program.getRootFileNames(), program.getCompilerOptions(), …), which drops the original program's config file diagnostics.
| Assignee | ||
Comment 1•1 month ago
|
||
Updated•1 month ago
|
Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Pushed by dgottwald@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/ff1aa08a0090
https://hg.mozilla.org/integration/autoland/rev/f458c0a9547c
Keep tsconfig.json errors in the program that the checkRootOnly TypeScript plugin rebuilds. r=frontend-codestyle-reviewers,Standard8
Comment 3•1 month ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
status-firefox162:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
Updated•11 days ago
|
Component: Lint and Formatting → Linting and Formatting: JavaScript
You need to log in
before you can comment on or make changes to this bug.
Description
•