Fix web code linting to be portable across environments

This commit is contained in:
Keavon Chambers
2021-04-14 11:44:09 -07:00
parent 57540ed5ef
commit 0ca4b9fe7c
23 changed files with 361 additions and 189 deletions
+11 -17
View File
@@ -83,14 +83,8 @@
<div class="spacer"></div>
<div class="working-colors">
<div class="swatch-pair">
<button
class="secondary swatch"
style="background: white;"
></button>
<button
class="primary swatch"
style="background: black;"
></button>
<button class="secondary swatch" style="background: white"></button>
<button class="primary swatch" style="background: black"></button>
</div>
<div class="swap-and-reset">
<IconButton :size="16">
@@ -103,12 +97,7 @@
</div>
</LayoutCol>
<LayoutCol :class="'viewport'">
<div
class="canvas"
@mousedown="canvasMouseDown"
@mouseup="canvasMouseUp"
@mousemove="canvasMouseMove"
>
<div class="canvas" @mousedown="canvasMouseDown" @mouseup="canvasMouseUp" @mousemove="canvasMouseMove">
<svg v-html="viewportSvg"></svg>
</div>
</LayoutCol>
@@ -195,7 +184,7 @@
<script lang="ts">
import { defineComponent } from "vue";
import { registerResponseHandler, ResponseType } from "../../response-handler";
import { ResponseType, registerResponseHandler } from "../../response-handler";
import LayoutRow from "../layout/LayoutRow.vue";
import LayoutCol from "../layout/LayoutCol.vue";
import ShelfItem from "../widgets/ShelfItem.vue";
@@ -328,13 +317,18 @@ export default defineComponent({
select_tool(toolName);
},
async viewModeChanged(toolIndex: number) {
function todo(_: number) { return _; }
function todo(_: number) {
return _;
}
todo(toolIndex);
},
},
mounted() {
registerResponseHandler(ResponseType.UpdateCanvas, (responseData) => {
this.viewportSvg = responseData.split("\n").map((shape, i) => shape.replace("#fff", `#${Math.floor(Math.abs(Math.sin(i + 1)) * 16777215).toString(16)}`)).join("\n");
this.viewportSvg = responseData
.split("\n")
.map((shape, i) => shape.replace("#fff", `#${Math.floor(Math.abs(Math.sin(i + 1)) * 16777215).toString(16)}`))
.join("\n");
});
registerResponseHandler(ResponseType.SetActiveTool, (responseData) => {
this.activeTool = responseData;
@@ -1,19 +1,14 @@
<template>
<div>
</div>
<div></div>
</template>
<style lang="scss">
</style>
<style lang="scss"></style>
<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
components: {
},
props: {
},
components: {},
props: {},
});
</script>
+4 -9
View File
@@ -1,19 +1,14 @@
<template>
<div>
</div>
<div></div>
</template>
<style lang="scss">
</style>
<style lang="scss"></style>
<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
components: {
},
props: {
},
components: {},
props: {},
});
</script>
@@ -1,19 +1,14 @@
<template>
<div>
</div>
<div></div>
</template>
<style lang="scss">
</style>
<style lang="scss"></style>
<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
components: {
},
props: {
},
components: {},
props: {},
});
</script>