Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor tweaks #42

Merged
merged 4 commits into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

---

### 0.1.0
### 0.1.1

#### Bug fix

Expand Down
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# prettier-plugin-sort-members

## Project status

prettier-plugin-sort-members is still in alpha version.
Feedback is welcome.

## Usage

```bash
Expand Down Expand Up @@ -81,3 +76,23 @@ The order respects default order of [`@typescript-eslint/member-ordering`](https

A boolean value to enable alphabetical ordering.
Other criteria such as visibility still precedes even if set `true`.

## Contributing

## Reporting issues

You can submit an issue to report a bug, propose a feature or anything else. Feedback is welcome.
To report a security vulnerability, please use our [create an advisory form](https://github.com/seiyab/prettier-plugin-sort-members/security/advisories/new) on GitHub.

## Developing

prettier-plugin-sort-members is developed with [Bun](https://bun.sh/). Install Bun if you don't have it yet.

To get up and running, install dependencies and run tests:

```sh
bun install
bun test
```

Don't forget to add tests for your changes before you submit a PR.
2 changes: 1 addition & 1 deletion tests/format/testdata/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ class MyClass2 {
#e() {}
@deco
g;
}
}
2 changes: 1 addition & 1 deletion tests/format/testdata/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ class Visibility {


function deco(a: unknown, b: unknown): void {
}
}
2 changes: 1 addition & 1 deletion tests/format/testdata/issue-34-literal-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ class A {
["chocolate"]() {}
"banana" = 1;
["apple"] = 1;
}
}
2 changes: 1 addition & 1 deletion tests/format/testdata/issue-34-literal-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ interface A {
['three'](): void;
four: unknown;
five(): void;
}
}
2 changes: 1 addition & 1 deletion tests/format/testdata/issue-40-function-member.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ class Class {
method(): void {}
func = () => 0;
value = 0;
}
}
2 changes: 1 addition & 1 deletion tests/format/testdata/type-alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ type A = {
[t: string]: unknown;
[`s`]: number;
r?: number;
}
}
Loading