Skip to content

Commit

Permalink
refactor: consistent imports path
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Mar 31, 2024
1 parent e81adf2 commit 2408335
Show file tree
Hide file tree
Showing 9 changed files with 583 additions and 107 deletions.
4 changes: 2 additions & 2 deletions components/ConfigItem.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed, defineModel } from 'vue'
import { stringifyUnquoted } from '../composables/strings'
import { filtersRules, stateStorage } from '../composables/state'
import { stringifyUnquoted } from '~/composables/strings'
import { filtersRules, stateStorage } from '~/composables/state'
import { useRouter } from '#app/composables/router'
import type { FiltersConfigsPage, FlatESLintConfigItem } from '~/composables/types'
Expand Down
5 changes: 2 additions & 3 deletions components/NavBar.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<script setup lang="ts">
import { computed } from 'vue'
import { useTimeAgo } from '@vueuse/core'
import { stateStorage } from '../composables/state'
import { version } from '../package.json'
import { version } from '~/package.json'
import { filtersRules as filters, stateStorage } from '~/composables/state'
import { useRouter } from '#app/composables/router'
import { payload } from '~/composables/payload'
import { filtersRules as filters } from '~/composables/state'
const lastUpdate = useTimeAgo(() => payload.value.meta.lastUpdate)
Expand Down
5 changes: 2 additions & 3 deletions components/RuleItem.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<script setup lang="ts">
import { useClipboard } from '@vueuse/core'
import { getRuleLevel } from '../composables/rules'
import type { RuleConfigStates, RuleLevel } from '../composables/types'
import type { RuleInfo } from '~/composables/types'
import { getRuleLevel } from '~/composables/rules'
import type { RuleConfigStates, RuleInfo, RuleLevel } from '~/composables/types'
const props = defineProps<{
rule: RuleInfo
Expand Down
2 changes: 1 addition & 1 deletion components/RuleLevelIcon.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { computed } from 'vue'
import type { RuleLevel } from '../composables/types'
import type { RuleLevel } from '~/composables/types'
import { nth } from '~/composables/strings'
const props = defineProps<{
Expand Down
6 changes: 3 additions & 3 deletions components/RuleList.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup lang="ts">
import { Fragment, computed, defineComponent, h } from 'vue'
import type { Linter } from 'eslint'
import { getRuleFromName, payload } from '../composables/payload'
import { stateStorage } from '../composables/state'
import type { RuleInfo } from '../composables/types'
import { getRuleFromName, payload } from '~/composables/payload'
import { stateStorage } from '~/composables/state'
import type { RuleInfo } from '~/composables/types'
const props = defineProps<{
rules: RuleInfo[] | Record<string, Linter.RuleEntry>
Expand Down
7 changes: 3 additions & 4 deletions components/RuleStateItem.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<script setup lang="ts">
import { computed } from 'vue'
import { stringifyUnquoted } from '../composables/strings'
import { filtersConfigs } from '../composables/state'
import { payload } from '../composables/payload'
import { nth, stringifyUnquoted } from '~/composables/strings'
import { filtersConfigs } from '~/composables/state'
import { payload } from '~/composables/payload'
import { useRouter } from '#app/composables/router'
import { nth } from '~/composables/strings'
import type { RuleConfigState } from '~/composables/types'
const props = defineProps<{
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"nuxt-eslint-auto-explicit-import": "^0.0.2",
"nuxt-shiki": "^0.2.1",
"typescript": "^5.4.3",
"unbuild": "^2.0.0",
"vue-tsc": "^2.0.7"
},
"pnpm": {
Expand Down
5 changes: 2 additions & 3 deletions pages/configs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import { minimatch } from 'minimatch'
import type { Linter } from 'eslint'
import Fuse, { type FuseResultMatch } from 'fuse.js'
import type { PropType, VNode } from 'vue'
import { getRuleLevel } from '../composables/rules'
import { stateStorage } from '../composables/state'
import { filtersConfigs as filters } from '~/composables/state'
import { getRuleLevel } from '~/composables/rules'
import { filtersConfigs as filters, stateStorage } from '~/composables/state'
import { payload } from '~/composables/payload'
const opens = ref(payload.value.configs.map(() => true))
Expand Down

0 comments on commit 2408335

Please sign in to comment.