File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,10 @@ async function getMarkdownRecommendedConfig() {
28
28
name : "markdown/code-blocks/js" ,
29
29
files : [ "**/*.md/*.js" ] ,
30
30
languageOptions : {
31
+ sourceType : "module" ,
31
32
parserOptions : {
32
33
ecmaFeatures : {
34
+ globalReturn : true ,
33
35
impliedStrict : true ,
34
36
} ,
35
37
} ,
Original file line number Diff line number Diff line change
1
+ # Test
2
+
3
+ ``` js
4
+ const path = require (" node:path" );
5
+
6
+ console .log (path .resolve (__dirname , " ./test" ));
7
+
8
+ function run () {
9
+ console .log (" RUN" );
10
+ }
11
+
12
+ run ();
13
+ ```
14
+
15
+ ``` js
16
+ import { fileURLToPath } from " node:url" ;
17
+ import { dirname } from " node:path" ;
18
+
19
+ const __filename = fileURLToPath (import .meta.url);
20
+
21
+ console .log (path .resolve (__dirname , " ./test" ));
22
+
23
+ function run () {
24
+ console .log (" RUN" );
25
+ }
26
+
27
+ run ();
28
+ ` ` `
You can’t perform that action at this time.
0 commit comments