Skip to content

Commit

Permalink
run prettier/eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
sidvishnoi committed Nov 17, 2023
1 parent d8539c9 commit 4d40c3a
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 51 deletions.
4 changes: 1 addition & 3 deletions src/core/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ export async function run(conf) {
return;
}
if (ghURL.origin !== "https://github.com") {
const msg = docLink`${"[github]"} configuration option must be HTTPS and pointing to GitHub. (${
ghURL.href
}).`;
const msg = docLink`${"[github]"} configuration option must be HTTPS and pointing to GitHub. (${ghURL.href}).`;
rejectGithubPromise(msg);
return;
}
Expand Down
16 changes: 8 additions & 8 deletions src/core/issues-notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,19 @@ function getIssueType(inno) {
const type = isIssue
? "issue"
: isWarning
? "warning"
: isEdNote
? "ednote"
: "note";
? "warning"
: isEdNote
? "ednote"
: "note";
const displayType = isIssue
? isFeatureAtRisk
? l10n.feature_at_risk
: l10n.issue
: isWarning
? l10n.warning
: isEdNote
? l10n.editors_note
: l10n.note;
? l10n.warning
: isEdNote
? l10n.editors_note
: l10n.note;
return { type, displayType, isFeatureAtRisk };
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/structure.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ function scanSections(sections, maxTocLevel, { prefix = "" } = {}) {
let secno = section.isIntro
? ""
: appendixMode
? appendixNumber(index - lastNonAppendix + 1)
: prefix + index;
? appendixNumber(index - lastNonAppendix + 1)
: prefix + index;
const level = secno.split(".").length;
if (level === 1) {
secno += ".";
Expand Down
4 changes: 1 addition & 3 deletions src/w3c/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,9 +626,7 @@ export async function run(conf) {
conf.revisedRecEnd = validateDateAndRecover(conf, "revisedRecEnd");

if (conf.noRecTrack && recTrackStatus.includes(conf.specStatus)) {
const msg = docLink`Document configured as ${"[noRecTrack]"}, but its status ("${
conf.specStatus
}") puts it on the W3C Rec Track.`;
const msg = docLink`Document configured as ${"[noRecTrack]"}, but its status ("${conf.specStatus}") puts it on the W3C Rec Track.`;
const notAllowed = codedJoinOr(recTrackStatus, { quotes: true });
const hint = `Status **can't** be any of: ${notAllowed}.`;
showError(msg, name, { hint });
Expand Down
16 changes: 8 additions & 8 deletions src/w3c/templates/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,14 @@ export default (conf, options) => {
${!conf.prevRecURI
? ""
: conf.isRec
? html`
<dt>${l10n.prev_recommendation}</dt>
<dd><a href="${conf.prevRecURI}">${conf.prevRecURI}</a></dd>
`
: html`
<dt>${l10n.latest_recommendation}</dt>
<dd><a href="${conf.prevRecURI}">${conf.prevRecURI}</a></dd>
`}
? html`
<dt>${l10n.prev_recommendation}</dt>
<dd><a href="${conf.prevRecURI}">${conf.prevRecURI}</a></dd>
`
: html`
<dt>${l10n.latest_recommendation}</dt>
<dd><a href="${conf.prevRecURI}">${conf.prevRecURI}</a></dd>
`}
${conf.editors.length
? html`
<dt>${conf.editors.length > 1 ? l10n.editors : l10n.editor}</dt>
Expand Down
46 changes: 23 additions & 23 deletions src/w3c/templates/sotd.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,29 +67,29 @@ export default (conf, opts) => {
${conf.isUnofficial
? renderIsUnofficial(opts)
: conf.isTagFinding
? opts.additionalContent
: conf.isNoTrack
? renderIsNoTrack(conf, opts)
: html`
<p><em>${l10n.status_at_publication}</em></p>
${conf.isMemberSubmission
? noteForSubmission(conf, opts)
: html`
${!conf.sotdAfterWGinfo ? opts.additionalContent : ""}
${!conf.overrideStatus
? html` ${linkToWorkingGroup(conf)} `
: ""}
${conf.sotdAfterWGinfo ? opts.additionalContent : ""}
${conf.isRec ? renderIsRec(conf) : renderNotRec(conf)}
${renderDeliverer(conf)}
<p>
This document is governed by the
<a id="w3c_process_revision" href="${processLink}"
>03 November 2023 W3C Process Document</a
>.
</p>
`}
`}
? opts.additionalContent
: conf.isNoTrack
? renderIsNoTrack(conf, opts)
: html`
<p><em>${l10n.status_at_publication}</em></p>
${conf.isMemberSubmission
? noteForSubmission(conf, opts)
: html`
${!conf.sotdAfterWGinfo ? opts.additionalContent : ""}
${!conf.overrideStatus
? html` ${linkToWorkingGroup(conf)} `
: ""}
${conf.sotdAfterWGinfo ? opts.additionalContent : ""}
${conf.isRec ? renderIsRec(conf) : renderNotRec(conf)}
${renderDeliverer(conf)}
<p>
This document is governed by the
<a id="w3c_process_revision" href="${processLink}"
>03 November 2023 W3C Process Document</a
>.
</p>
`}
`}
${opts.additionalSections}
`;
};
Expand Down
8 changes: 4 additions & 4 deletions tests/spec/w3c/headers-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1563,10 +1563,10 @@ describe("W3C — Headers", () => {
const group = specStatus.includes("finding")
? "tag"
: /^(CG)-/.test(specStatus)
? "wicg"
: /^(BG)-/.test(specStatus)
? "publishingbg"
: "webapps";
? "wicg"
: /^(BG)-/.test(specStatus)
? "publishingbg"
: "webapps";
const ops = makeStandardOps({
shortName: "some-report",
specStatus,
Expand Down

0 comments on commit 4d40c3a

Please sign in to comment.