Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 10, 2024
1 parent c3ae289 commit 89fe4fb
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 10 deletions.
3 changes: 3 additions & 0 deletions app/components/ColorizedConfigName.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { computed, defineComponent, h } from 'vue'
import { getPluginColor } from '../composables/color'

export default defineComponent({
props: {
name: {
Expand Down
2 changes: 1 addition & 1 deletion app/components/ConfigItem.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup lang="ts">
import type { FiltersConfigsPage, FlatConfigItem } from '~~/shared/types'
import { useRouter } from '#app/composables/router'
import { getRuleLevel, getRuleOptions } from '~~/shared/rules'
import { computed, defineModel, ref, watchEffect } from 'vue'
import { getRuleLevel, getRuleOptions } from '~~/shared/rules'
import { filtersRules, isGridView } from '~/composables/state'
import { stringifyUnquoted } from '~/composables/strings'
Expand Down
2 changes: 1 addition & 1 deletion app/components/RuleItem.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup lang="ts">
import type { RuleConfigStates, RuleInfo, RuleLevel } from '~~/shared/types'
import { useClipboard } from '@vueuse/core'
import { getRuleLevel, getRuleOptions } from '~~/shared/rules'
import { vTooltip } from 'floating-vue'
import { getRuleLevel, getRuleOptions } from '~~/shared/rules'
import { deepCompareOptions } from '~/composables/options'
import { getRuleDefaultOptions } from '~/composables/payload'
Expand Down
2 changes: 1 addition & 1 deletion app/components/RuleList.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import type { RuleInfo } from '~~/shared/types'
import type { Linter } from 'eslint'
import type { RuleInfo } from '~~/shared/types'
import { computed, defineComponent, Fragment, h } from 'vue'
import { getRuleFromName, payload } from '~/composables/payload'
import { isGridView } from '../composables/state'
Expand Down
3 changes: 3 additions & 0 deletions app/components/Shiki.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { transformerNotationMap } from '@shikijs/transformers'
import { computed, defineComponent, h } from 'vue'
import { isDark } from '../composables/dark'
import { sanitizeHtml, shiki } from '../composables/shiki'

// @unocss-include
export default defineComponent({
Expand Down
2 changes: 2 additions & 0 deletions app/composables/dark.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { useDark } from '@vueuse/core'

export const isDark = useDark()

export function toggleDark() {
Expand Down
4 changes: 3 additions & 1 deletion app/composables/payload.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/* eslint-disable no-console */
import type { ErrorInfo, FilesGroup, FlatConfigItem, Payload, ResolvedPayload, RuleConfigStates, RuleInfo } from '~~/shared/types'
import { $fetch } from 'ofetch'
import { computed, ref } from 'vue'
import { isGeneralConfig, isIgnoreOnlyConfig } from '~~/shared/configs'
import { getRuleLevel, getRuleOptions } from '~~/shared/rules'
import { $fetch } from 'ofetch'
import { configsOpenState, fileGroupsOpenState } from './state'

const LOG_NAME = '[ESLint Config Inspector]'

Expand Down
2 changes: 2 additions & 0 deletions app/composables/shiki.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { HighlighterCore } from 'shiki/core'
import { createHighlighterCore } from 'shiki/core'
import { computed, shallowRef } from 'vue'
import { isDark } from './dark'

export const shiki = shallowRef<HighlighterCore>()

Expand Down
2 changes: 1 addition & 1 deletion app/composables/state.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FiltersConfigsPage } from '~~/shared/types'
import { breakpointsTailwind } from '@vueuse/core'
import { breakpointsTailwind, useBreakpoints, useLocalStorage } from '@vueuse/core'
import { computed, reactive, ref } from 'vue'

export const filtersConfigs = reactive<FiltersConfigsPage>({
Expand Down
6 changes: 3 additions & 3 deletions app/pages/configs.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script setup lang="ts">
import type { FlatConfigItem, MatchedFile } from '~~/shared/types'
import type { Linter } from 'eslint'
import type { FuseResultMatch } from 'fuse.js'
import type { PropType, VNode } from 'vue'
import type { FlatConfigItem, MatchedFile } from '~~/shared/types'
import { useRoute } from '#app/composables/router'
import { debouncedWatch } from '@vueuse/core'
import { isIgnoreOnlyConfig, matchFile } from '~~/shared/configs'
import { getRuleLevel } from '~~/shared/rules'
import Fuse from 'fuse.js'
import { computed, defineComponent, h, nextTick, onMounted, ref, shallowRef, watch, watchEffect } from 'vue'
import { isIgnoreOnlyConfig, matchFile } from '~~/shared/configs'
import { getRuleLevel } from '~~/shared/rules'
import { payload } from '~/composables/payload'
import { configsOpenState, filtersConfigs as filters, stateStorage } from '~/composables/state'
Expand Down
1 change: 1 addition & 0 deletions app/plugins/floating-vue.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { defineNuxtPlugin } from '#app/nuxt'
import FloatingVue from 'floating-vue'

export default defineNuxtPlugin((nuxtApp) => {
Expand Down
3 changes: 1 addition & 2 deletions src/ws.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Payload } from '~~/shared/types'

import type { WebSocket } from 'ws'
import type { Payload } from '~~/shared/types'
import type { ReadConfigOptions } from './configs'
import process from 'node:process'
import chokidar from 'chokidar'
Expand Down

0 comments on commit 89fe4fb

Please sign in to comment.