refactor(project): re-adjust the overall folder
This commit is contained in:
@@ -32,22 +32,22 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.7.0",
|
||||
"@types/eslint": "^8.56.10",
|
||||
"@typescript-eslint/eslint-plugin": "^7.16.1",
|
||||
"@typescript-eslint/parser": "^7.16.1",
|
||||
"@types/eslint": "^9.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
||||
"@typescript-eslint/parser": "^7.17.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-i": "^2.29.1",
|
||||
"eslint-plugin-jsdoc": "^48.8.1",
|
||||
"eslint-plugin-jsdoc": "^48.8.3",
|
||||
"eslint-plugin-jsonc": "^2.16.0",
|
||||
"eslint-plugin-n": "^17.9.0",
|
||||
"eslint-plugin-no-only-tests": "^3.1.0",
|
||||
"eslint-plugin-perfectionist": "^2.11.0",
|
||||
"eslint-plugin-perfectionist": "^3.0.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"eslint-plugin-regexp": "^2.6.0",
|
||||
"eslint-plugin-unicorn": "^54.0.0",
|
||||
"eslint-plugin-unused-imports": "^4.0.0",
|
||||
"eslint-plugin-unused-imports": "^4.0.1",
|
||||
"eslint-plugin-vitest": "^0.5.4",
|
||||
"eslint-plugin-vue": "^9.27.0",
|
||||
"globals": "^15.8.0",
|
||||
|
@@ -1,13 +1,10 @@
|
||||
import type { Linter } from 'eslint';
|
||||
|
||||
export async function perfectionist(): Promise<Linter.FlatConfig[]> {
|
||||
const [perfectionistNatural] = await Promise.all([
|
||||
// @ts-expect-error - no types
|
||||
import('eslint-plugin-perfectionist/configs/recommended-natural'),
|
||||
] as const);
|
||||
import perfectionistPlugin from 'eslint-plugin-perfectionist';
|
||||
|
||||
export async function perfectionist(): Promise<Linter.FlatConfig[]> {
|
||||
return [
|
||||
perfectionistNatural,
|
||||
perfectionistPlugin.configs['recommended-natural'],
|
||||
{
|
||||
rules: {
|
||||
'perfectionist/sort-exports': [
|
||||
@@ -20,7 +17,7 @@ export async function perfectionist(): Promise<Linter.FlatConfig[]> {
|
||||
'perfectionist/sort-imports': [
|
||||
'error',
|
||||
{
|
||||
'custom-groups': {
|
||||
customGroups: {
|
||||
type: {
|
||||
vben: 'vben',
|
||||
vue: 'vue',
|
||||
@@ -46,8 +43,8 @@ export async function perfectionist(): Promise<Linter.FlatConfig[]> {
|
||||
'object',
|
||||
'unknown',
|
||||
],
|
||||
'internal-pattern': ['#*', '#*/**'],
|
||||
'newlines-between': 'always',
|
||||
internalPattern: ['#*', '#*/**'],
|
||||
newlinesBetween: 'always',
|
||||
order: 'asc',
|
||||
type: 'natural',
|
||||
},
|
||||
@@ -62,15 +59,15 @@ export async function perfectionist(): Promise<Linter.FlatConfig[]> {
|
||||
'perfectionist/sort-objects': [
|
||||
'error',
|
||||
{
|
||||
'custom-groups': {
|
||||
customGroups: {
|
||||
items: 'items',
|
||||
list: 'list',
|
||||
children: 'children',
|
||||
},
|
||||
groups: ['unknown', 'items', 'list', 'children'],
|
||||
'ignore-pattern': ['children'],
|
||||
ignorePattern: ['children'],
|
||||
order: 'asc',
|
||||
'partition-by-comment': 'Part:**',
|
||||
partitionByComment: 'Part:**',
|
||||
type: 'natural',
|
||||
},
|
||||
],
|
||||
@@ -78,7 +75,7 @@ export async function perfectionist(): Promise<Linter.FlatConfig[]> {
|
||||
'error',
|
||||
{
|
||||
// Based on: https://vuejs.org/style-guide/rules-recommended.html#element-attribute-order
|
||||
'custom-groups': {
|
||||
customGroups: {
|
||||
/* eslint-disable perfectionist/sort-objects */
|
||||
DEFINITION: '*(is|:is|v-is)',
|
||||
LIST_RENDERING: 'v-for',
|
||||
|
@@ -12,7 +12,6 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "pnpm unbuild",
|
||||
"stub": "pnpm unbuild --stub"
|
||||
},
|
||||
"files": [
|
||||
@@ -47,7 +46,7 @@
|
||||
"tailwindcss": "^3.4.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@iconify/json": "^2.2.229",
|
||||
"@iconify/json": "^2.2.230",
|
||||
"@iconify/tailwind": "^1.1.1",
|
||||
"@tailwindcss/nesting": "0.0.0-insiders.565cd3e",
|
||||
"@tailwindcss/typography": "^0.5.13",
|
||||
|
@@ -30,8 +30,8 @@ const shadcnUiColors = {
|
||||
hover: 'hsl(var(--accent-hover))',
|
||||
},
|
||||
background: {
|
||||
DEFAULT: 'hsl(var(--background))',
|
||||
deep: 'hsl(var(--background-deep))',
|
||||
DEFAULT: 'hsl(var(--background))',
|
||||
},
|
||||
border: {
|
||||
DEFAULT: 'hsl(var(--border))',
|
||||
@@ -50,8 +50,8 @@ const shadcnUiColors = {
|
||||
},
|
||||
|
||||
input: {
|
||||
DEFAULT: 'hsl(var(--input))',
|
||||
background: 'hsl(var(--input-background))',
|
||||
DEFAULT: 'hsl(var(--input))',
|
||||
},
|
||||
muted: {
|
||||
DEFAULT: 'hsl(var(--muted))',
|
||||
@@ -95,8 +95,8 @@ const customColors = {
|
||||
foreground: 'hsl(var(--destructive-foreground))',
|
||||
},
|
||||
sidebar: {
|
||||
DEFAULT: 'hsl(var(--sidebar))',
|
||||
deep: 'hsl(var(--sidebar-deep))',
|
||||
DEFAULT: 'hsl(var(--sidebar))',
|
||||
},
|
||||
success: {
|
||||
...createColorsPalette('success'),
|
||||
|
@@ -70,7 +70,7 @@ interface CommonPluginOptions {
|
||||
/** 构建模式 */
|
||||
mode?: string;
|
||||
/** 开启依赖分析 */
|
||||
visualizer?: PluginVisualizerOptions | boolean;
|
||||
visualizer?: boolean | PluginVisualizerOptions;
|
||||
}
|
||||
|
||||
interface ApplicationPluginOptions extends CommonPluginOptions {
|
||||
@@ -110,7 +110,7 @@ interface ApplicationPluginOptions extends CommonPluginOptions {
|
||||
|
||||
interface LibraryPluginOptions extends CommonPluginOptions {
|
||||
/** 开启 dts 输出 */
|
||||
dts?: PluginOptions | boolean;
|
||||
dts?: boolean | PluginOptions;
|
||||
|
||||
/** 是否注入lib css */
|
||||
injectLibCss?: boolean;
|
||||
|
Reference in New Issue
Block a user