Skip to content

Commit

Permalink
feat: add noEmit to templates' tsconfigs
Browse files Browse the repository at this point in the history
- for ease of use when using `tsc` for type-checking, which a lot of
  users already do
  - it doesn't fully type-check everything though, since we'd need to
    split off a tsconfig.build.json in order to let builds only run on
    `src` while type-checking would run on all files
    - but people already using `tsc --noEmit`, so might as well start
      supporting this as it's not uncommon

- also add to all fixtures
  - yea some centralization/extends or dogfooding create would help
    reduce all this duplication
  • Loading branch information
agilgur5 committed Sep 17, 2020
1 parent e0f79fe commit c802b8b
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions templates/basic/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
}
}
1 change: 1 addition & 0 deletions templates/react-with-storybook/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
}
}
1 change: 1 addition & 0 deletions templates/react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
}
}
3 changes: 2 additions & 1 deletion test/e2e/fixtures/build-default/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"jsx": "react",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"noEmit": true
},
"include": ["src", "types"]
}
3 changes: 2 additions & 1 deletion test/e2e/fixtures/build-invalid/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"jsx": "react",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"noEmit": true
},
"include": ["src", "types"]
}
3 changes: 2 additions & 1 deletion test/e2e/fixtures/build-withTsconfig/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"jsx": "react",
"esModuleInterop": false,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"noEmit": true
},
"include": ["src", "types"], // test parsing of trailing comma & comment
}
3 changes: 2 additions & 1 deletion test/integration/fixtures/build-options/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"jsx": "react",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"noEmit": true
},
"include": ["src", "types"],
}
3 changes: 2 additions & 1 deletion test/integration/fixtures/build-withBabel/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"jsx": "react",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"noEmit": false
},
"include": ["src", "types"],
}
3 changes: 2 additions & 1 deletion test/integration/fixtures/build-withConfig/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"jsx": "react",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"noEmit": true
},
"include": ["src", "types"],
}

0 comments on commit c802b8b

Please sign in to comment.