Skip to content

Commit

Permalink
feat(eslint): perfectionist v4
Browse files Browse the repository at this point in the history
  • Loading branch information
ModyQyW committed Nov 20, 2024
1 parent 4eb82f1 commit 8867b14
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/eslint/configs/perfectionist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,21 @@ export function perfectionist(options: PerfectionistOptions = {}): Config[] {
// https://perfectionist.dev/rules/sort-array-includes
"perfectionist/sort-array-includes": "error",

// https://perfectionist.dev/rules/sort-astro-attributes
// Handled by eslint-plugin-astro.
"perfectionist/sort-astro-attributes": "off",

// https://perfectionist.dev/rules/sort-classes
"perfectionist/sort-classes": "error",

// https://perfectionist.dev/rules/sort-decorators
"perfectionist/sort-decorators": "error",

// https://perfectionist.dev/rules/sort-enums
"perfectionist/sort-enums": "error",

// https://perfectionist.dev/rules/sort-exports
"perfectionist/sort-exports": "error",

// https://perfectionist.dev/rules/sort-heritage-clauses
"perfectionist/sort-heritage-clauses": "error",

// https://perfectionist.dev/rules/sort-imports
"import/order": "off",
"perfectionist/sort-imports": [
Expand Down Expand Up @@ -77,7 +79,7 @@ export function perfectionist(options: PerfectionistOptions = {}): Config[] {

// https://perfectionist.dev/rules/sort-intersection-types
// deprecated
// '@typescript-eslint/sort-type-constituents': 'off',
// "@typescript-eslint/sort-type-constituents": "off",
"perfectionist/sort-intersection-types": [
"error",
{
Expand Down Expand Up @@ -114,6 +116,9 @@ export function perfectionist(options: PerfectionistOptions = {}): Config[] {
// https://perfectionist.dev/rules/sort-maps
"perfectionist/sort-maps": "error",

// https://perfectionist.dev/rules/sort-modules
"perfectionist/sort-modules": "error",

// https://perfectionist.dev/rules/sort-named-exports
"perfectionist/sort-named-exports": "error",

Expand All @@ -131,10 +136,6 @@ export function perfectionist(options: PerfectionistOptions = {}): Config[] {
// https://perfectionist.dev/rules/sort-sets
"perfectionist/sort-sets": "error",

// https://perfectionist.dev/rules/sort-svelte-attributes
// Handled by eslint-plugin-svelte.
"perfectionist/sort-svelte-attributes": "off",

// https://perfectionist.dev/rules/sort-switch-case
"perfectionist/sort-switch-case": "error",

Expand Down Expand Up @@ -165,10 +166,6 @@ export function perfectionist(options: PerfectionistOptions = {}): Config[] {
// https://perfectionist.dev/rules/sort-variable-declarations
"perfectionist/sort-variable-declarations": "error",

// https://perfectionist.dev/rules/sort-vue-attributes
// Handled by eslint-plugin-vue.
"perfectionist/sort-vue-attributes": "off",

...rules,
},
settings: {
Expand All @@ -177,6 +174,8 @@ export function perfectionist(options: PerfectionistOptions = {}): Config[] {
order: "asc",
ignoreCase: true,
ignorePattern: [],
specialCharacters: "keep",
locales: "en-US",
partitionByComment: true,
partitionByNewLine: true,
},
Expand Down

0 comments on commit 8867b14

Please sign in to comment.