-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Change default newLine, forceConsistentCasingInFileNames #52298
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
Merged
DanielRosenwasser
merged 20 commits into
microsoft:main
from
RyanCavanaugh:changeDefaults
Jan 21, 2023
Merged
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
daf14b1
Change default compiler options
RyanCavanaugh 6744c10
Update baselines
RyanCavanaugh 38bbc75
Merge branch 'main' into changeDefaults
RyanCavanaugh fbff669
WIP
RyanCavanaugh 38ef9fc
Update infrastructure + completions to pull correct newline data
RyanCavanaugh 821e678
Update baselines
RyanCavanaugh 1eda9c8
Update tests
RyanCavanaugh 3317b5d
Pass format context settings to snippet printer
RyanCavanaugh 6231b29
Merge remote-tracking branch 'upstream/main' into changeDefaults
RyanCavanaugh f952f71
Baseline update
RyanCavanaugh d895353
Lint
RyanCavanaugh 83cfb8f
Fix call to getNewlineOrDefaultFromHost
RyanCavanaugh 319ce9d
Update src/services/completions.ts
RyanCavanaugh 2e48e78
Add missing format options argument
RyanCavanaugh 16194c5
Merge branch 'changeDefaults' of https://github.com/RyanCavanaugh/Typ…
RyanCavanaugh 7b623a3
Update baselines
RyanCavanaugh 3d2658a
Update test so it does something again
RyanCavanaugh 649e65d
Fix wrong conditional
RyanCavanaugh ea8d98b
Update src/testRunner/unittests/tscWatch/programUpdates.ts
RyanCavanaugh d40ab04
Update test + baseline
RyanCavanaugh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1643,7 +1643,7 @@ export function createLanguageService( | |
getCancellationToken: () => cancellationToken, | ||
getCanonicalFileName, | ||
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames, | ||
getNewLine: () => getNewLineCharacter(newSettings, () => getNewLineOrDefaultFromHost(host)), | ||
getNewLine: () => getNewLineCharacter(newSettings), | ||
sheetalkamat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
getDefaultLibFileName: options => host.getDefaultLibFileName(options), | ||
writeFile: noop, | ||
getCurrentDirectory: () => currentDirectory, | ||
|
@@ -2437,7 +2437,7 @@ export function createLanguageService( | |
} | ||
|
||
function getDocCommentTemplateAtPosition(fileName: string, position: number, options?: DocCommentTemplateOptions): TextInsertion | undefined { | ||
return JsDoc.getDocCommentTemplateAtPosition(getNewLineOrDefaultFromHost(host), syntaxTreeCache.getCurrentSourceFile(fileName), position, options); | ||
return JsDoc.getDocCommentTemplateAtPosition(getNewLineOrDefaultFromHost(host, /*formatSettings*/ undefined), syntaxTreeCache.getCurrentSourceFile(fileName), position, options); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not that you should fix it in this PR, but it seems like a bug that we don't have this for JSDoc comments. |
||
} | ||
|
||
function isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean { | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -781,7 +781,7 @@ class LanguageServiceShimObject extends ShimBase implements LanguageServiceShim | |
} | ||
|
||
private realizeDiagnostics(diagnostics: readonly Diagnostic[]): { message: string; start: number; length: number; category: string; }[] { | ||
const newLine = getNewLineOrDefaultFromHost(this.host); | ||
const newLine = getNewLineOrDefaultFromHost(this.host, /*formatSettings*/ undefined); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this one is probably okay. |
||
return realizeDiagnostics(diagnostics, newLine); | ||
} | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
tests/baselines/reference/transformApi/transformsCorrectly.issue24709.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
var X = /** @class */ (function () { | ||
function X() { | ||
} | ||
X.prototype.foobar = function (x) { return x; }; | ||
return X; | ||
}()); | ||
var X = /** @class */ (function () { | ||
function X() { | ||
} | ||
X.prototype.foobar = function (x) { return x; }; | ||
return X; | ||
}()); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.