mirror of
https://github.com/ayangweb/BongoCat.git
synced 2026-03-12 17:51:48 +08:00
chore: add eslint rules for import group (#9)
This commit is contained in:
@@ -8,5 +8,16 @@ export default antfu({
|
||||
'style/brace-style': ['error', '1tbs'],
|
||||
'ts/no-use-before-define': 'off',
|
||||
'unused-imports/no-unused-imports': 'error',
|
||||
'import/order': [
|
||||
'error',
|
||||
{
|
||||
'newlines-between': 'always',
|
||||
'groups': ['type', 'builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
|
||||
'alphabetize': {
|
||||
order: 'asc',
|
||||
caseInsensitive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { readFileSync, writeFileSync } from 'node:fs'
|
||||
import { dirname, resolve } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
import { name, version } from '../package.json'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
@@ -3,6 +3,7 @@ import { listen } from '@tauri-apps/api/event'
|
||||
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow'
|
||||
import { onMounted } from 'vue'
|
||||
import { RouterView } from 'vue-router'
|
||||
|
||||
import { LISTEN_KEY } from './constants'
|
||||
import { hideWindow, showWindow } from './plugins/window'
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { TrayIconOptions } from '@tauri-apps/api/tray'
|
||||
|
||||
import { getName, getVersion } from '@tauri-apps/api/app'
|
||||
import { Menu, MenuItem, PredefinedMenuItem } from '@tauri-apps/api/menu'
|
||||
import { resolveResource } from '@tauri-apps/api/path'
|
||||
@@ -6,6 +7,7 @@ import { TrayIcon } from '@tauri-apps/api/tray'
|
||||
import { openUrl } from '@tauri-apps/plugin-opener'
|
||||
import { exit, relaunch } from '@tauri-apps/plugin-process'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
|
||||
import { hideWindow, showWindow } from '../plugins/window'
|
||||
import { isMac } from '../utils/platform'
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createApp } from 'vue'
|
||||
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import 'virtual:uno.css'
|
||||
|
||||
@@ -4,6 +4,7 @@ import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow'
|
||||
import { Live2DModel } from 'pixi-live2d-display'
|
||||
import { Ticker } from 'pixi.js'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
|
||||
import { useDevice } from '../composables/useDevice'
|
||||
import { useModel } from '../composables/useModel'
|
||||
import { getCursorMonitor } from '../utils/monitor'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { invoke } from '@tauri-apps/api/core'
|
||||
import { emit } from '@tauri-apps/api/event'
|
||||
|
||||
import { LISTEN_KEY } from '../constants'
|
||||
|
||||
type WindowLabel = 'main' | 'preference'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
|
||||
import Main from '../pages/main.vue'
|
||||
import Preference from '../pages/preference.vue'
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { readdirSync } from 'node:fs'
|
||||
import { parse, resolve } from 'node:path'
|
||||
import { env } from 'node:process'
|
||||
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import UnoCSS from 'unocss/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
|
||||
Reference in New Issue
Block a user