From b3ff3bfa6e48b1d0bc183fa57ae67777c7b84cac Mon Sep 17 00:00:00 2001 From: seiya <20365512+seiyab@users.noreply.github.com> Date: Sun, 14 Apr 2024 11:58:18 +0900 Subject: [PATCH 1/4] add .editorconfig --- .editorconfig | 6 ++++++ tests/format/testdata/class.js | 2 +- tests/format/testdata/class.ts | 2 +- tests/format/testdata/issue-34-literal-keys.js | 2 +- tests/format/testdata/issue-34-literal-keys.ts | 2 +- tests/format/testdata/issue-40-function-member.ts | 2 +- tests/format/testdata/type-alias.ts | 2 +- 7 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7ae9c18 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,6 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true \ No newline at end of file diff --git a/tests/format/testdata/class.js b/tests/format/testdata/class.js index 9533c8c..35ab908 100644 --- a/tests/format/testdata/class.js +++ b/tests/format/testdata/class.js @@ -18,4 +18,4 @@ class MyClass2 { #e() {} @deco g; - } \ No newline at end of file + } diff --git a/tests/format/testdata/class.ts b/tests/format/testdata/class.ts index 26449d3..6be4d99 100644 --- a/tests/format/testdata/class.ts +++ b/tests/format/testdata/class.ts @@ -55,4 +55,4 @@ class Visibility { function deco(a: unknown, b: unknown): void { -} \ No newline at end of file +} diff --git a/tests/format/testdata/issue-34-literal-keys.js b/tests/format/testdata/issue-34-literal-keys.js index 27d3b62..2ad7e2f 100644 --- a/tests/format/testdata/issue-34-literal-keys.js +++ b/tests/format/testdata/issue-34-literal-keys.js @@ -5,4 +5,4 @@ class A { ["chocolate"]() {} "banana" = 1; ["apple"] = 1; -} \ No newline at end of file +} diff --git a/tests/format/testdata/issue-34-literal-keys.ts b/tests/format/testdata/issue-34-literal-keys.ts index b3598fd..5ef1392 100644 --- a/tests/format/testdata/issue-34-literal-keys.ts +++ b/tests/format/testdata/issue-34-literal-keys.ts @@ -38,4 +38,4 @@ interface A { ['three'](): void; four: unknown; five(): void; -} \ No newline at end of file +} diff --git a/tests/format/testdata/issue-40-function-member.ts b/tests/format/testdata/issue-40-function-member.ts index f796ece..1147a56 100644 --- a/tests/format/testdata/issue-40-function-member.ts +++ b/tests/format/testdata/issue-40-function-member.ts @@ -20,4 +20,4 @@ class Class { method(): void {} func = () => 0; value = 0; -} \ No newline at end of file +} diff --git a/tests/format/testdata/type-alias.ts b/tests/format/testdata/type-alias.ts index 974c2e7..39b1fc0 100644 --- a/tests/format/testdata/type-alias.ts +++ b/tests/format/testdata/type-alias.ts @@ -9,4 +9,4 @@ type A = { [t: string]: unknown; [`s`]: number; r?: number; -} \ No newline at end of file +} From 2e98ebed34aeae795b09fd0b0357d172b29463e3 Mon Sep 17 00:00:00 2001 From: seiya <20365512+seiyab@users.noreply.github.com> Date: Sun, 14 Apr 2024 15:01:10 +0900 Subject: [PATCH 2/4] fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4590799..5538019 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ --- -### 0.1.0 +### 0.1.1 #### Bug fix From 8f7de0e286c5436a1b8699dba7c7bcf65715b249 Mon Sep 17 00:00:00 2001 From: seiya <20365512+seiyab@users.noreply.github.com> Date: Sun, 14 Apr 2024 21:03:48 +0900 Subject: [PATCH 3/4] update README.md (adding "Contributing" section) --- README.md | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b72a088..d3da0e2 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,5 @@ # prettier-plugin-sort-members -## Project status - -prettier-plugin-sort-members is still in alpha version. -Feedback is welcome. - ## Usage ```bash @@ -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. From dad7f845006b63faf18909bcf93f99eecdbf9a3b Mon Sep 17 00:00:00 2001 From: seiya <20365512+seiyab@users.noreply.github.com> Date: Sun, 14 Apr 2024 21:04:58 +0900 Subject: [PATCH 4/4] add end of line into .editorconfig itself --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 7ae9c18..14c1d8c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,4 +3,4 @@ root = true [*] charset = utf-8 end_of_line = lf -insert_final_newline = true \ No newline at end of file +insert_final_newline = true