Skip to content

Commit

Permalink
fix/issue 88 sort object rule (#104)
Browse files Browse the repository at this point in the history
* chore: sort np, script

* fix: object sort ruke

* chore: changeset
  • Loading branch information
sushichan044 authored May 18, 2024
1 parent d8fb332 commit 95fed8f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/spicy-cooks-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@virtual-live-lab/eslint-config": patch
---

Ignore sort object rule with new line
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"changeset": "changeset",
"format": "prettier --write .",
"lint": "eslint .",
"build": "pnpm run /^build:.*/",
"build:eslint": "pnpm --filter @virtual-live-lab/eslint-config build",
"build:prettier": "pnpm --filter @virtual-live-lab/prettier-config build",
"build:stylelint": "pnpm --filter @virtual-live-lab/stylelint-config build",
"build": "pnpm run /^build:.*/",
"release": "pnpm run build && changeset publish"
},
"packageManager": "[email protected]",
Expand Down
16 changes: 16 additions & 0 deletions packages/eslint-config/src/base/stylistic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ const stylisticConfig: Linter.FlatConfig[] = [
perfectionistNatural,
{
rules: {
"perfectionist/sort-object-types": [
"error",
{
"order": "asc",
"partition-by-new-line": true,
"type": "natural",
},
],
"perfectionist/sort-objects": [
"error",
{
"order": "asc",
"partition-by-new-line": true,
"type": "natural",
},
],
"perfectionist/sort-union-types": [
"error",
{
Expand Down

0 comments on commit 95fed8f

Please sign in to comment.