]> git.lizzy.rs Git - micro.git/blobdiff - runtime/syntax/javascript.yaml
Fixes #1249
[micro.git] / runtime / syntax / javascript.yaml
index 84f9d2754b78419d420140187d02ac798d038d59..dfce427265362724b6df6b679032ebacd79b02ff 100644 (file)
@@ -1,7 +1,7 @@
 filetype: javascript
 
 detect:
-    filename: "(\\.js$|\\.es[5678]?$)"
+    filename: "(\\.js$|\\.es[5678]?$|\\.mjs$)"
     header: "^#!.*/(env +)?node( |$)"
 
 rules:
@@ -17,7 +17,7 @@ rules:
     - symbol.brackets: "(\\[|\\])"
     - symbol.operator: "[-+/*=<>!~%?:&|]"
     - statement: "\\b(async|await|break|case|catch|const|continue|debugger|default|delete|do|else|export|finally)\\b"
-    - statement: "\\b(for|function|class|extends|get|if|import|in|instanceof|let|new|return|set)\\b"
+    - statement: "\\b(for|function|class|extends|get|if|import|from|in|of|instanceof|let|new|return|set)\\b"
     - statement: "\\b(super|switch|this|throw|try|typeof|var|void|while|with|yield)\\b"
     # reserved but unassigned
     - error: "\\b(enum|implements|interface|package|private|protected|public)"