Skip to content

Commit

Permalink
fix: allowJs and checkJs shouldn't be relatedTo emitDeclarationOnly
Browse files Browse the repository at this point in the history
- 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
1 parent cc7d024 commit 3af3a1b
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 3af3a1b

Please sign in to comment.