Skip to content

Commit

Permalink
feat(perfectionist): update some rules
Browse files Browse the repository at this point in the history
  • Loading branch information
coderwyd committed Sep 6, 2024
1 parent 51a1460 commit ba47329
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/configs/disables.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GLOB_DTS, GLOB_SRC, GLOB_SRC_EXT } from '../constants/glob'
import type { TypedFlatConfigItem } from '../types'

export async function disables(): Promise<TypedFlatConfigItem[]> {
export function disables(): TypedFlatConfigItem[] {
return [
{
files: [`scripts/${GLOB_SRC}`],
Expand Down
22 changes: 11 additions & 11 deletions src/configs/perfectionist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,36 @@ export function perfectionist(): TypedFlatConfigItem[] {
perfectionist: pluginPerfectionist,
},
rules: {
'perfectionist/sort-exports': ['error', { order: 'asc', type: 'natural' }],
'perfectionist/sort-imports': [
'warn',
{
groups: [
'builtin',
'external',
'internal',
'internal-type',
'parent',
'parent-type',
'sibling',
'sibling-type',
'index',
'index-type',
'object',
'type',
['internal', 'internal-type'],
['parent', 'sibling', 'index'],
['parent-type', 'sibling-type', 'index-type'],
'object',
'side-effect',
'side-effect-style',
'style',
'unknown',
],
internalPattern: ['~/**', '@/**', '#**'],
newlinesBetween: 'ignore',
order: 'asc',
type: 'natural',
},
],
'perfectionist/sort-named-exports': [
'warn',
{ groupKind: 'values-first' },
{ groupKind: 'values-first', order: 'asc', type: 'natural' },
],
'perfectionist/sort-named-imports': [
'warn',
{ groupKind: 'values-first' },
{ groupKind: 'values-first', order: 'asc', type: 'natural' },
],
},
},
Expand Down

0 comments on commit ba47329

Please sign in to comment.