Improve auto-detection via shebang of TypeScript, JavaScript and Shell Script (#19114)

This commit is contained in:
Peter Tripp
2024-10-13 02:35:46 -04:00
committed by GitHub
parent bebe24ea77
commit aefc559f43
4 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
name = "JavaScript"
grammar = "tsx"
path_suffixes = ["js", "jsx", "mjs", "cjs"]
first_line_pattern = '^#!.*\bnode\b'
# [/ ] is so we match "env node" or "/node" but not "ts-node"
first_line_pattern = '^#!.*\b(?:[/ ]node|deno run.*--ext[= ]js)\b'
line_comments = ["// "]
autoclose_before = ";:.,=}])>"
brackets = [