Skip to content

Commit bf22d50

Browse files
fix: support eslint-plugin-perfectionist@3 (#1596)
## PR Checklist - [x] Addresses an existing open issue: fixes #1588 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Bumps to `eslint-plugin-perfection@3` and runs `pnpm lint --fix` for all its behavior differences. 💖
1 parent 9472b85 commit bf22d50

21 files changed

+38
-111
lines changed

eslint.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import jsonc from "eslint-plugin-jsonc";
1515
import markdown from "eslint-plugin-markdown";
1616
import n from "eslint-plugin-n";
1717
import packageJson from "eslint-plugin-package-json/configs/recommended";
18-
import perfectionistNatural from "eslint-plugin-perfectionist/configs/recommended-natural";
18+
import perfectionist from "eslint-plugin-perfectionist";
1919
import * as regexp from "eslint-plugin-regexp";
2020
import vitest from "eslint-plugin-vitest";
2121
import yml from "eslint-plugin-yml";
@@ -45,7 +45,7 @@ export default tseslint.config(
4545
jsdoc.configs["flat/recommended-typescript-error"],
4646
n.configs["flat/recommended"],
4747
packageJson,
48-
perfectionistNatural,
48+
perfectionist.configs["recommended-natural"],
4949
regexp.configs["flat/recommended"],
5050
...tseslint.config({
5151
extends: [
@@ -99,7 +99,7 @@ export default tseslint.config(
9999
"error",
100100
{
101101
order: "asc",
102-
"partition-by-comment": true,
102+
partitionByComment: true,
103103
type: "natural",
104104
},
105105
],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"eslint-plugin-markdown": "^5.0.0",
8282
"eslint-plugin-n": "^17.3.1",
8383
"eslint-plugin-package-json": "^0.15.0",
84-
"eslint-plugin-perfectionist": "^2.9.0",
84+
"eslint-plugin-perfectionist": "^3.1.2",
8585
"eslint-plugin-regexp": "^2.5.0",
8686
"eslint-plugin-vitest": "^0.5.3",
8787
"eslint-plugin-yml": "^1.14.0",

pnpm-lock.yaml

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

src/bin/help.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import chalk from "chalk";
2-
import { MockInstance, beforeEach, describe, expect, it, vi } from "vitest";
2+
import { beforeEach, describe, expect, it, MockInstance, vi } from "vitest";
33

44
import { logHelpText } from "./help.js";
55

src/shared/cli/outro.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import chalk from "chalk";
2-
import { MockInstance, beforeEach, describe, expect, it, vi } from "vitest";
2+
import { beforeEach, describe, expect, it, MockInstance, vi } from "vitest";
33

44
import { outro } from "./outro.js";
55

src/shared/doesRepositoryExist.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Octokit } from "octokit";
2-
import { MockInstance, describe, expect, it, vi } from "vitest";
2+
import { describe, expect, it, MockInstance, vi } from "vitest";
33

44
import { doesRepositoryExist } from "./doesRepositoryExist.js";
55

src/shared/getGitHubUserAsAllContributor.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import chalk from "chalk";
2-
import { MockInstance, beforeEach, describe, expect, it, vi } from "vitest";
2+
import { beforeEach, describe, expect, it, MockInstance, vi } from "vitest";
33

44
import { getGitHubUserAsAllContributor } from "./getGitHubUserAsAllContributor.js";
55

src/shared/options/augmentOptionsWithExcludes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import chalk from "chalk";
44
import { filterPromptCancel } from "../prompts.js";
55
import { Options, OptionsBase } from "../types.js";
66
import {
7-
ExclusionKey,
87
exclusionDescriptions,
8+
ExclusionKey,
99
exclusionKeys,
1010
getExclusions,
1111
} from "./exclusionKeys.js";

src/shared/options/readOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { createOptionDefaults } from "./createOptionDefaults/index.js";
1111
import { detectEmailRedundancy } from "./detectEmailRedundancy.js";
1212
import { ensureRepositoryExists } from "./ensureRepositoryExists.js";
1313
import { getBase } from "./getBase.js";
14-
import { GitHub, getGitHub } from "./getGitHub.js";
14+
import { getGitHub, GitHub } from "./getGitHub.js";
1515
import { getPrefillOrPromptedOption } from "./getPrefillOrPromptedOption.js";
1616
import { logInferredOptions } from "./logInferredOptions.js";
1717
import { optionsSchema } from "./optionsSchema.js";

src/shared/prompts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as prompts from "@clack/prompts";
22

3-
export function filterPromptCancel<Value>(value: Value | symbol) {
3+
export function filterPromptCancel<Value>(value: symbol | Value) {
44
return prompts.isCancel(value) ? undefined : value;
55
}

0 commit comments

Comments
 (0)