chore: format code
This commit is contained in:
@@ -41,9 +41,9 @@
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-i": "^2.29.1",
|
||||
"eslint-plugin-jsdoc": "^48.2.7",
|
||||
"eslint-plugin-jsdoc": "^48.2.8",
|
||||
"eslint-plugin-jsonc": "^2.16.0",
|
||||
"eslint-plugin-n": "^17.7.0",
|
||||
"eslint-plugin-n": "^17.8.0",
|
||||
"eslint-plugin-no-only-tests": "^3.1.0",
|
||||
"eslint-plugin-perfectionist": "^2.10.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
|
@@ -22,31 +22,38 @@ export async function perfectionist(): Promise<Linter.FlatConfig[]> {
|
||||
{
|
||||
'custom-groups': {
|
||||
type: {
|
||||
vben: 'vue',
|
||||
vue: ['vue', 'vue-*', '@vue*'],
|
||||
vben: 'vben',
|
||||
vue: 'vue',
|
||||
},
|
||||
value: {
|
||||
vben: 'vben',
|
||||
vue: ['@vben-*', '@vben-core/*'],
|
||||
vben: ['@vben*', '@vben/*', '@vben-core/*'],
|
||||
vue: ['vue', 'vue-*', '@vue*'],
|
||||
},
|
||||
},
|
||||
groups: [
|
||||
'side-effect',
|
||||
'type',
|
||||
'vue',
|
||||
['external-type', 'builtin-type', 'type'],
|
||||
['parent-type', 'sibling-type', 'index-type'],
|
||||
['internal-type'],
|
||||
'builtin',
|
||||
'vue',
|
||||
'vben',
|
||||
'external',
|
||||
'internal-type',
|
||||
'internal',
|
||||
['parent', 'sibling', 'index'],
|
||||
'side-effect',
|
||||
'side-effect-style',
|
||||
'style',
|
||||
'object',
|
||||
'unknown',
|
||||
'type',
|
||||
['parent-type', 'sibling-type', 'index-type'],
|
||||
],
|
||||
'internal-pattern': ['@/layouts/**', '@/router/**', '@/views/**'],
|
||||
'internal-pattern': [
|
||||
'@/layouts/**',
|
||||
'@/apis/**',
|
||||
'@/forward/**',
|
||||
'@/router/**',
|
||||
'@/views/**',
|
||||
'#/**',
|
||||
],
|
||||
'newlines-between': 'always',
|
||||
order: 'asc',
|
||||
type: 'natural',
|
||||
|
@@ -54,12 +54,12 @@
|
||||
"@tailwindcss/nesting": "0.0.0-insiders.565cd3e",
|
||||
"@tailwindcss/typography": "^0.5.13",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"cssnano": "^7.0.1",
|
||||
"cssnano": "^7.0.2",
|
||||
"postcss": "^8.4.38",
|
||||
"postcss-antd-fixes": "^0.2.0",
|
||||
"postcss-import": "^16.1.0",
|
||||
"postcss-preset-env": "^9.5.14",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"tailwindcss": "^3.4.4",
|
||||
"tailwindcss-animate": "^1.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@@ -2,10 +2,11 @@ import type { Config } from 'tailwindcss';
|
||||
|
||||
import path from 'node:path';
|
||||
|
||||
import { fs, getPackagesSync } from '@vben/node-utils';
|
||||
|
||||
import { addDynamicIconSelectors } from '@iconify/tailwind';
|
||||
import formsPlugin from '@tailwindcss/forms';
|
||||
import typographyPlugin from '@tailwindcss/typography';
|
||||
import { fs, getPackagesSync } from '@vben/node-utils';
|
||||
import animate from 'tailwindcss-animate';
|
||||
|
||||
import { enterAnimationPlugin } from './plugins/entry';
|
||||
|
@@ -1,5 +1,7 @@
|
||||
import type { UserConfig } from 'vite';
|
||||
|
||||
import type { DefineApplicationOptions } from '../typing';
|
||||
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
import { defineConfig, loadEnv, mergeConfig } from 'vite';
|
||||
@@ -7,8 +9,6 @@ import { defineConfig, loadEnv, mergeConfig } from 'vite';
|
||||
import { getApplicationConditionPlugins } from '../plugins';
|
||||
import { getCommonConfig } from './common';
|
||||
|
||||
import type { DefineApplicationOptions } from '../typing';
|
||||
|
||||
function defineApplicationConfig(options: DefineApplicationOptions = {}) {
|
||||
return defineConfig(async ({ command, mode }) => {
|
||||
const { application = {}, vite = {} } = options;
|
||||
|
@@ -1,11 +1,11 @@
|
||||
import type { DefineConfig } from '../typing';
|
||||
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
|
||||
import { defineApplicationConfig } from './application';
|
||||
import { defineLibraryConfig } from './library';
|
||||
|
||||
import type { DefineConfig } from '../typing';
|
||||
|
||||
export * from './application';
|
||||
export * from './library';
|
||||
|
||||
|
@@ -1,13 +1,14 @@
|
||||
import type { UserConfig } from 'vite';
|
||||
|
||||
import type { DefineLibraryOptions } from '../typing';
|
||||
|
||||
import { readPackageJSON } from '@vben/node-utils';
|
||||
|
||||
import { defineConfig, mergeConfig } from 'vite';
|
||||
|
||||
import { getLibraryConditionPlugins } from '../plugins';
|
||||
import { getCommonConfig } from './common';
|
||||
|
||||
import type { DefineLibraryOptions } from '../typing';
|
||||
|
||||
function defineLibraryConfig(options: DefineLibraryOptions = {}) {
|
||||
return defineConfig(async ({ command, mode }) => {
|
||||
const root = process.cwd();
|
||||
|
@@ -3,6 +3,7 @@ import {
|
||||
generatorContentHash,
|
||||
readPackageJSON,
|
||||
} from '@vben/node-utils';
|
||||
|
||||
import { type PluginOption } from 'vite';
|
||||
|
||||
import { getEnvConfig } from '../utils/env';
|
||||
|
@@ -1,9 +1,17 @@
|
||||
import type { PluginOption } from 'vite';
|
||||
|
||||
import type {
|
||||
ApplicationPluginOptions,
|
||||
CommonPluginOptions,
|
||||
ConditionPlugin,
|
||||
LibraryPluginOptions,
|
||||
} from '../typing';
|
||||
|
||||
import { join } from 'node:path';
|
||||
|
||||
import viteVueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
||||
import { getPackage } from '@vben/node-utils';
|
||||
|
||||
import viteVueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
||||
import viteVue from '@vitejs/plugin-vue';
|
||||
import viteVueJsx from '@vitejs/plugin-vue-jsx';
|
||||
import { visualizer as viteVisualizerPlugin } from 'rollup-plugin-visualizer';
|
||||
@@ -19,13 +27,6 @@ import { viteExtraAppConfigPlugin } from './extra-app-config';
|
||||
import { viteImportMapPlugin } from './importmap';
|
||||
import { viteInjectAppLoadingPlugin } from './inject-app-loading';
|
||||
|
||||
import type {
|
||||
ApplicationPluginOptions,
|
||||
CommonPluginOptions,
|
||||
ConditionPlugin,
|
||||
LibraryPluginOptions,
|
||||
} from '../typing';
|
||||
|
||||
/**
|
||||
* 获取条件成立的 vite 插件
|
||||
* @param conditionPlugins
|
||||
|
@@ -2,6 +2,7 @@ import { join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import { fs } from '@vben/node-utils';
|
||||
|
||||
import { type PluginOption } from 'vite';
|
||||
|
||||
/**
|
||||
|
@@ -29,7 +29,7 @@
|
||||
.loading.hidden {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: all 1s ease-out;
|
||||
transition: all 0.6s ease-out;
|
||||
}
|
||||
|
||||
.loading .dots {
|
||||
|
@@ -23,7 +23,7 @@
|
||||
.loading.hidden {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: all 1s ease-out;
|
||||
transition: all 0.6s ease-out;
|
||||
}
|
||||
|
||||
.dark .loading {
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import { join } from 'node:path';
|
||||
|
||||
import { fs } from '@vben/node-utils';
|
||||
|
||||
import dotenv from 'dotenv';
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user