Improve auto-detection via shebang of TypeScript, JavaScript and Shell Script (#19114)
This commit is contained in:
parent
bebe24ea77
commit
aefc559f43
4 changed files with 4 additions and 3 deletions
|
@ -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 = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue