mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-07 08:48:11 +08:00
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:
co-authored by
0hypercube
parent
9784d31edb
commit
a6ca43bb2d
@@ -1,6 +1,6 @@
|
||||
import { Demo, DemoPane, InputOption } from "@/utils/types";
|
||||
|
||||
export function renderDemo(demo: Demo): void {
|
||||
export function renderDemo(demo: Demo) {
|
||||
const header = document.createElement("h4");
|
||||
header.className = "demo-header";
|
||||
header.innerText = demo.title;
|
||||
@@ -47,7 +47,7 @@ export function renderDemo(demo: Demo): void {
|
||||
selectInput.disabled = true;
|
||||
}
|
||||
|
||||
selectInput.addEventListener("change", (event: Event): void => {
|
||||
selectInput.addEventListener("change", (event: Event) => {
|
||||
demo.sliderData[inputOption.variable] = Number((event.target as HTMLInputElement).value);
|
||||
demo.drawDemo(figure);
|
||||
});
|
||||
@@ -65,7 +65,7 @@ export function renderDemo(demo: Demo): void {
|
||||
const ratio = (Number(inputOption.default) - Number(inputOption.min)) / range;
|
||||
sliderInput.style.setProperty("--range-ratio", String(ratio));
|
||||
|
||||
sliderInput.addEventListener("input", (event: Event): void => {
|
||||
sliderInput.addEventListener("input", (event: Event) => {
|
||||
const target = event.target as HTMLInputElement;
|
||||
demo.sliderData[inputOption.variable] = Number(target.value);
|
||||
const data = demo.sliderData[inputOption.variable];
|
||||
@@ -86,7 +86,7 @@ export function renderDemo(demo: Demo): void {
|
||||
demo.append(parentSliderContainer);
|
||||
}
|
||||
|
||||
export function renderDemoPane(demoPane: DemoPane): void {
|
||||
export function renderDemoPane(demoPane: DemoPane) {
|
||||
const container = document.createElement("div");
|
||||
container.className = "demo-pane-container";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user