Skip to content

Commit

Permalink
chore: fix lint problems (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
zheeeng authored Feb 10, 2022
1 parent c983891 commit 304dbf2
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"dev": "vite src/client",
"dev:client": "vite build src/client --watch",
"dev:js": "nr build:js --watch src",
"lint": "eslint \"{src,test}/**/*.ts\"",
"lint": "eslint \"{src,test}/**/*.{vue,ts}\"",
"lint:fix": "npm run lint -- --fix",
"prepublishOnly": "npm run build",
"release": "bumpp --commit --push --tag && npm publish"
Expand Down
2 changes: 1 addition & 1 deletion src/client/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<main class="text-gray-700 dark:text-gray-200 w-screen h-screen grid grid-rows-[min-content,1fr]">
<router-view/>
<router-view />
</main>
</template>
4 changes: 2 additions & 2 deletions src/client/components/DiffEditor.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, onMounted, toRefs, watchEffect, nextTick } from 'vue'
import { nextTick, onMounted, ref, toRefs, watchEffect } from 'vue'
import { diff_match_patch as Diff } from 'diff-match-patch'
import { useCodeMirror } from '../logic/codemirror'
import { guessMode } from '../logic/utils'
Expand Down Expand Up @@ -98,7 +98,7 @@ onMounted(() => {
<template>
<div class="grid grid-cols-[1fr,min-content,1fr] h-full overflow-auto">
<textarea ref="fromEl" v-text="from" />
<div class="border-main border-r"></div>
<div class="border-main border-r" />
<textarea ref="toEl" v-text="to" />
</div>
</template>
Expand Down
5 changes: 3 additions & 2 deletions src/client/components/Graph.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { Network, Data, Options } from 'vis-network'
import type { Data, Options } from 'vis-network'
import { Network } from 'vis-network'
import type { ModuleInfo } from '../../types'
import { isDark } from '../logic'
Expand Down Expand Up @@ -81,6 +82,6 @@ onMounted(() => {

<template>
<div v-if="modules">
<div ref="container" class="w-full h-100vh"></div>
<div ref="container" class="w-full h-100vh" />
</div>
</template>
2 changes: 1 addition & 1 deletion src/client/components/ModuleId.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { computed } from 'vue'
import { root, list } from '../logic'
import { list, root } from '../logic'
const props = defineProps<{ id?: string }>()
Expand Down
6 changes: 3 additions & 3 deletions src/client/components/NavBar.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { isDark, toggleDark, enableDiff, lineWrapping, refetch, toggleMode, listMode } from '../logic'
import { enableDiff, isDark, lineWrapping, listMode, refetch, toggleDark, toggleMode } from '../logic'
defineProps<{
id?: string
Expand All @@ -13,7 +13,7 @@ defineProps<{
<carbon-arrow-left />
</router-link>
<ModuleId v-if="id" :id="id" />
<div class="flex-auto"></div>
<div class="flex-auto" />
<button class="icon-btn text-lg" title="Line Wrapping" @click="lineWrapping = !lineWrapping">
<carbon:text-wrap :class="lineWrapping ? 'opacity-100' : 'opacity-25'" />
</button>
Expand All @@ -24,7 +24,7 @@ defineProps<{
<template v-else>
<span class="text-md">Vite Inspect</span>
<SearchBox />
<div class="flex-auto"></div>
<div class="flex-auto" />
<button class="icon-btn text-lg" title="View Mode" @click="toggleMode()">
<carbon:list-boxes v-if="listMode === 'detailed'" />
<carbon:list v-else-if="listMode === 'list'" />
Expand Down
8 changes: 4 additions & 4 deletions src/client/components/SearchBox.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { searchText, includeNodeModules, includeVirtual } from '../logic'
import { includeNodeModules, includeVirtual, searchText } from '../logic'
</script>

<template>
Expand All @@ -8,14 +8,14 @@ import { searchText, includeNodeModules, includeVirtual } from '../logic'
type="text"
class="border border-main px-3 py-1 rounded bg-transparent !outline-none"
placeholder="Search..."
/>
>
<div class="text-xs flex flex-col h-min">
<label class="flex">
<input v-model="includeNodeModules" type="checkbox" class="my-auto" />
<input v-model="includeNodeModules" type="checkbox" class="my-auto">
<div class="ml-1">node_modules</div>
</label>
<label class="flex">
<input v-model="includeVirtual" type="checkbox" class="my-auto" />
<input v-model="includeVirtual" type="checkbox" class="my-auto">
<div class="ml-1">virtual</div>
</label>
</div>
Expand Down

0 comments on commit 304dbf2

Please sign in to comment.