-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 full path for -project/-p paramater #4883
Conversation
if (commandLine.fileNames.length !== 0) { | ||
reportDiagnostic(createCompilerDiagnostic(Diagnostics.Option_project_cannot_be_mixed_with_source_files_on_a_command_line)); | ||
return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); | ||
} | ||
|
||
let fileOrDirectory = normalizePath(commandLine.options.project); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this const
I'm not sure we need the @mhegazy @RyanCavanaugh @vladima opinions? Can you take a quick look? |
@weswigham any idea why the lint rule is freaking out? |
I've got a fix ready in #5709. |
configFileName = combinePaths(fileOrDirectory, "tsconfig.json"); | ||
} | ||
else { | ||
if (!/^tsconfig(?:-.*)?\.json$/.test(getBaseFileName(fileOrDirectory))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced we should limit this to tsconfig.*.json
, if you want to use blah
I think we should simply allow that.
@saschanaz can you resolve the merge conflicts? I'm inclined to agree with @paulvanbrenk but I'd like to hear others' opinions on the matter. |
…onfigpath Conflicts: src/compiler/diagnosticMessages.json
@DanielRosenwasser @paulvanbrenk I'm also not completely sure we should force the name format, I can remove it if there is no good reason. Maybe there will be other options when we once make some breaking changes on the tsconfig file format. |
I agree with @paulvanbrenk we do not really need this restriction. the tooling (VS, Sublime, VSCode, atom, etc..) will still look for your |
The restriction is now removed as everyone thinks it is not needed. |
👍 |
1 similar comment
👍 |
Support full path for -project/-p paramater
Looks great. I'm very excited to use this myself! |
Documented for 1.8 at microsoft/TypeScript-wiki@e529568 Thanks @saschanaz! |
Fixes #2869.
-project
Requirestsconfig(-*).json
file name for potential future tsconfig format change