Skip to content

Commit 5f1905c

Browse files
committed
chore: update code style
1 parent 3928c62 commit 5f1905c

File tree

21 files changed

+139
-176
lines changed

21 files changed

+139
-176
lines changed

eslint.config.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,20 @@ const rootTsConfigs = [
5656
const p11tOptions = {
5757
type: "natural",
5858
ignoreCase: false,
59-
order: "asc",
6059
} as const;
6160

6261
const p11tGroups = {
6362
customGroups: {
64-
id: ["_", "id", "key", "self"],
65-
type: ["type", "kind"],
63+
id: ["^_$", "^id$", "^key$", "^self$"],
64+
type: ["^type$", "^kind$"],
6665
meta: [
67-
"name",
68-
"meta",
69-
"title",
70-
"description",
66+
"^name$",
67+
"^meta$",
68+
"^title$",
69+
"^description$",
7170
],
72-
alias: ["alias", "as"],
73-
rules: ["node", "messageId"],
71+
alias: ["^alias$", "^as$"],
72+
rules: ["^node$", "^messageId$"],
7473
},
7574
groups: ["id", "type", "meta", "alias", "rules", "unknown"],
7675
} as const;
@@ -257,6 +256,7 @@ export default [
257256
},
258257
],
259258
"perfectionist/sort-intersection-types": "off",
259+
"perfectionist/sort-modules": "off",
260260
"perfectionist/sort-named-exports": "off",
261261
"perfectionist/sort-named-imports": "off",
262262
"perfectionist/sort-object-types": [
@@ -271,10 +271,10 @@ export default [
271271
{
272272
...p11tOptions,
273273
...p11tGroups,
274-
partitionByComment: "Part:**",
274+
partitionByComment: "^Part:.*",
275275
},
276276
],
277-
"perfectionist/sort-union-types": ["warn", p11tOptions],
277+
"perfectionist/sort-union-types": "warn",
278278
// Part: unicorn rules
279279
"unicorn/template-indent": [
280280
"warn",

examples/webpack-react-dom-ts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@tsconfig/node22": "22.0.0",
2626
"@tsconfig/strictest": "2.0.5",
2727
"@types/dotenv-webpack": "7.0.7",
28-
"@types/node": "^22.9.0",
28+
"@types/node": "^22.9.1",
2929
"@types/react": "^18.3.12",
3030
"@types/react-dom": "^18.3.1",
3131
"css-loader": "^7.1.2",
@@ -46,5 +46,5 @@
4646
"webpack-cli": "^5.1.4",
4747
"webpack-dev-server": "^5.1.0"
4848
},
49-
"packageManager": "pnpm@9.13.2"
49+
"packageManager": "pnpm@9.14.1"
5050
}

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
"@effect/schema": "^0.75.5",
5656
"@eslint/config-inspector": "^0.5.6",
5757
"@eslint/js": "^9.15.0",
58-
"@stylistic/eslint-plugin-js": "^2.10.1",
58+
"@stylistic/eslint-plugin-js": "^2.11.0",
5959
"@susisu/eslint-plugin-safe-typescript": "^0.9.1",
6060
"@swc/core": "^1.9.2",
6161
"@tsconfig/node22": "^22.0.0",
6262
"@tsconfig/strictest": "^2.0.5",
63-
"@types/node": "^22.9.0",
63+
"@types/node": "^22.9.1",
6464
"@types/react": "^18.3.12",
6565
"@types/react-dom": "^18.3.1",
6666
"@typescript-eslint/eslint-plugin": "^8.15.0",
@@ -81,10 +81,10 @@
8181
"eslint-plugin-eslint-plugin": "^6.3.2",
8282
"eslint-plugin-import-x": "^4.4.2",
8383
"eslint-plugin-jsdoc": "^50.5.0",
84-
"eslint-plugin-perfectionist": "^3.9.1",
84+
"eslint-plugin-perfectionist": "^4.0.3",
8585
"eslint-plugin-regexp": "^2.7.0",
8686
"eslint-plugin-simple-import-sort": "^12.1.1",
87-
"eslint-plugin-unicorn": "^56.0.0",
87+
"eslint-plugin-unicorn": "^56.0.1",
8888
"eslint-plugin-vitest": "^0.5.4",
8989
"importx": "^0.5.0",
9090
"lefthook": "^1.8.4",
@@ -93,7 +93,7 @@
9393
"react": "^18.3.1",
9494
"react-dom": "^18.3.1",
9595
"skott": "^0.35.3",
96-
"sort-package-json": "^2.10.1",
96+
"sort-package-json": "^2.11.0",
9797
"std-env": "^3.8.0",
9898
"tinyglobby": "^0.2.10",
9999
"ts-pattern": "^5.5.0",
@@ -108,7 +108,7 @@
108108
"typescript-eslint": "^8.15.0",
109109
"vitest": "^2.1.5"
110110
},
111-
"packageManager": "pnpm@9.13.2",
111+
"packageManager": "pnpm@9.14.1",
112112
"engines": {
113113
"bun": ">=1.0.15",
114114
"node": ">=18.18.0"

packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-direct-set-state-in-use-effect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export default createRule<[], MessageID>({
175175
},
176176
"Program:exit"() {
177177
const getSetStateCalls = (
178-
id: TSESTree.Identifier | string,
178+
id: string | TSESTree.Identifier,
179179
initialScope: Scope.Scope,
180180
): TSESTree.CallExpression[] | TSESTree.Identifier[] => {
181181
const node = O.flatMap(VAR.findVariable(id, initialScope), VAR.getVariableNode(0)).pipe(O.getOrNull);

packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-direct-set-state-in-use-layout-effect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export default createRule<[], MessageID>({
180180
},
181181
"Program:exit"() {
182182
const getSetStateCalls = (
183-
id: TSESTree.Identifier | string,
183+
id: string | TSESTree.Identifier,
184184
initialScope: Scope.Scope,
185185
): TSESTree.CallExpression[] | TSESTree.Identifier[] => {
186186
const node = O.flatMap(VAR.findVariable(id, initialScope), VAR.getVariableNode(0)).pipe(O.getOrNull);

packages/plugins/eslint-plugin-react-naming-convention/src/rules/component-name.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ type Case = "CONSTANT_CASE" | "PascalCase";
1717

1818
/* eslint-disable no-restricted-syntax */
1919
type Options = readonly [
20+
| Case
21+
| undefined
2022
| {
2123
allowAllCaps?: boolean;
2224
allowLeadingUnderscore?: boolean;
2325
allowNamespace?: boolean;
2426
excepts?: readonly string[];
2527
rule?: Case;
26-
}
27-
| Case
28-
| undefined,
28+
},
2929
];
3030
/* eslint-enable no-restricted-syntax */
3131

packages/plugins/eslint-plugin-react-naming-convention/src/rules/filename-extension.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ type Allow = "always" | "as-needed";
1313

1414
/* eslint-disable no-restricted-syntax */
1515
type Options = readonly [
16+
| Allow
17+
| undefined
1618
| {
1719
allow?: Allow;
1820
extensions?: readonly string[];
19-
}
20-
| Allow
21-
| undefined,
21+
},
2222
];
2323
/* eslint-enable no-restricted-syntax */
2424

packages/plugins/eslint-plugin-react-naming-convention/src/rules/filename.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ export type MessageID =
1515
| "filenameCaseMismatchSuggestion"
1616
| "filenameEmpty";
1717

18-
type Case = "PascalCase" | "camelCase" | "kebab-case" | "snake_case";
18+
type Case = "camelCase" | "kebab-case" | "PascalCase" | "snake_case";
1919

2020
/* eslint-disable no-restricted-syntax */
2121
type Options = readonly [
22+
| Case
23+
| undefined
2224
| {
2325
/**
2426
* @deprecated Use ESLint's [files](https://eslint.org/docs/latest/use/configure/configuration-files#specifying-files-and-ignores) feature instead.
@@ -29,9 +31,7 @@ type Options = readonly [
2931
*/
3032
extensions?: readonly string[];
3133
rule?: Case;
32-
}
33-
| Case
34-
| undefined,
34+
},
3535
];
3636
/* eslint-enable no-restricted-syntax */
3737

packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-event-listener.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ export default createRule<[], MessageID>({
256256
if (O.exists(aEntry.signal, signal => abortedSignals.some(isSameObject(signal)))) continue;
257257
if (rEntries.some(isInverseEntry(aEntry))) continue;
258258
switch (aEntry.phase) {
259-
case "setup":
260259
case "cleanup":
260+
case "setup":
261261
context.report({
262262
messageId: "noLeakedEventListenerInEffect",
263263
node: aEntry.node,

packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-interval.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ export default createRule<[], MessageID>({
132132
for (const sEntry of sEntries) {
133133
if (cEntries.some(isInverseEntry(sEntry))) continue;
134134
switch (sEntry.phase) {
135-
case "setup":
136135
case "cleanup":
136+
case "setup":
137137
context.report({
138138
messageId: "noLeakedIntervalInEffect",
139139
node: sEntry.node,

0 commit comments

Comments
 (0)