Skip to content

Commit

Permalink
Bump prettier (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot authored Jan 17, 2024
1 parent 2c4fdd0 commit 8f855ab
Show file tree
Hide file tree
Showing 59 changed files with 1,311 additions and 1,401 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"prefer-arrow-callback": "error",
"object-shorthand": "error",
"no-inner-declarations": "off",
"no-loss-of-precision": "off",
"consistent-return": "off",
"no-floating-decimal": "error",
"no-self-compare": "error",
Expand Down
29 changes: 22 additions & 7 deletions css/elements.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ body {
word-wrap: break-word;
font-size: 18px;
line-height: 1.5;
font-family: IBM Plex Serif, serif;
font-family:
IBM Plex Serif,
serif;
font-variant-numeric: slashed-zero;
padding: 0;
margin: 0;
Expand Down Expand Up @@ -153,7 +155,9 @@ span.e-user-code::before {
line-height: normal;
vertical-align: middle;
text-transform: uppercase;
font-family: IBM Plex Sans, sans-serif;
font-family:
IBM Plex Sans,
sans-serif;
font-weight: 900;
font-size: x-small;
}
Expand All @@ -176,7 +180,10 @@ span.e-user-code::before {

code {
font-weight: bold;
font-family: Comic Code, IBM Plex Mono, monospace;
font-family:
Comic Code,
IBM Plex Mono,
monospace;
white-space: pre;
}

Expand Down Expand Up @@ -241,7 +248,9 @@ var.referenced6 {
}

emu-const {
font-family: IBM Plex Sans, sans-serif;
font-family:
IBM Plex Sans,
sans-serif;
font-variant: small-caps;
text-transform: uppercase;
}
Expand Down Expand Up @@ -440,7 +449,9 @@ emu-rhs emu-nt {

emu-t {
display: inline-block;
font-family: IBM Plex Mono, monospace;
font-family:
IBM Plex Mono,
monospace;
font-weight: bold;
white-space: nowrap;
text-indent: 0;
Expand Down Expand Up @@ -475,7 +486,9 @@ emu-mods {
emu-params,
emu-opt {
margin-right: 1ex;
font-family: IBM Plex Mono, monospace;
font-family:
IBM Plex Mono,
monospace;
}

emu-params,
Expand All @@ -489,7 +502,9 @@ emu-opt {

emu-gprose {
font-size: 0.9em;
font-family: IBM Plex Sans, sans-serif;
font-family:
IBM Plex Sans,
sans-serif;
}

emu-production emu-gprose {
Expand Down
2 changes: 1 addition & 1 deletion filter-entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ let transformed = Object.fromEntries(
return [k, null];
}
return [k, v.characters];
})
}),
);
fs.writeFileSync('./entities-processed.json', JSON.stringify(transformed), 'utf8');
4 changes: 2 additions & 2 deletions js/listNumbers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// https://w3c.github.io/csswg-drafts/css-counter-styles/

const lowerLetters = Array.from({ length: 26 }, (_, i) =>
String.fromCharCode('a'.charCodeAt(0) + i)
String.fromCharCode('a'.charCodeAt(0) + i),
);
// Implement the lower-alpha 'alphabetic' algorithm,
// adjusting for indexing from 0 rather than 1.
Expand Down Expand Up @@ -80,7 +80,7 @@ const counterByDepth = [];
function addStepNumberText(
ol,
depth = 0,
special = [...ol.classList].some(c => c.startsWith('nested-'))
special = [...ol.classList].some(c => c.startsWith('nested-')),
) {
let counter = !special && counterByDepth[depth];
if (!counter) {
Expand Down
13 changes: 5 additions & 8 deletions js/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ function Search(menu) {

this.$searchBox.addEventListener(
'keydown',
debounce(this.searchBoxKeydown.bind(this), { stopPropagation: true })
debounce(this.searchBoxKeydown.bind(this), { stopPropagation: true }),
);
this.$searchBox.addEventListener(
'keyup',
debounce(this.searchBoxKeyup.bind(this), { stopPropagation: true })
debounce(this.searchBoxKeyup.bind(this), { stopPropagation: true }),
);

// Perform an initial search if the box is not empty.
Expand Down Expand Up @@ -215,7 +215,6 @@ Search.prototype.displayResults = function (results) {
}

if (text) {
// prettier-ignore
html += `<li class=menu-search-result-${cssClass}><a href="${makeLinkToId(id)}">${text}</a></li>`;
}
});
Expand Down Expand Up @@ -397,7 +396,7 @@ function findActiveClause(root, path) {
let marginTop = Math.max(
0,
parseInt(clauseStyles['margin-top']),
parseInt(getComputedStyle($header)['margin-top'])
parseInt(getComputedStyle($header)['margin-top']),
);
let marginBottom = Math.max(0, parseInt(clauseStyles['margin-bottom']));
let crossesMidpoint =
Expand Down Expand Up @@ -495,7 +494,6 @@ Menu.prototype.addPinEntry = function (id) {
} else {
prefix = '';
}
// prettier-ignore
text = `${prefix}${entry.titleHTML}`;
} else {
text = getKey(entry);
Expand Down Expand Up @@ -842,7 +840,6 @@ let referencePane = {
e.parentNode.replaceChild(document.createTextNode(e.textContent), e);
});

// prettier-ignore
this.$headerText.innerHTML = `Syntax-Directed Operations for<br><a href="${makeLinkToId(alternativeId)}" class="menu-pane-header-production"><emu-nt>${parentName}</emu-nt> ${colons.outerHTML} </a>`;
this.$headerText.querySelector('a').append(rhs);
this.showSDOsBody(sdos, alternativeId);
Expand Down Expand Up @@ -1115,7 +1112,7 @@ function init() {
'mouseover',
debounce(e => {
Toolbox.activateIfMouseOver(e);
})
}),
);
document.addEventListener(
'keydown',
Expand All @@ -1126,7 +1123,7 @@ function init() {
}
document.getElementById('shortcuts-help').classList.remove('active');
}
})
}),
);
}

Expand Down
2 changes: 1 addition & 1 deletion js/sdoMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ document.addEventListener('DOMContentLoaded', () => {
if (e.code === 'Escape') {
sdoBox.deactivate();
}
})
}),
);
});
Loading

0 comments on commit 8f855ab

Please sign in to comment.