Skip to content

Commit ce77ef6

Browse files
feat: use eslint-plugin-perfection's partition-by-comment (#550)
## PR Checklist - [x] Addresses an existing open issue: fixes #549 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Uses the option directly, so we can remove the disable comments in the config. Yay!
1 parent dcf26cd commit ce77ef6

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.eslintrc.cjs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ module.exports = {
2222
"plugin:regexp/recommended",
2323
"prettier",
2424
],
25-
/* eslint-disable perfectionist/sort-objects -- https://github.com/azat-io/eslint-plugin-perfectionist/issues/22 */
2625
overrides: [
2726
{
2827
extends: ["plugin:markdown/recommended"],
@@ -141,11 +140,17 @@ module.exports = {
141140
"no-inner-declarations": "off",
142141

143142
// Stylistic concerns that don't interfere with Prettier
144-
"padding-line-between-statements": "off",
145143
"@typescript-eslint/padding-line-between-statements": [
146144
"error",
147145
{ blankLine: "always", next: "*", prev: "block-like" },
148146
],
147+
"perfectionist/sort-objects": [
148+
"error",
149+
{
150+
order: "asc",
151+
"partition-by-comment": true,
152+
type: "natural",
153+
},
154+
],
149155
},
150-
/* eslint-enable perfectionist/sort-objects */
151156
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"eslint-plugin-markdown": "^3.0.0",
7070
"eslint-plugin-n": "^16.0.0",
7171
"eslint-plugin-no-only-tests": "^3.1.0",
72-
"eslint-plugin-perfectionist": "^1.1.2",
72+
"eslint-plugin-perfectionist": "^1.4.0",
7373
"eslint-plugin-regexp": "^1.15.0",
7474
"eslint-plugin-vitest": "^0.2.2",
7575
"eslint-plugin-yml": "^1.7.0",

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)