Restore ESLint and Prettier auto-formatting and CI linting (#1457)

* Restore ESLint and Prettier autoformatting

* Fix formatting and lints in web files

* Hacky fix to eslint crash

* Fix remaining lints

* Add lint-fix script

---------

Co-authored-by: 0hypercube <0hypercube@gmail.com>
This commit is contained in:
Keavon Chambers
2023-11-16 13:12:47 -08:00
committed by GitHub
co-authored by 0hypercube
parent 9784d31edb
commit a6ca43bb2d
63 changed files with 5869 additions and 351 deletions
+4 -4
View File
@@ -20,7 +20,7 @@ window.customElements.define("bezier-demo-pane", BezierDemoPane);
window.customElements.define("subpath-demo", SubpathDemo);
window.customElements.define("subpath-demo-pane", SubpathDemoPane);
function renderBezierPane(featureName: BezierFeatureKey, container: HTMLElement | null): void {
function renderBezierPane(featureName: BezierFeatureKey, container: HTMLElement | null) {
const feature = bezierFeatures[featureName];
const demo = document.createElement("bezier-demo-pane");
@@ -30,7 +30,7 @@ function renderBezierPane(featureName: BezierFeatureKey, container: HTMLElement
container?.append(demo);
}
function renderSubpathPane(featureName: SubpathFeatureKey, container: HTMLElement | null): void {
function renderSubpathPane(featureName: SubpathFeatureKey, container: HTMLElement | null) {
const feature = subpathFeatures[featureName];
const demo = document.createElement("subpath-demo-pane");
@@ -46,7 +46,7 @@ function isUrlSolo(url: string): boolean {
return splitHash?.length === 3 && splitHash?.[2] === "solo";
}
window.addEventListener("hashchange", (e: Event): void => {
window.addEventListener("hashchange", (e: Event) => {
const hashChangeEvent = e as HashChangeEvent;
const isOldHashSolo = isUrlSolo(hashChangeEvent.oldURL);
const isNewHashSolo = isUrlSolo(hashChangeEvent.newURL);
@@ -57,7 +57,7 @@ window.addEventListener("hashchange", (e: Event): void => {
}
});
function renderExamples(): void {
function renderExamples() {
const hash = window.location.hash;
const splitHash = hash.split("/");