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',
|
||||
|
Reference in New Issue
Block a user