| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f2e1c22 commit d86d37b
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -163,6 +163,7 @@ module.exports = { | |||
| 163 | 163 | code: 80, | |
| 164 | 164 | ignorePattern: '^// Flags:', | |
| 165 | 165 | ignoreRegExpLiterals: true, | |
| 166 | + ignoreTemplateLiterals: true, | ||
| 166 | 167 | ignoreUrls: true, | |
| 167 | 168 | tabWidth: 2, | |
| 168 | 169 | }], | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1537,8 +1537,9 @@ function formatMap(value, ctx, ignored, recurseTimes) { | |||
| 1537 | 1537 | const output = []; | |
| 1538 | 1538 | ctx.indentationLvl += 2; | |
| 1539 | 1539 | for (const { 0: k, 1: v } of value) { | |
| 1540 | - output.push(`${formatValue(ctx, k, recurseTimes)} => ` + | ||
| 1541 | - formatValue(ctx, v, recurseTimes)); | ||
| 1540 | + output.push( | ||
| 1541 | + `${formatValue(ctx, k, recurseTimes)} => ${formatValue(ctx, v, recurseTimes)}` | ||
| 1542 | + ); | ||
| 1542 | 1543 | } | |
| 1543 | 1544 | ctx.indentationLvl -= 2; | |
| 1544 | 1545 | return output; | |
@@ -1578,8 +1579,8 @@ function formatMapIterInner(ctx, recurseTimes, entries, state) { | |||
| 1578 | 1579 | if (state === kWeak) { | |
| 1579 | 1580 | for (; i < maxLength; i++) { | |
| 1580 | 1581 | const pos = i * 2; | |
| 1581 | - output[i] = `${formatValue(ctx, entries[pos], recurseTimes)}` + | ||
| 1582 | - ` => ${formatValue(ctx, entries[pos + 1], recurseTimes)}`; | ||
| 1582 | + output[i] = | ||
| 1583 | + `${formatValue(ctx, entries[pos], recurseTimes)} => ${formatValue(ctx, entries[pos + 1], recurseTimes)}`; | ||
| 1583 | 1584 | } | |
| 1584 | 1585 | // Sort all entries to have a halfway reliable output (if more entries than | |
| 1585 | 1586 | // retrieved ones exist, we can not reliably return the same output) if the | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,8 +61,8 @@ inputs.forEach((file) => { | |||
| 61 | 61 | const program = ast.body; | |
| 62 | 62 | ||
| 63 | 63 | // Build link | |
| 64 | - const link = `https://github.com/${repo}/blob/${tag}/` + | ||
| 65 | - path.relative('.', file).replace(/\\/g, '/'); | ||
| 64 | + const link = | ||
| 65 | + `https://github.com/${repo}/blob/${tag}/${path.relative('.', file).replace(/\\/g, '/')}`; | ||
| 66 | 66 | ||
| 67 | 67 | // Scan for exports. | |
| 68 | 68 | const exported = { constructors: [], identifiers: [] }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -65,10 +65,9 @@ function checkFile(path) { | |||
| 65 | 65 | if (previousDefinitionLabel && | |
| 66 | 66 | previousDefinitionLabel > node.label) { | |
| 67 | 67 | const { line, column } = node.position.start; | |
| 68 | - console.error((process.env.GITHUB_ACTIONS ? | ||
| 69 | - `::error file=${path},line=${line},col=${column}::` : '') + | ||
| 70 | - `Unordered reference at ${path}:${line}:${column} (` + | ||
| 71 | - `"${node.label}" should be before "${previousDefinitionLabel}")` | ||
| 68 | + console.error( | ||
| 69 | + (process.env.GITHUB_ACTIONS ? `::error file=${path},line=${line},col=${column}::` : '') + | ||
| 70 | + `Unordered reference at ${path}:${line}:${column} ("${node.label}" should be before "${previousDefinitionLabel}")` | ||
| 72 | 71 | ); | |
| 73 | 72 | process.exitCode = 1; | |
| 74 | 73 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -167,12 +167,10 @@ function linkManPages(text) { | |||
| 167 | 167 | const displayAs = `<code>${name}(${number}${optionalCharacter})</code>`; | |
| 168 | 168 | ||
| 169 | 169 | if (BSD_ONLY_SYSCALLS.has(name)) { | |
| 170 | - return `${beginning}<a href="https://www.freebsd.org/cgi/man.cgi` + | ||
| 171 | - `?query=${name}&sektion=${number}">${displayAs}</a>`; | ||
| 170 | + return `${beginning}<a href="https://www.freebsd.org/cgi/man.cgi?query=${name}&sektion=${number}">${displayAs}</a>`; | ||
| 172 | 171 | } | |
| 173 | 172 | ||
| 174 | - return `${beginning}<a href="http://man7.org/linux/man-pages/man${number}` + | ||
| 175 | - `/${name}.${number}${optionalCharacter}.html">${displayAs}</a>`; | ||
| 173 | + return `${beginning}<a href="http://man7.org/linux/man-pages/man${number}/${name}.${number}${optionalCharacter}.html">${displayAs}</a>`; | ||
| 176 | 174 | }); | |
| 177 | 175 | } | |
| 178 | 176 | ||
@@ -210,17 +208,14 @@ export function preprocessElements({ filename }) { | |||
| 210 | 208 | } else if (node.type === 'code') { | |
| 211 | 209 | if (!node.lang) { | |
| 212 | 210 | console.warn( | |
| 213 | - `No language set in ${filename}, ` + | ||
| 214 | - `line ${node.position.start.line}`); | ||
| 211 | + `No language set in ${filename}, line ${node.position.start.line}` | ||
| 212 | + ); | ||
| 215 | 213 | } | |
| 216 | 214 | const className = isJSFlavorSnippet(node) ? | |
| 217 | 215 | `language-js ${node.lang}` : | |
| 218 | 216 | `language-${node.lang}`; | |
| 219 | 217 | const highlighted = | |
| 220 | - `<code class='${className}'>` + | ||
| 221 | - (getLanguage(node.lang || '') ? | ||
| 222 | - highlight(node.value, { language: node.lang }) : node).value + | ||
| 223 | - '</code>'; | ||
| 218 | + `<code class='${className}'>${(getLanguage(node.lang || '') ? highlight(node.value, { language: node.lang }) : node).value}</code>`; | ||
| 224 | 219 | node.type = 'html'; | |
| 225 | 220 | ||
| 226 | 221 | if (isJSFlavorSnippet(node)) { | |
@@ -354,8 +349,7 @@ function parseYAML(text) { | |||
| 354 | 349 | ||
| 355 | 350 | result += '</table>\n</details>\n'; | |
| 356 | 351 | } else { | |
| 357 | - result += `${added.description}${deprecated.description}` + | ||
| 358 | - `${removed.description}\n`; | ||
| 352 | + result += `${added.description}${deprecated.description}${removed.description}\n`; | ||
| 359 | 353 | } | |
| 360 | 354 | ||
| 361 | 355 | if (meta.napiVersion) { | |
@@ -418,15 +412,14 @@ export function buildToc({ filename, apilinks }) { | |||
| 418 | 412 | const hasStability = node.stability !== undefined; | |
| 419 | 413 | toc += ' '.repeat((depth - 1) * 2) + | |
| 420 | 414 | (hasStability ? `* <span class="stability_${node.stability}">` : '* ') + | |
| 421 | - `<a href="#${isDeprecationHeading ? node.data.hProperties.id : id}">` + | ||
| 422 | - `${headingText}</a>${hasStability ? '</span>' : ''}\n`; | ||
| 415 | + `<a href="#${isDeprecationHeading ? node.data.hProperties.id : id}">${headingText}</a>${hasStability ? '</span>' : ''}\n`; | ||
| 423 | 416 | ||
| 424 | 417 | let anchor = | |
| 425 | 418 | `<span><a class="mark" href="#${id}" id="${id}">#</a></span>`; | |
| 426 | 419 | ||
| 427 | 420 | if (realFilename === 'errors' && headingText.startsWith('ERR_')) { | |
| 428 | - anchor += `<span><a class="mark" href="#${headingText}" ` + | ||
| 429 | - `id="${headingText}">#</a></span>`; | ||
| 421 | + anchor += | ||
| 422 | + `<span><a class="mark" href="#${headingText}" id="${headingText}">#</a></span>`; | ||
| 430 | 423 | } | |
| 431 | 424 | ||
| 432 | 425 | const api = headingText.replace(/^.*:\s+/, '').replace(/\(.*/, ''); | |
@@ -476,8 +469,7 @@ function altDocs(filename, docCreated, versions) { | |||
| 476 | 469 | `${host}/docs/latest-v${versionNum}/api/${filename}.html`; | |
| 477 | 470 | ||
| 478 | 471 | const wrapInListItem = (version) => | |
| 479 | - `<li><a href="${getHref(version.num)}">${version.num}` + | ||
| 480 | - `${version.lts ? ' <b>LTS</b>' : ''}</a></li>`; | ||
| 472 | + `<li><a href="${getHref(version.num)}">${version.num}${version.lts ? ' <b>LTS</b>' : ''}</a></li>`; | ||
| 481 | 473 | ||
| 482 | 474 | function isDocInVersion(version) { | |
| 483 | 475 | const [versionMajor, versionMinor] = version.num.split('.').map(Number); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -455,7 +455,6 @@ const callWithParams = r`\([^)]*\)`; | |||
| 455 | 455 | ||
| 456 | 456 | const maybeExtends = `(?: +extends +${maybeAncestors}${classId})?`; | |
| 457 | 457 | ||
| 458 | - /* eslint-disable max-len */ | ||
| 459 | 458 | const headingExpressions = [ | |
| 460 | 459 | { type: 'event', re: RegExp( | |
| 461 | 460 | `${eventPrefix}${maybeBacktick}${maybeQuote}(${notQuotes})${maybeQuote}${maybeBacktick}$`, 'i') }, | |
@@ -475,7 +474,6 @@ const headingExpressions = [ | |||
| 475 | 474 | { type: 'property', re: RegExp( | |
| 476 | 475 | `^${maybeClassPropertyPrefix}${maybeBacktick}${ancestors}(${id})${maybeBacktick}$`, 'i') }, | |
| 477 | 476 | ]; | |
| 478 | - /* eslint-enable max-len */ | ||
| 479 | 477 | ||
| 480 | 478 | function newSection(header, file) { | |
| 481 | 479 | const text = textJoin(header.children, file); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -138,8 +138,7 @@ async function checkFiles(...files) { | |||
| 138 | 138 | const data = JSON.parse(stdout); | |
| 139 | 139 | for (const { file, line, column, message } of data) { | |
| 140 | 140 | console.error( | |
| 141 | - `::error file=${file},line=${line},col=${column}::` + | ||
| 142 | - `${file}:${line}:${column}: ${message}` | ||
| 141 | + `::error file=${file},line=${line},col=${column}::${file}:${line}:${column}: ${message}` | ||
| 143 | 142 | ); | |
| 144 | 143 | } | |
| 145 | 144 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments