Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: allowJs and checkJs shouldn't be relatedTo emitDeclarationOnly
- remove emitDeclarationOnly from their relatedTo and group them
  separately from declaration by adding a newline

- these only seem quite loosely related, only by the DTS/JS doc
  - c.f. https://github.com/microsoft/TypeScript-Website/blob/2a57f7116b72217e47550657826cd650d258ba20/packages/documentation/copy/en/javascript/Creating%20DTS%20files%20From%20JS.md#L46
  - the relationship is not even mentioned in their notes or otherwise
    in the Reference, which was very confusing to me
  - the commit that adds this relationship seems to put
    `emitDeclarationOnly` elsewhere too, so maybe this was a mistake?
    - c.f. 4627aa3#diff-a912c6af3a16bf4288093c1264955bc6R75
  • Loading branch information
agilgur5 committed Sep 17, 2020
commit 3af3a1b7716799da7e604ffe3a3e5c1d5b65d97f
5 changes: 3 additions & 2 deletions packages/tsconfig-reference/scripts/tsconfigRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ export const relatedTo: [AnOption, AnOption[]][] = [

["noLib", ["lib"]],

["allowJs", ["checkJs", "emitDeclarationOnly"]],
["checkJs", ["allowJs", "emitDeclarationOnly"]],
["allowJs", ["checkJs"]],
["checkJs", ["allowJs"]],

["declaration", ["declarationDir", "emitDeclarationOnly"]],

["moduleResolution", ["module"]],
Expand Down