Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support project references #392

Merged
merged 22 commits into from
Sep 4, 2018
Merged

Support project references #392

merged 22 commits into from
Sep 4, 2018

Conversation

ajafff
Copy link
Member

@ajafff ajafff commented Aug 27, 2018

Checklist

Overview of change

Always pass projectReferences to ts.createProgram if available. That causes TypeScript to resolve declaration files of referenced projects instead of the source files.
Always exclude declaration files of referenced projects from linting.
Don't create a Program if it's known to not contain any file matching the specified glob patterns.
When -r or --references is enabled, follow all "references" recursively and lint each project once.

@ajafff
Copy link
Member Author

ajafff commented Aug 28, 2018

TODO:

  • pass references to createProgram API to actually resolve build outputs of referenced projects
  • check if build outputs (.d.ts files) of referenced projects are linted with the referencing project (requires Expose getOutputJavaScriptFileName from tsbuild microsoft/TypeScript#26410)
  • simplify exclusion of external files for composite projects by only looking at rootFileNames
  • implement this feature behind a flag (allows linting only one project without linting referenced upstream projects)
    • if that flag is enabled but no project is specified, default to . instead of the current findup approach

@ajafff ajafff changed the title wip: project references Support project references Sep 4, 2018
@ajafff ajafff merged commit 2bd6128 into master Sep 4, 2018
@ajafff ajafff deleted the project-references branch September 4, 2018 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for project references / composite projects
1 participant