mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Add mjs/cjs and mts/cts to path based language mode checks
This commit is contained in:
@@ -51,9 +51,9 @@ export function isJsConfigOrTsConfigFileName(fileName: string): boolean {
|
||||
}
|
||||
|
||||
export function doesResourceLookLikeATypeScriptFile(resource: vscode.Uri): boolean {
|
||||
return /\.tsx?$/i.test(resource.fsPath);
|
||||
return /\.(tsx?|mts|cts)$/i.test(resource.fsPath);
|
||||
}
|
||||
|
||||
export function doesResourceLookLikeAJavaScriptFile(resource: vscode.Uri): boolean {
|
||||
return /\.jsx?$/i.test(resource.fsPath);
|
||||
return /\.(jsx?|mjs|cjs)$/i.test(resource.fsPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user