Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyab committed Nov 18, 2023
1 parent 440b6e0 commit 09bc7fa
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,27 @@ Edit your prettierrc.
"plugins": ["prettier-plugin-sort-members"]
}
```

## Overview

This plugin sorts members of your classes, interfaces, and type aliases.

```ts
// Before
class MyClass {
c: string;
a(): void {}
b: number;
constructor() {}
}

// After
class MyClass {
b: number;
c: string;
constructor() {}
a(): void {}
}
```

The order respects default order of [`@typescript-eslint/member-ordering`](https://typescript-eslint.io/rules/member-ordering/#default-configuration)

0 comments on commit 09bc7fa

Please sign in to comment.