File tree Expand file tree Collapse file tree 5 files changed +14
-14
lines changed Expand file tree Collapse file tree 5 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -435,7 +435,7 @@ export async function createStarryNight(grammars, options) {
435
435
* `vscode-oniguruma`.
436
436
*/
437
437
async function createOniguruma ( options ) {
438
- const wasmBin = await getOniguruma ( options || undefined )
439
- await vscodeOniguruma . loadWASM ( wasmBin )
438
+ const wasmBinary = await getOniguruma ( options || undefined )
439
+ await vscodeOniguruma . loadWASM ( wasmBinary )
440
440
return vscodeOniguruma
441
441
}
Original file line number Diff line number Diff line change 63
63
"@types/json-stable-stringify" : " ^1.0.0" ,
64
64
"@types/mdast" : " ^4.0.0" ,
65
65
"@types/node" : " ^20.0.0" ,
66
- "c8" : " ^8 .0.0" ,
66
+ "c8" : " ^9 .0.0" ,
67
67
"css" : " ^3.0.0" ,
68
68
"generate-github-markdown-css" : " ^6.0.0" ,
69
69
"hast-util-to-html" : " ^9.0.0" ,
75
75
"type-coverage" : " ^2.0.0" ,
76
76
"typescript" : " ^5.0.0" ,
77
77
"unist-builder" : " ^4.0.0" ,
78
- "xo" : " ^0.56 .0" ,
78
+ "xo" : " ^0.57 .0" ,
79
79
"yaml" : " ^2.0.0"
80
80
},
81
81
"scripts" : {
Original file line number Diff line number Diff line change @@ -223,10 +223,10 @@ const ruleSchema = {
223
223
const grammarsBase = new URL ( 'grammars/' , gemBase )
224
224
const grammarBasenames = await fs . readdir ( grammarsBase )
225
225
const scopes = grammarBasenames . flatMap ( function ( d ) {
226
- const ext = path . extname ( d )
226
+ const extension = path . extname ( d )
227
227
228
- if ( ext === '.json' ) {
229
- return path . basename ( d , ext )
228
+ if ( extension === '.json' ) {
229
+ return path . basename ( d , extension )
230
230
}
231
231
232
232
assert ( d === 'version' , d )
Original file line number Diff line number Diff line change @@ -128,19 +128,19 @@ for (const fileName of fileNames) {
128
128
const lightCss = light ? themeMap . get ( light ) : undefined
129
129
const darkCss = dark ? themeMap . get ( dark ) : undefined
130
130
/** @type {Array<string> } */
131
- const doc = [ ]
131
+ const document = [ ]
132
132
133
133
if ( lightCss && darkCss ) {
134
- doc . push (
134
+ document . push (
135
135
lightCss ,
136
136
'@media (prefers-color-scheme: dark) {\n' + darkCss + '\n}'
137
137
)
138
138
} else {
139
- doc . push ( lightCss || darkCss || '' )
139
+ document . push ( lightCss || darkCss || '' )
140
140
}
141
141
142
142
for ( const rule of selectorsMap . values ( ) ) {
143
- doc . push ( rule )
143
+ document . push ( rule )
144
144
}
145
145
146
146
writePromises . push (
@@ -150,7 +150,7 @@ for (const fileName of fileNames) {
150
150
'/* This is a theme distributed by `starry-night`.\n' +
151
151
' * It’s based on what GitHub uses on their site.\n' +
152
152
' * See <https://github.com/wooorm/starry-night> for more info. */' +
153
- doc . join ( '\n\n' ) ,
153
+ document . join ( '\n\n' ) ,
154
154
{ ...prettierConfig , parser : 'css' }
155
155
)
156
156
)
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import {common, createStarryNight} from '../index.js'
12
12
13
13
const highlighter = await createStarryNight ( common )
14
14
15
- const doc = `<!doctype html>
15
+ const document = `<!doctype html>
16
16
<html lang=en>
17
17
<title>Example</title>
18
18
<link rel="stylesheet" href="https://esm.sh/github-markdown-css/github-markdown.css">
@@ -49,7 +49,7 @@ console.log(tree)`,
49
49
</html>
50
50
`
51
51
52
- fs . writeFile ( new URL ( '../media/preview.html' , import . meta. url ) , doc )
52
+ fs . writeFile ( new URL ( '../media/preview.html' , import . meta. url ) , document )
53
53
54
54
/**
55
55
* @param {string } value
You can’t perform that action at this time.
0 commit comments