Skip to content

Commit a6feabd

Browse files
feat: use eslint-plugin-perfectionist (#527)
## PR Checklist - [x] Addresses an existing open issue: fixes #396 - [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 I am a perfectionist. It's a match made in heaven! Swaps from the much more targeted `eslint-plugin-simple-import-sort` and `eslint-plugin-typescript-sort-keys` to `eslint-plugin-perfectionist`.
1 parent bfa87d9 commit a6feabd

28 files changed

+120
-180
lines changed

.eslintrc.cjs

+2-5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module.exports = {
1717
extends: [
1818
"eslint:recommended",
1919
"plugin:eslint-comments/recommended",
20+
"plugin:perfectionist/recommended-natural",
2021
"plugin:regexp/recommended",
2122
"prettier",
2223
],
@@ -30,7 +31,6 @@ module.exports = {
3031
extends: [
3132
"plugin:jsdoc/recommended-typescript-error",
3233
"plugin:@typescript-eslint/recommended",
33-
"plugin:typescript-sort-keys/recommended",
3434
],
3535
files: ["**/*.ts"],
3636
parser: "@typescript-eslint/parser",
@@ -116,9 +116,8 @@ module.exports = {
116116
"import",
117117
"jsdoc",
118118
"no-only-tests",
119+
"perfectionist",
119120
"regexp",
120-
"simple-import-sort",
121-
"typescript-sort-keys",
122121
"vitest",
123122
],
124123
root: true,
@@ -127,8 +126,6 @@ module.exports = {
127126
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],
128127
"import/extensions": ["error", "ignorePackages"],
129128
"no-only-tests/no-only-tests": "error",
130-
"simple-import-sort/exports": "error",
131-
"simple-import-sort/imports": "error",
132129

133130
// These on-by-default rules don't work well for this repo and we like them off.
134131
"no-constant-condition": "off",

.prettierrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"$schema": "http://json.schemastore.org/prettierrc",
3-
"plugins": ["prettier-plugin-curly", "prettier-plugin-packagejson"],
43
"overrides": [
54
{ "files": ".*rc", "options": { "parser": "json" } },
65
{ "files": ".nvmrc", "options": { "parser": "yaml" } }
76
],
7+
"plugins": ["prettier-plugin-curly", "prettier-plugin-packagejson"],
88
"useTabs": true
99
}

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@
6767
"eslint-plugin-jsonc": "^2.8.0",
6868
"eslint-plugin-markdown": "^3.0.0",
6969
"eslint-plugin-no-only-tests": "^3.1.0",
70+
"eslint-plugin-perfectionist": "^1.1.2",
7071
"eslint-plugin-regexp": "^1.15.0",
71-
"eslint-plugin-simple-import-sort": "^10.0.0",
72-
"eslint-plugin-typescript-sort-keys": "^2.3.0",
7372
"eslint-plugin-vitest": "^0.2.2",
7473
"eslint-plugin-yml": "^1.7.0",
7574
"globby": "^13.1.4",

pnpm-lock.yaml

+53-97
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

script/setup-test-e2e.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { strict as assert } from "node:assert";
2-
31
import { $ } from "execa";
42
import { promises as fs } from "fs";
53
import { globby } from "globby";
4+
import { strict as assert } from "node:assert";
65

76
const description = "New Description Test";
87
const owner = "RNR1";

0 commit comments

Comments
 (0)