-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc tests #342
Comments
Run #13819 vs prettier/prettier@next |
Run #14546 vs prettier/prettier@next |
Run #14599 VS prettier/prettier@main |
prettier/prettier#14599 VS prettier/prettier@main
Diff (74 lines)diff --git ORI/excalidraw/src/element/bounds.test.ts ALT/excalidraw/src/element/bounds.test.ts
index c352a81..f62c4ea 100644
--- ORI/excalidraw/src/element/bounds.test.ts
+++ ALT/excalidraw/src/element/bounds.test.ts
@@ -29,7 +29,7 @@ const _ce = ({
width: w,
height: h,
angle: a,
- } as ExcalidrawElement);
+ }) as ExcalidrawElement;
describe("getElementAbsoluteCoords", () => {
it("test x1 coordinate", () => {
diff --git ORI/typescript-eslint/packages/eslint-plugin/docs/rules/explicit-function-return-type.md ALT/typescript-eslint/packages/eslint-plugin/docs/rules/explicit-function-return-type.md
index 3a67a7e..6f5282a 100644
--- ORI/typescript-eslint/packages/eslint-plugin/docs/rules/explicit-function-return-type.md
+++ ALT/typescript-eslint/packages/eslint-plugin/docs/rules/explicit-function-return-type.md
@@ -209,14 +209,14 @@ Examples of code for this rule with `{ allowDirectConstAssertionInArrowFunctions
#### ❌ Incorrect
```ts
-const func = (value: number) => ({ type: 'X', value } as any);
-const func = (value: number) => ({ type: 'X', value } as Action);
+const func = (value: number) => ({ type: 'X', value }) as any;
+const func = (value: number) => ({ type: 'X', value }) as Action;
```
#### ✅ Correct
```ts
-const func = (value: number) => ({ foo: 'bar', value } as const);
+const func = (value: number) => ({ foo: 'bar', value }) as const;
const func = () => x as const;
```
diff --git ORI/typescript-eslint/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md ALT/typescript-eslint/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md
index 2995d3b..b453bf9 100644
--- ORI/typescript-eslint/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md
+++ ALT/typescript-eslint/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md
@@ -131,11 +131,11 @@ export const bar = () => 1;
#### ✅ Correct
```ts
-export const func = (value: number) => ({ type: 'X', value } as const);
+export const func = (value: number) => ({ type: 'X', value }) as const;
export const foo = () =>
({
bar: true,
- } as const);
+ }) as const;
export const bar = () => 1 as const;
```
diff --git ORI/typescript-eslint/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts ALT/typescript-eslint/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts
index 120ad20..4e851f9 100644
--- ORI/typescript-eslint/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts
+++ ALT/typescript-eslint/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts
@@ -149,10 +149,10 @@ const baseCases = [
],
},
],
- } as TSESLint.InvalidTestCase<
+ }) as TSESLint.InvalidTestCase<
InferMessageIdsTypeFromRule<typeof rule>,
InferOptionsTypeFromRule<typeof rule>
- >),
+ >,
);
ruleTester.run('prefer-optional-chain', rule, {
|
Run #14654 VS prettier/prettier@main |
prettier/prettier#14654 VS prettier/prettier@main
diff --git ORI/babel/packages/babel-helper-replace-supers/src/index.ts ALT/babel/packages/babel-helper-replace-supers/src/index.ts
index 4699b7fd..d450ea7f 100644
--- ORI/babel/packages/babel-helper-replace-supers/src/index.ts
+++ ALT/babel/packages/babel-helper-replace-supers/src/index.ts
@@ -98,10 +98,10 @@ type SharedState = {
type Handler = HandlerState<SharedState> & SharedState;
type SuperMember = NodePath<
- | t.MemberExpression & {
- object: t.Super;
- property: Exclude<t.MemberExpression["property"], t.PrivateName>;
- }
+ t.MemberExpression & {
+ object: t.Super;
+ property: Exclude<t.MemberExpression["property"], t.PrivateName>;
+ }
>;
interface SpecHandler
|
Run #14633 VS prettier/prettier@main |
Run #14633 VS prettier/prettier@main |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Run #14736 VS prettier/prettier@main |
prettier/prettier#14736 VS prettier/prettier@main
diff --git ORI/typescript-eslint/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md ALT/typescript-eslint/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md
index 14a7e42..b7e8c13 100644
--- ORI/typescript-eslint/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md
+++ ALT/typescript-eslint/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md
@@ -46,7 +46,7 @@ function foo(bool?: boolean) {
}
// `any`, unconstrained generics and unions of more than one primitive type are disallowed
-const foo = <T,>(arg: T) => (arg ? 1 : 0);
+const foo = <T>(arg: T) => (arg ? 1 : 0);
// always-truthy and always-falsy types are disallowed
let obj = {};
|
[Error]
|
Run #14858 VS prettier/prettier@main |
prettier/prettier#14858 VS prettier/prettier@main
Diff (266 lines)diff --git ORI/babel/packages/babel-core/src/config/config-chain.ts ALT/babel/packages/babel-core/src/config/config-chain.ts
index 70600c89..394d9da5 100644
--- ORI/babel/packages/babel-core/src/config/config-chain.ts
+++ ALT/babel/packages/babel-core/src/config/config-chain.ts
@@ -533,12 +533,11 @@ function buildOverrideEnvDescriptors(
}
function makeChainWalker<
- ArgT extends
- {
- options: ValidatedOptions;
- dirname: string;
- filepath?: string;
- },
+ ArgT extends {
+ options: ValidatedOptions;
+ dirname: string;
+ filepath?: string;
+ },
>({
root,
env,
diff --git ORI/babel/packages/babel-parser/src/parser/expression.ts ALT/babel/packages/babel-parser/src/parser/expression.ts
index 79383a25..1e4e338a 100644
--- ORI/babel/packages/babel-parser/src/parser/expression.ts
+++ ALT/babel/packages/babel-parser/src/parser/expression.ts
@@ -2519,11 +2519,10 @@ export default abstract class ExpressionParser extends LValParser {
parseFunctionBodyAndFinish<
T extends
-
- | N.Function
- | N.TSDeclareMethod
- | N.TSDeclareFunction
- | N.ClassPrivateMethod,
+ | N.Function
+ | N.TSDeclareMethod
+ | N.TSDeclareFunction
+ | N.ClassPrivateMethod,
>(node: Undone<T>, type: T["type"], isMethod: boolean = false): T {
// @ts-expect-error (node is not bodiless if we get here)
this.parseFunctionBody(node, false, isMethod);
diff --git ORI/babel/packages/babel-parser/src/parser/statement.ts ALT/babel/packages/babel-parser/src/parser/statement.ts
index 95417318..40178198 100644
--- ORI/babel/packages/babel-parser/src/parser/statement.ts
+++ ALT/babel/packages/babel-parser/src/parser/statement.ts
@@ -2953,7 +2953,9 @@ export default abstract class StatementParser extends ExpressionParser {
parseImportSpecifierLocal<
T extends
- N.ImportSpecifier | N.ImportDefaultSpecifier | N.ImportNamespaceSpecifier,
+ | N.ImportSpecifier
+ | N.ImportDefaultSpecifier
+ | N.ImportNamespaceSpecifier,
>(
node: Undone<N.ImportDeclaration>,
specifier: Undone<T>,
@@ -2965,7 +2967,9 @@ export default abstract class StatementParser extends ExpressionParser {
finishImportSpecifier<
T extends
- N.ImportSpecifier | N.ImportDefaultSpecifier | N.ImportNamespaceSpecifier,
+ | N.ImportSpecifier
+ | N.ImportDefaultSpecifier
+ | N.ImportNamespaceSpecifier,
>(specifier: Undone<T>, type: T["type"], bindingType = BIND_LEXICAL) {
this.checkLVal(specifier.local, {
// @ts-expect-error refine types
diff --git ORI/babel/packages/babel-parser/src/plugins/flow/index.ts ALT/babel/packages/babel-parser/src/plugins/flow/index.ts
index f800a593..175629c8 100644
--- ORI/babel/packages/babel-parser/src/plugins/flow/index.ts
+++ ALT/babel/packages/babel-parser/src/plugins/flow/index.ts
@@ -1910,11 +1910,10 @@ export default (superClass: typeof Parser) =>
parseFunctionBodyAndFinish<
T extends
-
- | N.Function
- | N.TSDeclareMethod
- | N.TSDeclareFunction
- | N.ClassPrivateMethod,
+ | N.Function
+ | N.TSDeclareMethod
+ | N.TSDeclareFunction
+ | N.ClassPrivateMethod,
>(node: Undone<T>, type: T["type"], isMethod: boolean = false): T {
if (this.match(tt.colon)) {
const typeNode = this.startNode<N.TypeAnnotation>();
@@ -2733,10 +2732,9 @@ export default (superClass: typeof Parser) =>
parseImportSpecifierLocal<
T extends
-
- | N.ImportSpecifier
- | N.ImportDefaultSpecifier
- | N.ImportNamespaceSpecifier,
+ | N.ImportSpecifier
+ | N.ImportDefaultSpecifier
+ | N.ImportNamespaceSpecifier,
>(node: N.ImportDeclaration, specifier: Undone<T>, type: T["type"]): void {
specifier.local = hasTypeImportKind(node)
? this.flowParseRestrictedIdentifier(
diff --git ORI/babel/packages/babel-parser/src/plugins/typescript/index.ts ALT/babel/packages/babel-parser/src/plugins/typescript/index.ts
index 090e9126..9820396a 100644
--- ORI/babel/packages/babel-parser/src/plugins/typescript/index.ts
+++ ALT/babel/packages/babel-parser/src/plugins/typescript/index.ts
@@ -2315,11 +2315,10 @@ export default (superClass: ClassWithMixin<typeof Parser, IJSXParserMixin>) =>
parseFunctionBodyAndFinish<
T extends
-
- | N.Function
- | N.TSDeclareMethod
- | N.TSDeclareFunction
- | N.ClassPrivateMethod,
+ | N.Function
+ | N.TSDeclareMethod
+ | N.TSDeclareFunction
+ | N.ClassPrivateMethod,
>(node: Undone<T>, type: T["type"], isMethod: boolean = false): T {
if (this.match(tt.colon)) {
node.returnType = this.tsParseTypeOrTypePredicateAnnotation(tt.colon);
diff --git ORI/babel/packages/babel-plugin-transform-flow-comments/src/index.ts ALT/babel/packages/babel-plugin-transform-flow-comments/src/index.ts
index 34cdc57d..524479c9 100644
--- ORI/babel/packages/babel-plugin-transform-flow-comments/src/index.ts
+++ ALT/babel/packages/babel-plugin-transform-flow-comments/src/index.ts
@@ -70,14 +70,13 @@ export default declare(api => {
function wrapInFlowComment<
N extends
-
- | t.ClassProperty
- | t.ExportNamedDeclaration
- | t.Flow
- | t.ImportDeclaration
- | t.ExportDeclaration
- | t.ImportSpecifier
- | t.ImportDeclaration,
+ | t.ClassProperty
+ | t.ExportNamedDeclaration
+ | t.Flow
+ | t.ImportDeclaration
+ | t.ExportDeclaration
+ | t.ImportSpecifier
+ | t.ImportDeclaration,
>(path: NodePath<N>) {
attachComment({
ofPath: path,
diff --git ORI/babel/packages/babel-traverse/src/path/index.ts ALT/babel/packages/babel-traverse/src/path/index.ts
index 1f84d26a..bf5345fe 100644
--- ORI/babel/packages/babel-traverse/src/path/index.ts
+++ ALT/babel/packages/babel-traverse/src/path/index.ts
@@ -299,12 +299,11 @@ interface NodePath<T>
*/
ensureBlock<
T extends
-
- | t.Loop
- | t.WithStatement
- | t.Function
- | t.LabeledStatement
- | t.CatchClause,
+ | t.Loop
+ | t.WithStatement
+ | t.Function
+ | t.LabeledStatement
+ | t.CatchClause,
>(
this: NodePath<T>,
): asserts this is NodePath<T & { body: t.BlockStatement }>;
diff --git ORI/excalidraw/src/appState.ts ALT/excalidraw/src/appState.ts
index 45de2a9..5f3ef1a 100644
--- ORI/excalidraw/src/appState.ts
+++ ALT/excalidraw/src/appState.ts
@@ -100,15 +100,14 @@ export const getDefaultAppState = (): Omit<
* prop should be stripped when exporting to given storage type.
*/
const APP_STATE_STORAGE_CONF = (<
- Values extends
- {
- /** whether to keep when storing to browser storage (localStorage/IDB) */
- browser: boolean;
- /** whether to keep when exporting to file/database */
- export: boolean;
- /** server (shareLink/collab/...) */
- server: boolean;
- },
+ Values extends {
+ /** whether to keep when storing to browser storage (localStorage/IDB) */
+ browser: boolean;
+ /** whether to keep when exporting to file/database */
+ export: boolean;
+ /** server (shareLink/collab/...) */
+ server: boolean;
+ },
T extends Record<keyof AppState, Values>,
>(config: { [K in keyof T]: K extends keyof AppState ? T[K] : never }) =>
config)({
diff --git ORI/excalidraw/src/data/restore.ts ALT/excalidraw/src/data/restore.ts
index a56738b..490f011 100644
--- ORI/excalidraw/src/data/restore.ts
+++ ALT/excalidraw/src/data/restore.ts
@@ -69,14 +69,13 @@ const getFontFamilyByName = (fontFamilyName: string): FontFamilyValues => {
};
const restoreElementWithProperties = <
- T extends
- Required<Omit<ExcalidrawElement, "customData">> & {
- customData?: ExcalidrawElement["customData"];
- /** @deprecated */
- boundElementIds?: readonly ExcalidrawElement["id"][];
- /** metadata that may be present in elements during collaboration */
- [PRECEDING_ELEMENT_KEY]?: string;
- },
+ T extends Required<Omit<ExcalidrawElement, "customData">> & {
+ customData?: ExcalidrawElement["customData"];
+ /** @deprecated */
+ boundElementIds?: readonly ExcalidrawElement["id"][];
+ /** metadata that may be present in elements during collaboration */
+ [PRECEDING_ELEMENT_KEY]?: string;
+ },
K extends Pick<T, keyof Omit<Required<T>, keyof ExcalidrawElement>>,
>(
element: T,
diff --git ORI/typescript-eslint/packages/typescript-estree/src/convert.ts ALT/typescript-eslint/packages/typescript-estree/src/convert.ts
index e4402c1..b21a426 100644
--- ORI/typescript-eslint/packages/typescript-estree/src/convert.ts
+++ ALT/typescript-eslint/packages/typescript-estree/src/convert.ts
@@ -143,7 +143,8 @@ export class Converter {
*/
private fixExports<
T extends
- TSESTree.DefaultExportDeclarations | TSESTree.NamedExportDeclarations,
+ | TSESTree.DefaultExportDeclarations
+ | TSESTree.NamedExportDeclarations,
>(
node:
| ts.FunctionDeclaration
diff --git ORI/typescript-eslint/packages/utils/src/eslint-utils/rule-tester/RuleTester.ts ALT/typescript-eslint/packages/utils/src/eslint-utils/rule-tester/RuleTester.ts
index ee50995..7350de3 100644
--- ORI/typescript-eslint/packages/utils/src/eslint-utils/rule-tester/RuleTester.ts
+++ ALT/typescript-eslint/packages/utils/src/eslint-utils/rule-tester/RuleTester.ts
@@ -211,7 +211,8 @@ class RuleTester extends BaseRuleTester.RuleTester {
*/
const normalizeTest = <
T extends
- ValidTestCase<TOptions> | InvalidTestCase<TMessageIds, TOptions>,
+ | ValidTestCase<TOptions>
+ | InvalidTestCase<TMessageIds, TOptions>,
>({
dependencyConstraints: _,
...test
@@ -270,7 +271,8 @@ class RuleTester extends BaseRuleTester.RuleTester {
*/
const maybeMarkAsOnly = <
T extends
- ValidTestCase<TOptions> | InvalidTestCase<TMessageIds, TOptions>,
+ | ValidTestCase<TOptions>
+ | InvalidTestCase<TMessageIds, TOptions>,
>(
test: T,
): T => {
|
run #14858 vs 2.8.8 |
[Error]
|
run 2.7.1 vs 2.8.8 |
prettier/[email protected] VS prettier/[email protected]
Diff (654 lines)diff --git ORI/babel/packages/babel-core/src/config/files/index.ts ALT/babel/packages/babel-core/src/config/files/index.ts
index 5c340eb4..31e85602 100644
--- ORI/babel/packages/babel-core/src/config/files/index.ts
+++ ALT/babel/packages/babel-core/src/config/files/index.ts
@@ -3,7 +3,7 @@ type indexType = typeof import("./index");
// Kind of gross, but essentially asserting that the exports of this module are the same as the
// exports of index-browser, since this file may be replaced at bundle time with index-browser.
-({}) as any as indexBrowserType as indexType;
+({} as any as indexBrowserType as indexType);
export { findPackageData } from "./package";
diff --git ORI/babel/packages/babel-core/src/config/printer.ts ALT/babel/packages/babel-core/src/config/printer.ts
index 618a9c3a..7e26ed7c 100644
--- ORI/babel/packages/babel-core/src/config/printer.ts
+++ ALT/babel/packages/babel-core/src/config/printer.ts
@@ -15,7 +15,7 @@ export const ChainFormatter = {
type PrintableConfig = {
content: OptionsAndDescriptors;
- type: (typeof ChainFormatter)[keyof typeof ChainFormatter];
+ type: typeof ChainFormatter[keyof typeof ChainFormatter];
callerName: string | undefined | null;
filepath: string | undefined | null;
index: number | undefined | null;
@@ -24,7 +24,7 @@ type PrintableConfig = {
const Formatter = {
title(
- type: (typeof ChainFormatter)[keyof typeof ChainFormatter],
+ type: typeof ChainFormatter[keyof typeof ChainFormatter],
callerName?: string | null,
filepath?: string | null,
): string {
@@ -98,7 +98,7 @@ export class ConfigPrinter {
_stack: Array<PrintableConfig> = [];
configure(
enabled: boolean,
- type: (typeof ChainFormatter)[keyof typeof ChainFormatter],
+ type: typeof ChainFormatter[keyof typeof ChainFormatter],
{
callerName,
filepath,
diff --git ORI/babel/packages/babel-core/src/config/resolve-targets.ts ALT/babel/packages/babel-core/src/config/resolve-targets.ts
index 04c7fec4..a7d9a790 100644
--- ORI/babel/packages/babel-core/src/config/resolve-targets.ts
+++ ALT/babel/packages/babel-core/src/config/resolve-targets.ts
@@ -3,7 +3,7 @@ type nodeType = typeof import("./resolve-targets");
// Kind of gross, but essentially asserting that the exports of this module are the same as the
// exports of index-browser, since this file may be replaced at bundle time with index-browser.
-({}) as any as browserType as nodeType;
+({} as any as browserType as nodeType);
import type { ValidatedOptions } from "./validation/options";
import path from "path";
diff --git ORI/babel/packages/babel-core/src/config/validation/options.ts ALT/babel/packages/babel-core/src/config/validation/options.ts
index 52b1338c..d79ea0fe 100644
--- ORI/babel/packages/babel-core/src/config/validation/options.ts
+++ ALT/babel/packages/babel-core/src/config/validation/options.ts
@@ -286,7 +286,7 @@ const knownAssumptions = [
"skipForOfIteratorClosing",
"superIsCallableConstructor",
] as const;
-export type AssumptionName = (typeof knownAssumptions)[number];
+export type AssumptionName = typeof knownAssumptions[number];
export const assumptionsNames = new Set(knownAssumptions);
function getSource(loc: NestingPath): OptionsSource {
diff --git ORI/babel/packages/babel-core/src/transform-file.ts ALT/babel/packages/babel-core/src/transform-file.ts
index c9706ba8..c493425d 100644
--- ORI/babel/packages/babel-core/src/transform-file.ts
+++ ALT/babel/packages/babel-core/src/transform-file.ts
@@ -12,7 +12,7 @@ type transformFileType = typeof import("./transform-file");
// Kind of gross, but essentially asserting that the exports of this module are the same as the
// exports of transform-file-browser, since this file may be replaced at bundle time with
// transform-file-browser.
-({}) as any as transformFileBrowserType as transformFileType;
+({} as any as transformFileBrowserType as transformFileType);
const transformFileRunner = gensync(function* (
filename: string,
diff --git ORI/babel/packages/babel-helper-compilation-targets/src/utils.ts ALT/babel/packages/babel-helper-compilation-targets/src/utils.ts
index fa3b6705..4fba5a5c 100644
--- ORI/babel/packages/babel-helper-compilation-targets/src/utils.ts
+++ ALT/babel/packages/babel-helper-compilation-targets/src/utils.ts
@@ -50,7 +50,7 @@ export function isUnreleasedVersion(
export function getLowestUnreleased(a: string, b: string, env: Target): string {
const unreleasedLabel:
- | (typeof unreleasedLabels)[keyof typeof unreleasedLabels]
+ | typeof unreleasedLabels[keyof typeof unreleasedLabels]
| undefined =
// @ts-expect-error unreleasedLabel is undefined when env is not safari
unreleasedLabels[env];
diff --git ORI/babel/packages/babel-helper-create-regexp-features-plugin/src/features.ts ALT/babel/packages/babel-helper-create-regexp-features-plugin/src/features.ts
index acb9ab13..ed9b6f4e 100644
--- ORI/babel/packages/babel-helper-create-regexp-features-plugin/src/features.ts
+++ ALT/babel/packages/babel-helper-create-regexp-features-plugin/src/features.ts
@@ -18,7 +18,7 @@ export const FEATURES = Object.freeze({
export const featuresKey = "@babel/plugin-regexp-features/featuresKey";
export const runtimeKey = "@babel/plugin-regexp-features/runtimeKey";
-type FeatureType = (typeof FEATURES)[keyof typeof FEATURES];
+type FeatureType = typeof FEATURES[keyof typeof FEATURES];
export function enableFeature(features: number, feature: FeatureType): number {
return features | feature;
diff --git ORI/babel/packages/babel-parser/src/parser/lval.ts ALT/babel/packages/babel-parser/src/parser/lval.ts
index ceeece18..67b52575 100644
--- ORI/babel/packages/babel-parser/src/parser/lval.ts
+++ ALT/babel/packages/babel-parser/src/parser/lval.ts
@@ -384,7 +384,7 @@ export default abstract class LValParser extends NodeUtils {
parseBindingList(
this: Parser,
close: TokenType,
- closeCharCode: (typeof charCodes)[keyof typeof charCodes],
+ closeCharCode: typeof charCodes[keyof typeof charCodes],
allowEmpty?: boolean,
allowModifiers?: boolean,
): Array<Pattern | TSParameterProperty> {
@@ -729,7 +729,7 @@ export default abstract class LValParser extends NodeUtils {
}
checkCommaAfterRest(
- close: (typeof charCodes)[keyof typeof charCodes],
+ close: typeof charCodes[keyof typeof charCodes],
): boolean {
if (!this.match(tt.comma)) {
return false;
diff --git ORI/babel/packages/babel-parser/src/plugins/typescript/index.ts ALT/babel/packages/babel-parser/src/plugins/typescript/index.ts
index 9820396a..efcb155e 100644
--- ORI/babel/packages/babel-parser/src/plugins/typescript/index.ts
+++ ALT/babel/packages/babel-parser/src/plugins/typescript/index.ts
@@ -3651,7 +3651,7 @@ export default (superClass: ClassWithMixin<typeof Parser, IJSXParserMixin>) =>
}
checkCommaAfterRest(
- close: (typeof charCodes)[keyof typeof charCodes],
+ close: typeof charCodes[keyof typeof charCodes],
): boolean {
if (
this.state.isAmbientContext &&
diff --git ORI/babel/packages/babel-plugin-syntax-pipeline-operator/src/index.ts ALT/babel/packages/babel-plugin-syntax-pipeline-operator/src/index.ts
index c1cbd92e..9072fcd2 100644
--- ORI/babel/packages/babel-plugin-syntax-pipeline-operator/src/index.ts
+++ ALT/babel/packages/babel-plugin-syntax-pipeline-operator/src/index.ts
@@ -6,8 +6,8 @@ const documentationURL =
"https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator";
export interface Options {
- proposal: (typeof PIPELINE_PROPOSALS)[number];
- topicToken?: (typeof TOPIC_TOKENS)[number];
+ proposal: typeof PIPELINE_PROPOSALS[number];
+ topicToken?: typeof TOPIC_TOKENS[number];
}
export default declare((api, { proposal, topicToken }: Options) => {
diff --git ORI/babel/packages/babel-preset-env/src/types.d.ts ALT/babel/packages/babel-preset-env/src/types.d.ts
index aec4b3f6..e0fb50ec 100644
--- ORI/babel/packages/babel-preset-env/src/types.d.ts
+++ ALT/babel/packages/babel-preset-env/src/types.d.ts
@@ -4,9 +4,9 @@ import type { Targets, InputTargets } from "@babel/helper-compilation-targets";
// Options
// Use explicit modules to prevent typo errors.
-export type ModuleOption = (typeof ModulesOption)[keyof typeof ModulesOption];
+export type ModuleOption = typeof ModulesOption[keyof typeof ModulesOption];
export type BuiltInsOption =
- (typeof UseBuiltInsOption)[keyof typeof UseBuiltInsOption];
+ typeof UseBuiltInsOption[keyof typeof UseBuiltInsOption];
type CorejsVersion = 2 | 3 | string;
diff --git ORI/babel/packages/babel-traverse/src/path/evaluation.ts ALT/babel/packages/babel-traverse/src/path/evaluation.ts
index f272110f..6c7c1616 100644
--- ORI/babel/packages/babel-traverse/src/path/evaluation.ts
+++ ALT/babel/packages/babel-traverse/src/path/evaluation.ts
@@ -6,14 +6,14 @@ import type * as t from "@babel/types";
const VALID_CALLEES = ["String", "Number", "Math"] as const;
const INVALID_METHODS = ["random"] as const;
-function isValidCallee(val: string): val is (typeof VALID_CALLEES)[number] {
+function isValidCallee(val: string): val is typeof VALID_CALLEES[number] {
return VALID_CALLEES.includes(
// @ts-expect-error val is a string
val,
);
}
-function isInvalidMethod(val: string): val is (typeof INVALID_METHODS)[number] {
+function isInvalidMethod(val: string): val is typeof INVALID_METHODS[number] {
return INVALID_METHODS.includes(
// @ts-expect-error val is a string
val,
diff --git ORI/content/README.md ALT/content/README.md
index 7313d80b..88675664 100644
--- ORI/content/README.md
+++ ALT/content/README.md
@@ -47,4 +47,4 @@ By participating in and contributing to our projects and discussions, you acknow
You can communicate with the MDN Web Docs team and community using the [communication channels][].
[communication channels]: https://developer.mozilla.org/en-US/docs/MDN/Community/Communication_channels
-[MDN Web Docs]: https://developer.mozilla.org/
+[mdn web docs]: https://developer.mozilla.org/
diff --git ORI/content/REVIEWING.md ALT/content/REVIEWING.md
index 6062a357..4f54d304 100644
--- ORI/content/REVIEWING.md
+++ ALT/content/REVIEWING.md
@@ -210,4 +210,4 @@ for all their help.
[get in touch with us]: https://developer.mozilla.org/en-US/docs/MDN/Community/Contributing/Getting_started#what_can_i_do_to_help
[mdn code example guidelines]: https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Writing_style_guide/Code_style_guide
[mdn writing style guide]: https://developer.mozilla.org/en-US/docs/MDN/Guidelines/Writing_style_guide
-[MDN Web Docs chat rooms]: https://developer.mozilla.org/en-US/docs/MDN/Community/Communication_channels
+[mdn web docs chat rooms]: https://developer.mozilla.org/en-US/docs/MDN/Community/Communication_channels
diff --git ORI/content/files/en-us/learn/forms/ui_pseudo-classes/index.md ALT/content/files/en-us/learn/forms/ui_pseudo-classes/index.md
index e97457c6..673ec85c 100644
--- ORI/content/files/en-us/learn/forms/ui_pseudo-classes/index.md
+++ ALT/content/files/en-us/learn/forms/ui_pseudo-classes/index.md
@@ -459,12 +459,7 @@ A fragment of the HTML is as follows — note the readonly attribute:
If you try the live example, you'll see that the top set of form elements are not focusable, however, the values are submitted when the form is submitted. We've styled the form controls using the `:read-only` and `:read-write` pseudo-classes, like so:
```css
-:is(
- input:read-only,
- input:-moz-read-only,
- textarea:-moz-read-only,
- textarea:read-only
- ) {
+:is(input:read-only, input:-moz-read-only, textarea:-moz-read-only, textarea:read-only) {
border: 0;
box-shadow: none;
background-color: white;
diff --git ORI/content/files/en-us/web/api/text/index.md ALT/content/files/en-us/web/api/text/index.md
index f55e1762..dbc5af0b 100644
--- ORI/content/files/en-us/web/api/text/index.md
+++ ALT/content/files/en-us/web/api/text/index.md
@@ -26,10 +26,10 @@ To understand what a text node is, consider the following document:
In that document, there are five text nodes, with the following contents:
-- `"\n "` (after the `<head>` start tag, a newline followed by four spaces)
+- `"\n "` (after the `<head>` start tag, a newline followed by four spaces)
- `"Aliens?"` (the contents of the `title` element)
-- `"\n "` (after the `</head>` end tag, a newline followed by two spaces)
-- `"\n "` (after the `<body>` start tag, a newline followed by two spaces)
+- `"\n "` (after the `</head>` end tag, a newline followed by two spaces)
+- `"\n "` (after the `<body>` start tag, a newline followed by two spaces)
- `"\n Why yes.\n \n\n"` (the contents of the `body` element)
Each of those text nodes is an object that has the properties and methods documented in this article.
diff --git ORI/excalidraw/src/appState.ts ALT/excalidraw/src/appState.ts
index 5f3ef1a..b35cd2a 100644
--- ORI/excalidraw/src/appState.ts
+++ ALT/excalidraw/src/appState.ts
@@ -194,11 +194,11 @@ const _clearAppStateForStorage = <
exportType: ExportType,
) => {
type ExportableKeys = {
- [K in keyof typeof APP_STATE_STORAGE_CONF]: (typeof APP_STATE_STORAGE_CONF)[K][ExportType] extends true
+ [K in keyof typeof APP_STATE_STORAGE_CONF]: typeof APP_STATE_STORAGE_CONF[K][ExportType] extends true
? K
: never;
}[keyof typeof APP_STATE_STORAGE_CONF];
- const stateForExport = {} as { [K in ExportableKeys]?: (typeof appState)[K] };
+ const stateForExport = {} as { [K in ExportableKeys]?: typeof appState[K] };
for (const key of Object.keys(appState) as (keyof typeof appState)[]) {
const propConfig = APP_STATE_STORAGE_CONF[key];
if (propConfig?.[exportType]) {
diff --git ORI/excalidraw/src/components/App.tsx ALT/excalidraw/src/components/App.tsx
index 1590fa9..f865079 100644
--- ORI/excalidraw/src/components/App.tsx
+++ ALT/excalidraw/src/components/App.tsx
@@ -2184,7 +2184,7 @@ class App extends React.Component<AppProps, AppState> {
private setActiveTool = (
tool:
- | { type: (typeof SHAPES)[number]["value"] | "eraser" }
+ | { type: typeof SHAPES[number]["value"] | "eraser" }
| { type: "custom"; customType: string },
) => {
const nextActiveTool = updateActiveTool(this.state, tool);
diff --git ORI/excalidraw/src/data/blob.ts ALT/excalidraw/src/data/blob.ts
index 178c741..b5ca1dc 100644
--- ORI/excalidraw/src/data/blob.ts
+++ ALT/excalidraw/src/data/blob.ts
@@ -116,7 +116,7 @@ export const isImageFileHandle = (handle: FileSystemHandle | null) => {
export const isSupportedImageFile = (
blob: Blob | null | undefined,
-): blob is Blob & { type: (typeof ALLOWED_IMAGE_MIME_TYPES)[number] } => {
+): blob is Blob & { type: typeof ALLOWED_IMAGE_MIME_TYPES[number] } => {
const { type } = blob || {};
return (
!!type && (ALLOWED_IMAGE_MIME_TYPES as readonly string[]).includes(type)
@@ -277,7 +277,7 @@ export const resizeImageFile = async (
file: File,
opts: {
/** undefined indicates auto */
- outputType?: (typeof MIME_TYPES)["jpg"];
+ outputType?: typeof MIME_TYPES["jpg"];
maxWidthOrHeight: number;
},
): Promise<File> => {
diff --git ORI/excalidraw/src/element/linearElementEditor.ts ALT/excalidraw/src/element/linearElementEditor.ts
index 17cbb55..f0d0a21 100644
--- ORI/excalidraw/src/element/linearElementEditor.ts
+++ ALT/excalidraw/src/element/linearElementEditor.ts
@@ -387,7 +387,7 @@ export class LinearElementEditor {
static getEditorMidPoints = (
element: NonDeleted<ExcalidrawLinearElement>,
appState: AppState,
- ): (typeof editorMidPointsCache)["points"] => {
+ ): typeof editorMidPointsCache["points"] => {
// Since its not needed outside editor unless 2 pointer lines
if (!appState.editingLinearElement && element.points.length > 2) {
return [];
@@ -478,7 +478,7 @@ export class LinearElementEditor {
}
}
let index = 0;
- const midPoints: (typeof editorMidPointsCache)["points"] =
+ const midPoints: typeof editorMidPointsCache["points"] =
LinearElementEditor.getEditorMidPoints(element, appState);
while (index < midPoints.length) {
if (midPoints[index] !== null) {
@@ -586,7 +586,7 @@ export class LinearElementEditor {
hitElement: NonDeleted<ExcalidrawElement> | null;
linearElementEditor: LinearElementEditor | null;
} {
- const ret: ReturnType<(typeof LinearElementEditor)["handlePointerDown"]> = {
+ const ret: ReturnType<typeof LinearElementEditor["handlePointerDown"]> = {
didAddPoint: false,
hitElement: null,
linearElementEditor: null,
diff --git ORI/excalidraw/src/element/types.ts ALT/excalidraw/src/element/types.ts
index 4d85652..8f81096 100644
--- ORI/excalidraw/src/element/types.ts
+++ ALT/excalidraw/src/element/types.ts
@@ -4,17 +4,17 @@ import { FONT_FAMILY, TEXT_ALIGN, THEME, VERTICAL_ALIGN } from "../constants";
export type ChartType = "bar" | "line";
export type FillStyle = "hachure" | "cross-hatch" | "solid";
export type FontFamilyKeys = keyof typeof FONT_FAMILY;
-export type FontFamilyValues = (typeof FONT_FAMILY)[FontFamilyKeys];
-export type Theme = (typeof THEME)[keyof typeof THEME];
+export type FontFamilyValues = typeof FONT_FAMILY[FontFamilyKeys];
+export type Theme = typeof THEME[keyof typeof THEME];
export type FontString = string & { _brand: "fontString" };
export type GroupId = string;
export type PointerType = "mouse" | "pen" | "touch";
export type StrokeSharpness = "round" | "sharp";
export type StrokeStyle = "solid" | "dashed" | "dotted";
-export type TextAlign = (typeof TEXT_ALIGN)[keyof typeof TEXT_ALIGN];
+export type TextAlign = typeof TEXT_ALIGN[keyof typeof TEXT_ALIGN];
type VerticalAlignKeys = keyof typeof VERTICAL_ALIGN;
-export type VerticalAlign = (typeof VERTICAL_ALIGN)[VerticalAlignKeys];
+export type VerticalAlign = typeof VERTICAL_ALIGN[VerticalAlignKeys];
type _ExcalidrawElementBase = Readonly<{
id: string;
diff --git ORI/excalidraw/src/types.ts ALT/excalidraw/src/types.ts
index d60f35a..620f7b7 100644
--- ORI/excalidraw/src/types.ts
+++ ALT/excalidraw/src/types.ts
@@ -56,7 +56,7 @@ export type DataURL = string & { _brand: "DataURL" };
export type BinaryFileData = {
mimeType:
- | (typeof ALLOWED_IMAGE_MIME_TYPES)[number]
+ | typeof ALLOWED_IMAGE_MIME_TYPES[number]
// future user or unknown file type
| typeof MIME_TYPES.binary;
id: FileId;
@@ -81,7 +81,7 @@ export type BinaryFiles = Record<ExcalidrawElement["id"], BinaryFileData>;
export type LastActiveToolBeforeEraser =
| {
- type: (typeof SHAPES)[number]["value"] | "eraser";
+ type: typeof SHAPES[number]["value"] | "eraser";
customType: null;
}
| {
@@ -107,7 +107,7 @@ export type AppState = {
editingLinearElement: LinearElementEditor | null;
activeTool:
| {
- type: (typeof SHAPES)[number]["value"] | "eraser";
+ type: typeof SHAPES[number]["value"] | "eraser";
lastActiveToolBeforeEraser: LastActiveToolBeforeEraser;
locked: boolean;
customType: null;
@@ -401,7 +401,7 @@ export type AppClassProperties = {
FileId,
{
image: HTMLImageElement | Promise<HTMLImageElement>;
- mimeType: (typeof ALLOWED_IMAGE_MIME_TYPES)[number];
+ mimeType: typeof ALLOWED_IMAGE_MIME_TYPES[number];
}
>;
files: BinaryFiles;
diff --git ORI/excalidraw/src/utils.ts ALT/excalidraw/src/utils.ts
index fa9d167..9a92560 100644
--- ORI/excalidraw/src/utils.ts
+++ ALT/excalidraw/src/utils.ts
@@ -218,7 +218,7 @@ export const distance = (x: number, y: number) => Math.abs(x - y);
export const updateActiveTool = (
appState: Pick<AppState, "activeTool">,
data: (
- | { type: (typeof SHAPES)[number]["value"] | "eraser" }
+ | { type: typeof SHAPES[number]["value"] | "eraser" }
| { type: "custom"; customType: string }
) & { lastActiveToolBeforeEraser?: LastActiveToolBeforeEraser },
): AppState["activeTool"] => {
diff --git ORI/react-admin/packages/ra-core/src/inference/inferTypeFromValues.ts ALT/react-admin/packages/ra-core/src/inference/inferTypeFromValues.ts
index 112d70e..ae7b817 100644
--- ORI/react-admin/packages/ra-core/src/inference/inferTypeFromValues.ts
+++ ALT/react-admin/packages/ra-core/src/inference/inferTypeFromValues.ts
@@ -36,7 +36,7 @@ export const InferenceTypes = [
'object',
] as const;
-export type PossibleInferredElementTypes = (typeof InferenceTypes)[number];
+export type PossibleInferredElementTypes = typeof InferenceTypes[number];
export interface InferredElementDescription {
type: PossibleInferredElementTypes;
diff --git ORI/react-admin/packages/ra-ui-materialui/src/list/filter/FilterButton.tsx ALT/react-admin/packages/ra-ui-materialui/src/list/filter/FilterButton.tsx
index 877e919..8cccc7a 100644
--- ORI/react-admin/packages/ra-ui-materialui/src/list/filter/FilterButton.tsx
+++ ALT/react-admin/packages/ra-ui-materialui/src/list/filter/FilterButton.tsx
@@ -187,15 +187,13 @@ export const FilterButton = (props: FilterButtonProps): JSX.Element => {
</MenuItem>
)
)}
- {hasFilterValues &&
- !hasSavedCurrentQuery &&
- !disableSaveQuery && (
- <MenuItem onClick={showAddSavedQueryDialog}>
- {translate('ra.saved_queries.new_label', {
- _: 'Save current query...',
- })}
- </MenuItem>
- )}
+ {hasFilterValues && !hasSavedCurrentQuery && !disableSaveQuery && (
+ <MenuItem onClick={showAddSavedQueryDialog}>
+ {translate('ra.saved_queries.new_label', {
+ _: 'Save current query...',
+ })}
+ </MenuItem>
+ )}
{hasFilterValues && (
<MenuItem onClick={() => setFilters({}, {}, false)}>
{translate('ra.action.remove_all_filters', {
diff --git ORI/typescript-eslint/packages/eslint-plugin/docs/rules/no-base-to-string.md ALT/typescript-eslint/packages/eslint-plugin/docs/rules/no-base-to-string.md
index a5493c7..7409f5e 100644
--- ORI/typescript-eslint/packages/eslint-plugin/docs/rules/no-base-to-string.md
+++ ALT/typescript-eslint/packages/eslint-plugin/docs/rules/no-base-to-string.md
@@ -29,7 +29,7 @@ value + '';
// Interpolation and manual .toString() calls too:
`Value: ${value}`;
-({}).toString();
+({}.toString());
```
### ✅ Correct
diff --git ORI/typescript-eslint/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts ALT/typescript-eslint/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts
index 9f6db6e..33237a8 100644
--- ORI/typescript-eslint/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts
+++ ALT/typescript-eslint/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts
@@ -51,7 +51,7 @@ const keywordNodeTypesToTsTypes = new Map([
[TSESTree.AST_NODE_TYPES.TSStringKeyword, ts.TypeFlags.String],
]);
-type PrimitiveTypeFlag = (typeof primitiveTypeFlags)[number];
+type PrimitiveTypeFlag = typeof primitiveTypeFlags[number];
interface TypeFlagsWithName {
typeFlags: ts.TypeFlags;
diff --git ORI/typescript-eslint/packages/eslint-plugin/src/rules/padding-line-between-statements.ts ALT/typescript-eslint/packages/eslint-plugin/src/rules/padding-line-between-statements.ts
index 548c50d..f9b9709 100644
--- ORI/typescript-eslint/packages/eslint-plugin/src/rules/padding-line-between-statements.ts
+++ ALT/typescript-eslint/packages/eslint-plugin/src/rules/padding-line-between-statements.ts
@@ -699,7 +699,7 @@ export default util.createRule<Options, MessageIds>({
function getPaddingType(
prevNode: TSESTree.Node,
nextNode: TSESTree.Node,
- ): (typeof PaddingTypes)[keyof typeof PaddingTypes] {
+ ): typeof PaddingTypes[keyof typeof PaddingTypes] {
for (let i = configureList.length - 1; i >= 0; --i) {
const configure = configureList[i];
if (
diff --git ORI/typescript-eslint/packages/scope-manager/tests/fixtures.test.ts ALT/typescript-eslint/packages/scope-manager/tests/fixtures.test.ts
index 02173b8..fa86c15 100644
--- ORI/typescript-eslint/packages/scope-manager/tests/fixtures.test.ts
+++ ALT/typescript-eslint/packages/scope-manager/tests/fixtures.test.ts
@@ -52,7 +52,7 @@ const ALLOWED_OPTIONS: Map<string, ALLOWED_VALUE> = new Map<
]);
function nestDescribe(
- fixture: (typeof fixtures)[number],
+ fixture: typeof fixtures[number],
segments = fixture.segments,
): void {
if (segments.length > 0) {
diff --git ORI/typescript-eslint/packages/typescript-estree/tests/ast-fixtures.test.ts ALT/typescript-eslint/packages/typescript-estree/tests/ast-fixtures.test.ts
index f95af22..99cf80d 100644
--- ORI/typescript-eslint/packages/typescript-estree/tests/ast-fixtures.test.ts
+++ ALT/typescript-eslint/packages/typescript-estree/tests/ast-fixtures.test.ts
@@ -46,7 +46,7 @@ const fixtures = glob
});
function nestDescribe(
- fixture: (typeof fixtures)[number],
+ fixture: typeof fixtures[number],
segments = fixture.segments,
): void {
if (segments.length > 0) {
diff --git ORI/typescript-eslint/packages/visitor-keys/src/visitor-keys.ts ALT/typescript-eslint/packages/visitor-keys/src/visitor-keys.ts
index ce848d2..80a8b8c 100644
--- ORI/typescript-eslint/packages/visitor-keys/src/visitor-keys.ts
+++ ALT/typescript-eslint/packages/visitor-keys/src/visitor-keys.ts
@@ -101,14 +101,14 @@ type KeysDefinedInESLintVisitorKeysCore =
// strictly type the arrays of keys provided to make sure we keep this config in sync with the type defs
type AdditionalKeys = {
- // require keys for all nodes NOT defined in `eslint-visitor-keys`
- readonly [T in Exclude<
+ readonly // require keys for all nodes NOT defined in `eslint-visitor-keys`
+ [T in Exclude<
AST_NODE_TYPES,
KeysDefinedInESLintVisitorKeysCore
>]: readonly GetNodeTypeKeys<T>[];
} & {
- // optionally allow keys for all nodes defined in `eslint-visitor-keys`
- readonly [T in KeysDefinedInESLintVisitorKeysCore]?: readonly GetNodeTypeKeys<T>[];
+ readonly // optionally allow keys for all nodes defined in `eslint-visitor-keys`
+ [T in KeysDefinedInESLintVisitorKeysCore]?: readonly GetNodeTypeKeys<T>[];
};
/**
diff --git ORI/vega-lite/src/channel.ts ALT/vega-lite/src/channel.ts
index 289cc69..d7de12a 100644
--- ORI/vega-lite/src/channel.ts
+++ ALT/vega-lite/src/channel.ts
@@ -193,11 +193,11 @@ const {row: _r, column: _c, facet: _f, ...SINGLE_DEF_UNIT_CHANNEL_INDEX} = SINGL
export const SINGLE_DEF_CHANNELS = keys(SINGLE_DEF_CHANNEL_INDEX);
-export type SingleDefChannel = (typeof SINGLE_DEF_CHANNELS)[number];
+export type SingleDefChannel = typeof SINGLE_DEF_CHANNELS[number];
export const SINGLE_DEF_UNIT_CHANNELS = keys(SINGLE_DEF_UNIT_CHANNEL_INDEX);
-export type SingleDefUnitChannel = (typeof SINGLE_DEF_UNIT_CHANNELS)[number];
+export type SingleDefUnitChannel = typeof SINGLE_DEF_UNIT_CHANNELS[number];
export function isSingleDefUnitChannel(str: string): str is SingleDefUnitChannel {
return !!SINGLE_DEF_UNIT_CHANNEL_INDEX[str];
@@ -389,7 +389,7 @@ const {
} = UNIT_CHANNEL_INDEX;
export const NONPOSITION_CHANNELS = keys(NONPOSITION_CHANNEL_INDEX);
-export type NonPositionChannel = (typeof NONPOSITION_CHANNELS)[number];
+export type NonPositionChannel = typeof NONPOSITION_CHANNELS[number];
const POSITION_SCALE_CHANNEL_INDEX = {
x: 1,
@@ -418,7 +418,7 @@ const OFFSET_SCALE_CHANNEL_INDEX: {xOffset: 1; yOffset: 1} = {xOffset: 1, yOffse
export const OFFSET_SCALE_CHANNELS = keys(OFFSET_SCALE_CHANNEL_INDEX);
-export type OffsetScaleChannel = (typeof OFFSET_SCALE_CHANNELS)[0];
+export type OffsetScaleChannel = typeof OFFSET_SCALE_CHANNELS[0];
export function isXorYOffset(channel: Channel): channel is OffsetScaleChannel {
return channel in OFFSET_SCALE_CHANNEL_INDEX;
@@ -441,7 +441,7 @@ const {
...NONPOSITION_SCALE_CHANNEL_INDEX
} = NONPOSITION_CHANNEL_INDEX;
export const NONPOSITION_SCALE_CHANNELS = keys(NONPOSITION_SCALE_CHANNEL_INDEX);
-export type NonPositionScaleChannel = (typeof NONPOSITION_SCALE_CHANNELS)[number];
+export type NonPositionScaleChannel = typeof NONPOSITION_SCALE_CHANNELS[number];
export function isNonPositionScaleChannel(channel: Channel): channel is NonPositionScaleChannel {
return !!NONPOSITION_CHANNEL_INDEX[channel];
@@ -478,7 +478,7 @@ const SCALE_CHANNEL_INDEX = {
/** List of channels with scales */
export const SCALE_CHANNELS = keys(SCALE_CHANNEL_INDEX);
-export type ScaleChannel = (typeof SCALE_CHANNELS)[number];
+export type ScaleChannel = typeof SCALE_CHANNELS[number];
export function isScaleChannel(channel: Channel): channel is ScaleChannel {
return !!SCALE_CHANNEL_INDEX[channel];
diff --git ORI/vega-lite/src/compositemark/boxplot.ts ALT/vega-lite/src/compositemark/boxplot.ts
index e047c2d..b07a3cb 100644
--- ORI/vega-lite/src/compositemark/boxplot.ts
+++ ALT/vega-lite/src/compositemark/boxplot.ts
@@ -27,7 +27,7 @@ export type BoxPlot = typeof BOXPLOT;
export const BOXPLOT_PARTS = ['box', 'median', 'outliers', 'rule', 'ticks'] as const;
-type BoxPlotPart = (typeof BOXPLOT_PARTS)[number];
+type BoxPlotPart = typeof BOXPLOT_PARTS[number];
export type BoxPlotPartsMixins = PartsMixins<BoxPlotPart>;
diff --git ORI/vega-lite/src/compositemark/errorband.ts ALT/vega-lite/src/compositemark/errorband.ts
index 35924d6..16f790d 100644
--- ORI/vega-lite/src/compositemark/errorband.ts
+++ ALT/vega-lite/src/compositemark/errorband.ts
@@ -18,7 +18,7 @@ export type ErrorBand = typeof ERRORBAND;
export const ERRORBAND_PARTS = ['band', 'borders'] as const;
-type ErrorBandPart = (typeof ERRORBAND_PARTS)[number];
+type ErrorBandPart = typeof ERRORBAND_PARTS[number];
export type ErrorBandPartsMixins = PartsMixins<ErrorBandPart>;
diff --git ORI/vega-lite/src/compositemark/errorbar.ts ALT/vega-lite/src/compositemark/errorbar.ts
index 13e0e12..52d41fe 100644
--- ORI/vega-lite/src/compositemark/errorbar.ts
+++ ALT/vega-lite/src/compositemark/errorbar.ts
@@ -44,7 +44,7 @@ export type ErrorInputType = 'raw' | 'aggregated-upper-lower' | 'aggregated-erro
export const ERRORBAR_PARTS = ['ticks', 'rule'] as const;
-export type ErrorBarPart = (typeof ERRORBAR_PARTS)[number];
+export type ErrorBarPart = typeof ERRORBAR_PARTS[number];
export interface ErrorExtraEncoding<F extends Field> {
/**
diff --git ORI/vega-lite/src/mark.ts ALT/vega-lite/src/mark.ts
index 5d53a2f..dc0d4ea 100644
--- ORI/vega-lite/src/mark.ts
+++ ALT/vega-lite/src/mark.ts
@@ -601,8 +601,10 @@ export interface RelativeBandSize {
}
// Point/Line OverlayMixins are only for area, line, and trail but we don't want to declare multiple types of MarkDef
-export interface MarkDef<M extends string | Mark = Mark, ES extends ExprRef | SignalRef = ExprRef | SignalRef>
- extends GenericMarkDef<M>,
+export interface MarkDef<
+ M extends string | Mark = Mark,
+ ES extends ExprRef | SignalRef = ExprRef | SignalRef
+> extends GenericMarkDef<M>,
Omit<
MarkConfig<ES> &
AreaConfig<ES> & |
Run #15081 |
Run #15326 |
Run #15522 |
Run #15806 |
prettier/prettier#15806 VS prettier/prettier@main
diff --git ORI/excalidraw/src/components/App.tsx ALT/excalidraw/src/components/App.tsx
index b5abc44..67e015a 100644
--- ORI/excalidraw/src/components/App.tsx
+++ ALT/excalidraw/src/components/App.tsx
@@ -3619,8 +3619,8 @@ class App extends React.Component<AppProps, AppState> {
this.state.gridSize,
);
- const [lastCommittedX, lastCommittedY] =
- multiElement?.lastCommittedPoint ?? [0, 0];
+ const [lastCommittedX, lastCommittedY] = multiElement
+ ?.lastCommittedPoint ?? [0, 0];
let dxFromLastCommitted = gridX - rx - lastCommittedX;
let dyFromLastCommitted = gridY - ry - lastCommittedY;
diff --git ORI/prettier/src/utils/infer-parser.js ALT/prettier/src/utils/infer-parser.js
index 2002360..090ca4a 100644
--- ORI/prettier/src/utils/infer-parser.js
+++ ALT/prettier/src/utils/infer-parser.js
@@ -44,8 +44,8 @@ function getLanguageByInterpreter(languages, file) {
return;
}
- return languages.find(
- (language) => language.interpreters?.includes(interpreter),
+ return languages.find((language) =>
+ language.interpreters?.includes(interpreter),
);
}
diff --git ORI/react-admin/packages/ra-data-localstorage/src/index.ts ALT/react-admin/packages/ra-data-localstorage/src/index.ts
index d2f9225..1a91949 100644
--- ORI/react-admin/packages/ra-data-localstorage/src/index.ts
+++ ALT/react-admin/packages/ra-data-localstorage/src/index.ts
@@ -151,8 +151,8 @@ export default (params?: LocalStorageDataProviderParams): DataProvider => {
},
deleteMany: (resource, params) => {
updateLocalStorage(() => {
- const indexes = params.ids.map(
- id => data[resource]?.findIndex(record => record.id == id)
+ const indexes = params.ids.map(id =>
+ data[resource]?.findIndex(record => record.id == id)
);
pullAt(data[resource], indexes);
});
|
Run #15806 |
prettier/prettier#15806 VS prettier/prettier@main
Diff (52 lines)diff --git ORI/excalidraw/src/tests/binding.test.tsx ALT/excalidraw/src/tests/binding.test.tsx
index 07af365..b23a549 100644
--- ORI/excalidraw/src/tests/binding.test.tsx
+++ ALT/excalidraw/src/tests/binding.test.tsx
@@ -36,8 +36,11 @@ describe("element binding", () => {
expect(arrow.startBinding?.elementId).toBe(rectLeft.id);
expect(arrow.endBinding?.elementId).toBe(rectRight.id);
- const rotation = getTransformHandles(arrow, h.state.zoom, "mouse")
- .rotation!;
+ const rotation = getTransformHandles(
+ arrow,
+ h.state.zoom,
+ "mouse",
+ ).rotation!;
const rotationHandleX = rotation[0] + rotation[2] / 2;
const rotationHandleY = rotation[1] + rotation[3] / 2;
mouse.down(rotationHandleX, rotationHandleY);
diff --git ORI/prettier/src/utils/infer-parser.js ALT/prettier/src/utils/infer-parser.js
index 2002360..090ca4a 100644
--- ORI/prettier/src/utils/infer-parser.js
+++ ALT/prettier/src/utils/infer-parser.js
@@ -44,8 +44,8 @@ function getLanguageByInterpreter(languages, file) {
return;
}
- return languages.find(
- (language) => language.interpreters?.includes(interpreter),
+ return languages.find((language) =>
+ language.interpreters?.includes(interpreter),
);
}
diff --git ORI/react-admin/packages/ra-data-localstorage/src/index.ts ALT/react-admin/packages/ra-data-localstorage/src/index.ts
index d2f9225..1a91949 100644
--- ORI/react-admin/packages/ra-data-localstorage/src/index.ts
+++ ALT/react-admin/packages/ra-data-localstorage/src/index.ts
@@ -151,8 +151,8 @@ export default (params?: LocalStorageDataProviderParams): DataProvider => {
},
deleteMany: (resource, params) => {
updateLocalStorage(() => {
- const indexes = params.ids.map(
- id => data[resource]?.findIndex(record => record.id == id)
+ const indexes = params.ids.map(id =>
+ data[resource]?.findIndex(record => record.id == id)
);
pullAt(data[resource], indexes);
});
|
Run #15806 |
prettier/prettier#15806 VS prettier/prettier@main
Diff (52 lines)diff --git ORI/excalidraw/src/tests/binding.test.tsx ALT/excalidraw/src/tests/binding.test.tsx
index 07af365..b23a549 100644
--- ORI/excalidraw/src/tests/binding.test.tsx
+++ ALT/excalidraw/src/tests/binding.test.tsx
@@ -36,8 +36,11 @@ describe("element binding", () => {
expect(arrow.startBinding?.elementId).toBe(rectLeft.id);
expect(arrow.endBinding?.elementId).toBe(rectRight.id);
- const rotation = getTransformHandles(arrow, h.state.zoom, "mouse")
- .rotation!;
+ const rotation = getTransformHandles(
+ arrow,
+ h.state.zoom,
+ "mouse",
+ ).rotation!;
const rotationHandleX = rotation[0] + rotation[2] / 2;
const rotationHandleY = rotation[1] + rotation[3] / 2;
mouse.down(rotationHandleX, rotationHandleY);
diff --git ORI/prettier/src/utils/infer-parser.js ALT/prettier/src/utils/infer-parser.js
index 2002360..090ca4a 100644
--- ORI/prettier/src/utils/infer-parser.js
+++ ALT/prettier/src/utils/infer-parser.js
@@ -44,8 +44,8 @@ function getLanguageByInterpreter(languages, file) {
return;
}
- return languages.find(
- (language) => language.interpreters?.includes(interpreter),
+ return languages.find((language) =>
+ language.interpreters?.includes(interpreter),
);
}
diff --git ORI/react-admin/packages/ra-data-localstorage/src/index.ts ALT/react-admin/packages/ra-data-localstorage/src/index.ts
index d2f9225..1a91949 100644
--- ORI/react-admin/packages/ra-data-localstorage/src/index.ts
+++ ALT/react-admin/packages/ra-data-localstorage/src/index.ts
@@ -151,8 +151,8 @@ export default (params?: LocalStorageDataProviderParams): DataProvider => {
},
deleteMany: (resource, params) => {
updateLocalStorage(() => {
- const indexes = params.ids.map(
- id => data[resource]?.findIndex(record => record.id == id)
+ const indexes = params.ids.map(id =>
+ data[resource]?.findIndex(record => record.id == id)
);
pullAt(data[resource], indexes);
});
|
Run #15209 |
prettier/prettier#15209 VS prettier/prettier@main
Diff (178 lines)diff --git ORI/content/files/en-us/learn/javascript/asynchronous/introducing_workers/index.md ALT/content/files/en-us/learn/javascript/asynchronous/introducing_workers/index.md
index d152c391..ba7c4182 100644
--- ORI/content/files/en-us/learn/javascript/asynchronous/introducing_workers/index.md
+++ ALT/content/files/en-us/learn/javascript/asynchronous/introducing_workers/index.md
@@ -74,8 +74,9 @@ function generatePrimes(quota) {
document.querySelector("#generate").addEventListener("click", () => {
const quota = document.querySelector("#quota").value;
const primes = generatePrimes(quota);
- document.querySelector("#output").textContent =
- `Finished generating ${quota} primes!`;
+ document.querySelector(
+ "#output",
+ ).textContent = `Finished generating ${quota} primes!`;
});
document.querySelector("#reload").addEventListener("click", () => {
@@ -157,8 +158,9 @@ document.querySelector("#generate").addEventListener("click", () => {
// update the output box with a message for the user, including the number of
// primes that were generated, taken from the message data.
worker.addEventListener("message", (message) => {
- document.querySelector("#output").textContent =
- `Finished generating ${message.data} primes!`;
+ document.querySelector(
+ "#output",
+ ).textContent = `Finished generating ${message.data} primes!`;
});
document.querySelector("#reload").addEventListener("click", () => {
diff --git ORI/content/files/en-us/web/api/batterymanager/chargingtime/index.md ALT/content/files/en-us/web/api/batterymanager/chargingtime/index.md
index 7be36c3f..61ce789f 100644
--- ORI/content/files/en-us/web/api/batterymanager/chargingtime/index.md
+++ ALT/content/files/en-us/web/api/batterymanager/chargingtime/index.md
@@ -34,8 +34,9 @@ A number.
navigator.getBattery().then((battery) => {
const time = battery.chargingTime;
- document.querySelector("#chargingTime").textContent =
- `Time to fully charge the battery: ${time}s`;
+ document.querySelector(
+ "#chargingTime",
+ ).textContent = `Time to fully charge the battery: ${time}s`;
});
```
diff --git ORI/content/files/en-us/web/api/batterymanager/dischargingtime/index.md ALT/content/files/en-us/web/api/batterymanager/dischargingtime/index.md
index ae0883f0..011eacb5 100644
--- ORI/content/files/en-us/web/api/batterymanager/dischargingtime/index.md
+++ ALT/content/files/en-us/web/api/batterymanager/dischargingtime/index.md
@@ -36,8 +36,9 @@ A number.
navigator.getBattery().then((battery) => {
const time = battery.dischargingTime;
- document.querySelector("#dischargingTime").textContent =
- `Remaining time to fully discharge the battery: ${time}`;
+ document.querySelector(
+ "#dischargingTime",
+ ).textContent = `Remaining time to fully discharge the battery: ${time}`;
});
```
diff --git ORI/content/files/en-us/web/api/batterymanager/levelchange_event/index.md ALT/content/files/en-us/web/api/batterymanager/levelchange_event/index.md
index 1ae9271c..c7b43a83 100644
--- ORI/content/files/en-us/web/api/batterymanager/levelchange_event/index.md
+++ ALT/content/files/en-us/web/api/batterymanager/levelchange_event/index.md
@@ -45,8 +45,9 @@ navigator.getBattery().then((battery) => {
battery.chargingTime / 60
}`;
} else {
- document.querySelector("#stateBattery").textContent =
- `Discharging time: ${battery.dischargingTime / 60}`;
+ document.querySelector(
+ "#stateBattery",
+ ).textContent = `Discharging time: ${battery.dischargingTime / 60}`;
}
};
});
diff --git ORI/content/files/en-us/web/api/keyboardevent/metakey/index.md ALT/content/files/en-us/web/api/keyboardevent/metakey/index.md
index 5ac693fd..6d3ca5fd 100644
--- ORI/content/files/en-us/web/api/keyboardevent/metakey/index.md
+++ ALT/content/files/en-us/web/api/keyboardevent/metakey/index.md
@@ -33,8 +33,9 @@ A boolean value.
```js
function ismetaKey(e) {
- document.querySelector("#output").textContent =
- `metaKey pressed? ${e.metaKey}`;
+ document.querySelector(
+ "#output",
+ ).textContent = `metaKey pressed? ${e.metaKey}`;
}
```
diff --git ORI/content/files/en-us/web/api/response/json/index.md ALT/content/files/en-us/web/api/response/json/index.md
index 44312c06..d610ce0e 100644
--- ORI/content/files/en-us/web/api/response/json/index.md
+++ ALT/content/files/en-us/web/api/response/json/index.md
@@ -49,8 +49,9 @@ fetch(myRequest)
listItem.appendChild(document.createElement("strong")).textContent =
product.Name;
listItem.append(` can be found in ${product.Location}. Cost: `);
- listItem.appendChild(document.createElement("strong")).textContent =
- `£${product.Price}`;
+ listItem.appendChild(
+ document.createElement("strong"),
+ ).textContent = `£${product.Price}`;
myList.appendChild(listItem);
}
})
diff --git ORI/content/files/en-us/web/api/rtcdatachannel/label/index.md ALT/content/files/en-us/web/api/rtcdatachannel/label/index.md
index 9dfe3a30..ac15fa0f 100644
--- ORI/content/files/en-us/web/api/rtcdatachannel/label/index.md
+++ ALT/content/files/en-us/web/api/rtcdatachannel/label/index.md
@@ -39,8 +39,9 @@ const dc = pc.createDataChannel("my channel");
// …
-document.getElementById("channel-name").innerHTML =
- `<span class='channelName'>${dc.label}</span>`;
+document.getElementById(
+ "channel-name",
+).innerHTML = `<span class='channelName'>${dc.label}</span>`;
```
## Specifications
diff --git ORI/content/files/en-us/web/api/webgl_api/by_example/hello_glsl/index.md ALT/content/files/en-us/web/api/webgl_api/by_example/hello_glsl/index.md
index 0c53c0ae..1f472756 100644
--- ORI/content/files/en-us/web/api/webgl_api/by_example/hello_glsl/index.md
+++ ALT/content/files/en-us/web/api/webgl_api/by_example/hello_glsl/index.md
@@ -97,8 +97,9 @@ function setupWebGL(evt) {
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
const linkErrLog = gl.getProgramInfoLog(program);
cleanup();
- document.querySelector("p").textContent =
- `Shader program did not link successfully. Error log: ${linkErrLog}`;
+ document.querySelector(
+ "p",
+ ).textContent = `Shader program did not link successfully. Error log: ${linkErrLog}`;
return;
}
diff --git ORI/content/files/en-us/web/api/webgl_api/by_example/hello_vertex_attributes/index.md ALT/content/files/en-us/web/api/webgl_api/by_example/hello_vertex_attributes/index.md
index b193e111..ad7acf56 100644
--- ORI/content/files/en-us/web/api/webgl_api/by_example/hello_vertex_attributes/index.md
+++ ALT/content/files/en-us/web/api/webgl_api/by_example/hello_vertex_attributes/index.md
@@ -102,8 +102,9 @@ function setupWebGL(evt) {
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
const linkErrLog = gl.getProgramInfoLog(program);
cleanup();
- document.querySelector("p").textContent =
- `Shader program did not link successfully. Error log: ${linkErrLog}`;
+ document.querySelector(
+ "p",
+ ).textContent = `Shader program did not link successfully. Error log: ${linkErrLog}`;
return;
}
diff --git ORI/content/files/en-us/web/api/webgl_api/by_example/textures_from_code/index.md ALT/content/files/en-us/web/api/webgl_api/by_example/textures_from_code/index.md
index 4fe34fe6..bbdbe999 100644
--- ORI/content/files/en-us/web/api/webgl_api/by_example/textures_from_code/index.md
+++ ALT/content/files/en-us/web/api/webgl_api/by_example/textures_from_code/index.md
@@ -108,8 +108,9 @@ function setupWebGL(evt) {
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
const linkErrLog = gl.getProgramInfoLog(program);
cleanup();
- document.querySelector("p").textContent =
- `Shader program did not link successfully. Error log: ${linkErrLog}`;
+ document.querySelector(
+ "p",
+ ).textContent = `Shader program did not link successfully. Error log: ${linkErrLog}`;
return;
}
initializeAttributes();
|
Run #15209 |
Run #15811 |
prettier/prettier#15811 VS prettier/prettier@main
Diff (141 lines)diff --git ORI/babel/packages/babel-parser/src/parse-error/pipeline-operator-errors.ts ALT/babel/packages/babel-parser/src/parse-error/pipeline-operator-errors.ts
index b7f21ad0..fa9e4fcf 100644
--- ORI/babel/packages/babel-parser/src/parse-error/pipeline-operator-errors.ts
+++ ALT/babel/packages/babel-parser/src/parse-error/pipeline-operator-errors.ts
@@ -7,9 +7,8 @@ export const UnparenthesizedPipeBodyDescriptions = new Set([
"YieldExpression",
] as const);
-type GetSetMemberType<T extends Set<any>> = T extends Set<infer M>
- ? M
- : unknown;
+type GetSetMemberType<T extends Set<any>> =
+ T extends Set<infer M> ? M : unknown;
type UnparenthesizedPipeBodyTypes = GetSetMemberType<
typeof UnparenthesizedPipeBodyDescriptions
diff --git ORI/babel/packages/babel-traverse/src/path/family.ts ALT/babel/packages/babel-traverse/src/path/family.ts
index 0c6f2ab6..be6f6b2f 100644
--- ORI/babel/packages/babel-traverse/src/path/family.ts
+++ ALT/babel/packages/babel-traverse/src/path/family.ts
@@ -335,9 +335,10 @@ type MaybeToIndex<T extends string> = T extends `${bigint}` ? number : T;
type Pattern<Obj extends string, Prop extends string> = `${Obj}.${Prop}`;
// split "body.body.1" to ["body", "body", 1]
-type Split<P extends string> = P extends Pattern<infer O, infer U>
- ? [MaybeToIndex<O>, ...Split<U>]
- : [MaybeToIndex<P>];
+type Split<P extends string> =
+ P extends Pattern<infer O, infer U>
+ ? [MaybeToIndex<O>, ...Split<U>]
+ : [MaybeToIndex<P>];
// get all K with Node[K] is t.Node | t.Node[]
type NodeKeyOf<Node extends t.Node | t.Node[]> = keyof Pick<
@@ -361,11 +362,12 @@ type Trav<
: never
: never;
-type ToNodePath<T> = T extends Array<t.Node | null | undefined>
- ? Array<NodePath<T[number]>>
- : T extends t.Node | null | undefined
- ? NodePath<T>
- : never;
+type ToNodePath<T> =
+ T extends Array<t.Node | null | undefined>
+ ? Array<NodePath<T[number]>>
+ : T extends t.Node | null | undefined
+ ? NodePath<T>
+ : never;
function get<T extends t.Node, K extends keyof T>(
this: NodePath<T>,
diff --git ORI/excalidraw/src/utility-types.ts ALT/excalidraw/src/utility-types.ts
index b84eb19..e24f11c 100644
--- ORI/excalidraw/src/utility-types.ts
+++ ALT/excalidraw/src/utility-types.ts
@@ -44,6 +44,5 @@ export type ForwardRef<T, P = any> = Parameters<
CallableType<React.ForwardRefRenderFunction<T, P>>
>[1];
-export type ExtractSetType<T extends Set<any>> = T extends Set<infer U>
- ? U
- : never;
+export type ExtractSetType<T extends Set<any>> =
+ T extends Set<infer U> ? U : never;
diff --git ORI/prettier/src/cli/format.js ALT/prettier/src/cli/format.js
index 694a62c..fe1c05d 100644
--- ORI/prettier/src/cli/format.js
+++ ALT/prettier/src/cli/format.js
@@ -221,7 +221,11 @@ async function format(context, input, opt) {
context.logger.debug(
`'${
performanceTestFlag.name
- }' measurements for formatWithCursor: ${JSON.stringify(results, null, 2)}`,
+ }' measurements for formatWithCursor: ${JSON.stringify(
+ results,
+ null,
+ 2,
+ )}`,
);
}
diff --git ORI/prettier/src/index.d.ts ALT/prettier/src/index.d.ts
index 628825d..255d2e3 100644
--- ORI/prettier/src/index.d.ts
+++ ALT/prettier/src/index.d.ts
@@ -39,9 +39,8 @@ type ArrayProperties<T> = {
// A union of the properties of the given array T that can be used to index it.
// If the array is a tuple, then that's going to be the explicit indices of the
// array, otherwise it's going to just be number.
-type IndexProperties<T extends { length: number }> = IsTuple<T> extends true
- ? Exclude<Partial<T>["length"], T["length"]>
- : number;
+type IndexProperties<T extends { length: number }> =
+ IsTuple<T> extends true ? Exclude<Partial<T>["length"], T["length"]> : number;
// Effectively performing T[P], except that it's telling TypeScript that it's
// safe to do this for tuples, arrays, or objects.
diff --git ORI/typescript-eslint/packages/utils/src/eslint-utils/InferTypesFromRule.ts ALT/typescript-eslint/packages/utils/src/eslint-utils/InferTypesFromRule.ts
index 4aca4b0..215a869 100644
--- ORI/typescript-eslint/packages/utils/src/eslint-utils/InferTypesFromRule.ts
+++ ALT/typescript-eslint/packages/utils/src/eslint-utils/InferTypesFromRule.ts
@@ -3,25 +3,21 @@ import type { RuleCreateFunction, RuleModule } from '../ts-eslint';
/**
* Uses type inference to fetch the TOptions type from the given RuleModule
*/
-type InferOptionsTypeFromRule<T> = T extends RuleModule<
- infer _TMessageIds,
- infer TOptions
->
- ? TOptions
- : T extends RuleCreateFunction<infer _TMessageIds, infer TOptions>
+type InferOptionsTypeFromRule<T> =
+ T extends RuleModule<infer _TMessageIds, infer TOptions>
? TOptions
- : unknown;
+ : T extends RuleCreateFunction<infer _TMessageIds, infer TOptions>
+ ? TOptions
+ : unknown;
/**
* Uses type inference to fetch the TMessageIds type from the given RuleModule
*/
-type InferMessageIdsTypeFromRule<T> = T extends RuleModule<
- infer TMessageIds,
- infer _TOptions
->
- ? TMessageIds
- : T extends RuleCreateFunction<infer TMessageIds, infer _TOptions>
+type InferMessageIdsTypeFromRule<T> =
+ T extends RuleModule<infer TMessageIds, infer _TOptions>
? TMessageIds
- : unknown;
+ : T extends RuleCreateFunction<infer TMessageIds, infer _TOptions>
+ ? TMessageIds
+ : unknown;
export { InferOptionsTypeFromRule, InferMessageIdsTypeFromRule };
|
Run #15811 |
prettier/prettier#15811 VS prettier/prettier@main
Diff (124 lines)diff --git ORI/babel/packages/babel-parser/src/parse-error/pipeline-operator-errors.ts ALT/babel/packages/babel-parser/src/parse-error/pipeline-operator-errors.ts
index b7f21ad0..fa9e4fcf 100644
--- ORI/babel/packages/babel-parser/src/parse-error/pipeline-operator-errors.ts
+++ ALT/babel/packages/babel-parser/src/parse-error/pipeline-operator-errors.ts
@@ -7,9 +7,8 @@ export const UnparenthesizedPipeBodyDescriptions = new Set([
"YieldExpression",
] as const);
-type GetSetMemberType<T extends Set<any>> = T extends Set<infer M>
- ? M
- : unknown;
+type GetSetMemberType<T extends Set<any>> =
+ T extends Set<infer M> ? M : unknown;
type UnparenthesizedPipeBodyTypes = GetSetMemberType<
typeof UnparenthesizedPipeBodyDescriptions
diff --git ORI/babel/packages/babel-traverse/src/path/family.ts ALT/babel/packages/babel-traverse/src/path/family.ts
index 0c6f2ab6..be6f6b2f 100644
--- ORI/babel/packages/babel-traverse/src/path/family.ts
+++ ALT/babel/packages/babel-traverse/src/path/family.ts
@@ -335,9 +335,10 @@ type MaybeToIndex<T extends string> = T extends `${bigint}` ? number : T;
type Pattern<Obj extends string, Prop extends string> = `${Obj}.${Prop}`;
// split "body.body.1" to ["body", "body", 1]
-type Split<P extends string> = P extends Pattern<infer O, infer U>
- ? [MaybeToIndex<O>, ...Split<U>]
- : [MaybeToIndex<P>];
+type Split<P extends string> =
+ P extends Pattern<infer O, infer U>
+ ? [MaybeToIndex<O>, ...Split<U>]
+ : [MaybeToIndex<P>];
// get all K with Node[K] is t.Node | t.Node[]
type NodeKeyOf<Node extends t.Node | t.Node[]> = keyof Pick<
@@ -361,11 +362,12 @@ type Trav<
: never
: never;
-type ToNodePath<T> = T extends Array<t.Node | null | undefined>
- ? Array<NodePath<T[number]>>
- : T extends t.Node | null | undefined
- ? NodePath<T>
- : never;
+type ToNodePath<T> =
+ T extends Array<t.Node | null | undefined>
+ ? Array<NodePath<T[number]>>
+ : T extends t.Node | null | undefined
+ ? NodePath<T>
+ : never;
function get<T extends t.Node, K extends keyof T>(
this: NodePath<T>,
diff --git ORI/excalidraw/src/utility-types.ts ALT/excalidraw/src/utility-types.ts
index b84eb19..e24f11c 100644
--- ORI/excalidraw/src/utility-types.ts
+++ ALT/excalidraw/src/utility-types.ts
@@ -44,6 +44,5 @@ export type ForwardRef<T, P = any> = Parameters<
CallableType<React.ForwardRefRenderFunction<T, P>>
>[1];
-export type ExtractSetType<T extends Set<any>> = T extends Set<infer U>
- ? U
- : never;
+export type ExtractSetType<T extends Set<any>> =
+ T extends Set<infer U> ? U : never;
diff --git ORI/prettier/src/index.d.ts ALT/prettier/src/index.d.ts
index 628825d..255d2e3 100644
--- ORI/prettier/src/index.d.ts
+++ ALT/prettier/src/index.d.ts
@@ -39,9 +39,8 @@ type ArrayProperties<T> = {
// A union of the properties of the given array T that can be used to index it.
// If the array is a tuple, then that's going to be the explicit indices of the
// array, otherwise it's going to just be number.
-type IndexProperties<T extends { length: number }> = IsTuple<T> extends true
- ? Exclude<Partial<T>["length"], T["length"]>
- : number;
+type IndexProperties<T extends { length: number }> =
+ IsTuple<T> extends true ? Exclude<Partial<T>["length"], T["length"]> : number;
// Effectively performing T[P], except that it's telling TypeScript that it's
// safe to do this for tuples, arrays, or objects.
diff --git ORI/typescript-eslint/packages/utils/src/eslint-utils/InferTypesFromRule.ts ALT/typescript-eslint/packages/utils/src/eslint-utils/InferTypesFromRule.ts
index 4aca4b0..215a869 100644
--- ORI/typescript-eslint/packages/utils/src/eslint-utils/InferTypesFromRule.ts
+++ ALT/typescript-eslint/packages/utils/src/eslint-utils/InferTypesFromRule.ts
@@ -3,25 +3,21 @@ import type { RuleCreateFunction, RuleModule } from '../ts-eslint';
/**
* Uses type inference to fetch the TOptions type from the given RuleModule
*/
-type InferOptionsTypeFromRule<T> = T extends RuleModule<
- infer _TMessageIds,
- infer TOptions
->
- ? TOptions
- : T extends RuleCreateFunction<infer _TMessageIds, infer TOptions>
+type InferOptionsTypeFromRule<T> =
+ T extends RuleModule<infer _TMessageIds, infer TOptions>
? TOptions
- : unknown;
+ : T extends RuleCreateFunction<infer _TMessageIds, infer TOptions>
+ ? TOptions
+ : unknown;
/**
* Uses type inference to fetch the TMessageIds type from the given RuleModule
*/
-type InferMessageIdsTypeFromRule<T> = T extends RuleModule<
- infer TMessageIds,
- infer _TOptions
->
- ? TMessageIds
- : T extends RuleCreateFunction<infer TMessageIds, infer _TOptions>
+type InferMessageIdsTypeFromRule<T> =
+ T extends RuleModule<infer TMessageIds, infer _TOptions>
? TMessageIds
- : unknown;
+ : T extends RuleCreateFunction<infer TMessageIds, infer _TOptions>
+ ? TMessageIds
+ : unknown;
export { InferOptionsTypeFromRule, InferMessageIdsTypeFromRule };
|
Run #16158 |
Run #16730 |
Run #16768 |
prettier/prettier#16768 VS prettier/prettier@main :: babel/babel@71c247a Diff (245 lines)diff --git ORI/babel/packages/babel-cli/src/babel/options.ts ALT/babel/packages/babel-cli/src/babel/options.ts
index 13e6a424..7b970a73 100644
--- ORI/babel/packages/babel-cli/src/babel/options.ts
+++ ALT/babel/packages/babel-cli/src/babel/options.ts
@@ -333,9 +333,9 @@ export default function parseArgv(args: Array<string>): CmdOptions | null {
// new options for @babel/core, we'll potentially get option validation errors from
// @babel/core. To avoid that, we delete undefined options, so @babel/core will only
// give the error if users actually pass an unsupported CLI option.
- for (const key of Object.keys(babelOptions) as Array<
- keyof typeof babelOptions
- >) {
+ for (
+ const key of Object.keys(babelOptions) as Array<keyof typeof babelOptions>
+ ) {
if (babelOptions[key] === undefined) {
delete babelOptions[key];
}
diff --git ORI/babel/packages/babel-compat-data/scripts/build-bugfixes-targets.js ALT/babel/packages/babel-compat-data/scripts/build-bugfixes-targets.js
index d91e7a45..760e4723 100644
--- ORI/babel/packages/babel-compat-data/scripts/build-bugfixes-targets.js
+++ ALT/babel/packages/babel-compat-data/scripts/build-bugfixes-targets.js
@@ -33,10 +33,12 @@ for (const [key, support] of Object.entries(dataWithBugfixes)) {
}
}
-for (const [filename, data] of [
- ["plugin-bugfixes", dataWithBugfixes],
- ["overlapping-plugins", overlapping],
-]) {
+for (
+ const [filename, data] of [
+ ["plugin-bugfixes", dataWithBugfixes],
+ ["overlapping-plugins", overlapping],
+ ]
+) {
const dataPath = path.join(__dirname, `../data/${filename}.json`);
if (!writeFile(maybeDefineLegacyPluginAliases(data), dataPath, filename)) {
diff --git ORI/babel/packages/babel-compat-data/scripts/utils-build-data.js ALT/babel/packages/babel-compat-data/scripts/utils-build-data.js
index 11a862a7..0d25e6e4 100644
--- ORI/babel/packages/babel-compat-data/scripts/utils-build-data.js
+++ ALT/babel/packages/babel-compat-data/scripts/utils-build-data.js
@@ -126,9 +126,9 @@ exports.generateData = (environments, features) => {
const overlapping = {};
// Apply bugfixes
- for (const [key, { features, replaces, overwrite }] of Object.entries(
- normalized
- )) {
+ for (
+ const [key, { features, replaces, overwrite }] of Object.entries(normalized)
+ ) {
if (replaces) {
if (normalized[replaces].replaces) {
throw new Error(`Transitive replacement is not supported (${key})`);
diff --git ORI/babel/packages/babel-helper-module-transforms/src/rewrite-live-references.ts ALT/babel/packages/babel-helper-module-transforms/src/rewrite-live-references.ts
index c6994033..711ba733 100644
--- ORI/babel/packages/babel-helper-module-transforms/src/rewrite-live-references.ts
+++ ALT/babel/packages/babel-helper-module-transforms/src/rewrite-live-references.ts
@@ -238,9 +238,9 @@ const rewriteBindingInitVisitor: Visitor<RewriteBindingInitVisitorState> = {
);
requeueInParent(decl.get("init"));
} else {
- for (const localName of Object.keys(
- decl.getOuterBindingIdentifiers(),
- )) {
+ for (
+ const localName of Object.keys(decl.getOuterBindingIdentifiers())
+ ) {
if (exported.has(localName)) {
const statement = expressionStatement(
// eslint-disable-next-line @typescript-eslint/no-use-before-define
diff --git ORI/babel/packages/babel-helper-plugin-utils/src/index.ts ALT/babel/packages/babel-helper-plugin-utils/src/index.ts
index 8dd3e762..bb618d0d 100644
--- ORI/babel/packages/babel-helper-plugin-utils/src/index.ts
+++ ALT/babel/packages/babel-helper-plugin-utils/src/index.ts
@@ -49,9 +49,9 @@ export function declare<State = {}, Option = {}>(
return (api, options: Option, dirname: string) => {
let clonedApi: PluginAPI;
- for (const name of Object.keys(
- apiPolyfills,
- ) as (keyof typeof apiPolyfills)[]) {
+ for (
+ const name of Object.keys(apiPolyfills) as (keyof typeof apiPolyfills)[]
+ ) {
if (api[name]) continue;
clonedApi ??= copyApiObject(api);
diff --git ORI/babel/packages/babel-node/src/_babel-node.ts ALT/babel/packages/babel-node/src/_babel-node.ts
index 340eb8c5..a80561a3 100644
--- ORI/babel/packages/babel-node/src/_babel-node.ts
+++ ALT/babel/packages/babel-node/src/_babel-node.ts
@@ -93,9 +93,9 @@ const babelOptions = {
babelrc: program.babelrc === true ? undefined : program.babelrc,
};
-for (const key of Object.keys(babelOptions) as Array<
- keyof typeof babelOptions
->) {
+for (
+ const key of Object.keys(babelOptions) as Array<keyof typeof babelOptions>
+) {
if (babelOptions[key] === undefined) {
delete babelOptions[key];
}
diff --git ORI/babel/packages/babel-parser/src/index.ts ALT/babel/packages/babel-parser/src/index.ts
index 508e8a36..c1c190cf 100644
--- ORI/babel/packages/babel-parser/src/index.ts
+++ ALT/babel/packages/babel-parser/src/index.ts
@@ -79,9 +79,11 @@ function generateExportedTokenTypes(
internalTokenTypes: InternalTokenTypes,
): Record<string, ExportedTokenType> {
const tokenTypes: Record<string, ExportedTokenType> = {};
- for (const typeName of Object.keys(
- internalTokenTypes,
- ) as (keyof InternalTokenTypes)[]) {
+ for (
+ const typeName of Object.keys(
+ internalTokenTypes,
+ ) as (keyof InternalTokenTypes)[]
+ ) {
tokenTypes[typeName] = getExportedToken(internalTokenTypes[typeName]);
}
return tokenTypes;
diff --git ORI/babel/packages/babel-parser/src/parser/base.ts ALT/babel/packages/babel-parser/src/parser/base.ts
index cad1df98..ccc6d3b0 100644
--- ORI/babel/packages/babel-parser/src/parser/base.ts
+++ ALT/babel/packages/babel-parser/src/parser/base.ts
@@ -50,9 +50,11 @@ export default class BaseParser {
return false;
}
const actualOptions = this.plugins.get(pluginName);
- for (const key of Object.keys(
- pluginOptions,
- ) as (keyof typeof pluginOptions)[]) {
+ for (
+ const key of Object.keys(
+ pluginOptions,
+ ) as (keyof typeof pluginOptions)[]
+ ) {
if (actualOptions?.[key] !== pluginOptions[key]) {
return false;
}
diff --git ORI/babel/packages/babel-plugin-proposal-destructuring-private/src/index.ts ALT/babel/packages/babel-plugin-proposal-destructuring-private/src/index.ts
index dce6e555..793a3870 100644
--- ORI/babel/packages/babel-plugin-proposal-destructuring-private/src/index.ts
+++ ALT/babel/packages/babel-plugin-proposal-destructuring-private/src/index.ts
@@ -137,17 +137,19 @@ export default declare(function ({ assertVersion, assumption, types: t }) {
}
const newDeclarations = [];
for (const declarator of declarations) {
- for (const { left, right } of transformPrivateKeyDestructuring(
- // @ts-expect-error The id of a variable declarator must not be a RestElement
- declarator.id,
- declarator.init,
- scope,
- /* isAssignment */ false,
- /* shouldPreserveCompletion */ false,
- name => state.addHelper(name),
- objectRestNoSymbols,
- /* useBuiltIns */ true,
- )) {
+ for (
+ const { left, right } of transformPrivateKeyDestructuring(
+ // @ts-expect-error The id of a variable declarator must not be a RestElement
+ declarator.id,
+ declarator.init,
+ scope,
+ /* isAssignment */ false,
+ /* shouldPreserveCompletion */ false,
+ name => state.addHelper(name),
+ objectRestNoSymbols,
+ /* useBuiltIns */ true,
+ )
+ ) {
newDeclarations.push(variableDeclarator(left, right));
}
}
@@ -162,17 +164,19 @@ export default declare(function ({ assertVersion, assumption, types: t }) {
const shouldPreserveCompletion =
(!isExpressionStatement(parent) && !isSequenceExpression(parent)) ||
path.isCompletionRecord();
- for (const { left, right } of transformPrivateKeyDestructuring(
- // @ts-expect-error The left of an assignment expression must not be a RestElement
- node.left,
- node.right,
- scope,
- /* isAssignment */ true,
- shouldPreserveCompletion,
- name => state.addHelper(name),
- objectRestNoSymbols,
- /* useBuiltIns */ true,
- )) {
+ for (
+ const { left, right } of transformPrivateKeyDestructuring(
+ // @ts-expect-error The left of an assignment expression must not be a RestElement
+ node.left,
+ node.right,
+ scope,
+ /* isAssignment */ true,
+ shouldPreserveCompletion,
+ name => state.addHelper(name),
+ objectRestNoSymbols,
+ /* useBuiltIns */ true,
+ )
+ ) {
assignments.push(assignmentExpression("=", left, right));
}
// preserve completion record
diff --git ORI/babel/packages/babel-plugin-transform-modules-systemjs/src/index.ts ALT/babel/packages/babel-plugin-transform-modules-systemjs/src/index.ts
index e34e2210..f98e50c3 100644
--- ORI/babel/packages/babel-plugin-transform-modules-systemjs/src/index.ts
+++ ALT/babel/packages/babel-plugin-transform-modules-systemjs/src/index.ts
@@ -488,9 +488,9 @@ export default declare<PluginState>((api, options: Options) => {
// because they must be hoisted
declar.kind = "var";
}
- for (const name of Object.keys(
- t.getBindingIdentifiers(declar),
- )) {
+ for (
+ const name of Object.keys(t.getBindingIdentifiers(declar))
+ ) {
addExportName(name, name);
}
}
diff --git ORI/babel/packages/babel-plugin-transform-typescript/src/index.ts ALT/babel/packages/babel-plugin-transform-typescript/src/index.ts
index e996c6f1..fc0ce24d 100644
--- ORI/babel/packages/babel-plugin-transform-typescript/src/index.ts
+++ ALT/babel/packages/babel-plugin-transform-typescript/src/index.ts
@@ -282,9 +282,11 @@ export default declare((api, opts: Options) => {
}
// remove type imports
- for (let stmt of path.get("body") as Iterable<
- NodePath<t.Statement | t.Expression>
- >) {
+ for (
+ let stmt of path.get("body") as Iterable<
+ NodePath<t.Statement | t.Expression>
+ >
+ ) {
if (stmt.isImportDeclaration()) {
if (!NEEDS_EXPLICIT_ESM.has(state.file.ast.program)) {
NEEDS_EXPLICIT_ESM.set(state.file.ast.program, true); |
prettier/prettier#16768 VS prettier/prettier@main :: mdn/content@7e059cd Diff (105 lines)diff --git ORI/content/files/en-us/web/api/performanceresourcetiming/servertiming/index.md ALT/content/files/en-us/web/api/performanceresourcetiming/servertiming/index.md
index 039197ee..328835c0 100644
--- ORI/content/files/en-us/web/api/performanceresourcetiming/servertiming/index.md
+++ ALT/content/files/en-us/web/api/performanceresourcetiming/servertiming/index.md
@@ -48,9 +48,9 @@ Example using {{domxref("Performance.getEntriesByType()")}}, which only shows `r
```js
for (const entryType of ["navigation", "resource"]) {
- for (const { name: url, serverTiming } of performance.getEntriesByType(
- entryType,
- )) {
+ for (
+ const { name: url, serverTiming } of performance.getEntriesByType(entryType)
+ ) {
if (serverTiming) {
for (const { name, duration } of serverTiming) {
console.log(`${url}: ${name} duration: ${duration}`);
diff --git ORI/content/files/en-us/web/api/performanceservertiming/description/index.md ALT/content/files/en-us/web/api/performanceservertiming/description/index.md
index 695a42cc..47b0cfae 100644
--- ORI/content/files/en-us/web/api/performanceservertiming/description/index.md
+++ ALT/content/files/en-us/web/api/performanceservertiming/description/index.md
@@ -51,9 +51,9 @@ Example using {{domxref("Performance.getEntriesByType()")}}, which only shows `n
```js
for (const entryType of ["navigation", "resource"]) {
- for (const { name: url, serverTiming } of performance.getEntriesByType(
- entryType,
- )) {
+ for (
+ const { name: url, serverTiming } of performance.getEntriesByType(entryType)
+ ) {
if (serverTiming) {
for (const { name, description, duration } of serverTiming) {
console.log(`${name} (${description}) duration: ${duration}`);
diff --git ORI/content/files/en-us/web/api/performanceservertiming/duration/index.md ALT/content/files/en-us/web/api/performanceservertiming/duration/index.md
index 8970198c..edf15903 100644
--- ORI/content/files/en-us/web/api/performanceservertiming/duration/index.md
+++ ALT/content/files/en-us/web/api/performanceservertiming/duration/index.md
@@ -49,9 +49,9 @@ Example using {{domxref("Performance.getEntriesByType()")}}, which only shows `n
```js
for (const entryType of ["navigation", "resource"]) {
- for (const { name: url, serverTiming } of performance.getEntriesByType(
- entryType,
- )) {
+ for (
+ const { name: url, serverTiming } of performance.getEntriesByType(entryType)
+ ) {
if (serverTiming) {
for (const { name, description, duration } of serverTiming) {
console.log(`${name} (${description}) duration: ${duration}`);
diff --git ORI/content/files/en-us/web/api/performanceservertiming/index.md ALT/content/files/en-us/web/api/performanceservertiming/index.md
index 118cb717..374bc246 100644
--- ORI/content/files/en-us/web/api/performanceservertiming/index.md
+++ ALT/content/files/en-us/web/api/performanceservertiming/index.md
@@ -77,9 +77,9 @@ Example using {{domxref("Performance.getEntriesByType()")}}, which only shows `n
```js
for (const entryType of ["navigation", "resource"]) {
- for (const { name: url, serverTiming } of performance.getEntriesByType(
- entryType,
- )) {
+ for (
+ const { name: url, serverTiming } of performance.getEntriesByType(entryType)
+ ) {
if (serverTiming) {
for (const { name, description, duration } of serverTiming) {
console.log(`${name} (${description}) duration: ${duration}`);
diff --git ORI/content/files/en-us/web/api/performanceservertiming/name/index.md ALT/content/files/en-us/web/api/performanceservertiming/name/index.md
index 2f587b18..ba448f46 100644
--- ORI/content/files/en-us/web/api/performanceservertiming/name/index.md
+++ ALT/content/files/en-us/web/api/performanceservertiming/name/index.md
@@ -50,9 +50,9 @@ Example using {{domxref("Performance.getEntriesByType()")}}, which only shows `n
```js
for (const entryType of ["navigation", "resource"]) {
- for (const { name: url, serverTiming } of performance.getEntriesByType(
- entryType,
- )) {
+ for (
+ const { name: url, serverTiming } of performance.getEntriesByType(entryType)
+ ) {
if (serverTiming) {
for (const { name, description, duration } of serverTiming) {
console.log(`${name} (${description}) duration: ${duration}`);
diff --git ORI/content/files/en-us/web/javascript/reference/operators/destructuring_assignment/index.md ALT/content/files/en-us/web/javascript/reference/operators/destructuring_assignment/index.md
index bed91b5b..9e636cff 100644
--- ORI/content/files/en-us/web/javascript/reference/operators/destructuring_assignment/index.md
+++ ALT/content/files/en-us/web/javascript/reference/operators/destructuring_assignment/index.md
@@ -545,10 +545,12 @@ const people = [
},
];
-for (const {
- name: n,
- family: { father: f },
-} of people) {
+for (
+ const {
+ name: n,
+ family: { father: f },
+ } of people
+) {
console.log(`Name: ${n}, Father: ${f}`);
}
|
prettier/prettier#16768 VS prettier/prettier@main :: vuejs/eslint-plugin-vue@cfad3ee Diff (1274 lines)diff --git ORI/eslint-plugin-vue/lib/rules/comment-directive.js ALT/eslint-plugin-vue/lib/rules/comment-directive.js
index 655e222..f5101dd 100644
--- ORI/eslint-plugin-vue/lib/rules/comment-directive.js
+++ ALT/eslint-plugin-vue/lib/rules/comment-directive.js
@@ -335,9 +335,11 @@ module.exports = {
}
if (documentFragment) {
// Send directives to the post-process.
- for (const comment of extractTopLevelDocumentFragmentComments(
- documentFragment
- )) {
+ for (
+ const comment of extractTopLevelDocumentFragmentComments(
+ documentFragment
+ )
+ ) {
processBlock(context, comment, reportUnusedDisableDirectives)
processLine(context, comment, reportUnusedDisableDirectives)
}
diff --git ORI/eslint-plugin-vue/lib/rules/multi-word-component-names.js ALT/eslint-plugin-vue/lib/rules/multi-word-component-names.js
index 60f70a9..ba0b01d 100644
--- ORI/eslint-plugin-vue/lib/rules/multi-word-component-names.js
+++ ALT/eslint-plugin-vue/lib/rules/multi-word-component-names.js
@@ -44,8 +44,9 @@ module.exports = {
const ignores = new Set()
ignores.add('App')
ignores.add('app')
- for (const ignore of (context.options[0] && context.options[0].ignores) ||
- []) {
+ for (
+ const ignore of (context.options[0] && context.options[0].ignores) || []
+ ) {
ignores.add(ignore)
if (casing.isPascalCase(ignore)) {
// PascalCase
diff --git ORI/eslint-plugin-vue/lib/rules/new-line-between-multi-line-property.js ALT/eslint-plugin-vue/lib/rules/new-line-between-multi-line-property.js
index 5481286..cdf5bd8 100644
--- ORI/eslint-plugin-vue/lib/rules/new-line-between-multi-line-property.js
+++ ALT/eslint-plugin-vue/lib/rules/new-line-between-multi-line-property.js
@@ -129,11 +129,9 @@ module.exports = {
fix(fixer) {
/** @type {Token|null} */
let preToken = null
- for (const token of iterateBetweenTokens(
- sourceCode,
- pre,
- cur
- )) {
+ for (
+ const token of iterateBetweenTokens(sourceCode, pre, cur)
+ ) {
if (
preToken &&
preToken.loc.end.line < token.loc.start.line
diff --git ORI/eslint-plugin-vue/lib/rules/no-async-in-computed-properties.js ALT/eslint-plugin-vue/lib/rules/no-async-in-computed-properties.js
index e8ed02f..ef02da2 100644
--- ORI/eslint-plugin-vue/lib/rules/no-async-in-computed-properties.js
+++ ALT/eslint-plugin-vue/lib/rules/no-async-in-computed-properties.js
@@ -263,11 +263,13 @@ module.exports = {
/** @param {Program} program */
Program(program) {
const tracker = new ReferenceTracker(utils.getScope(context, program))
- for (const { node } of utils.iterateReferencesTraceMap(tracker, {
- computed: {
- [ReferenceTracker.CALL]: true
- }
- })) {
+ for (
+ const { node } of utils.iterateReferencesTraceMap(tracker, {
+ computed: {
+ [ReferenceTracker.CALL]: true
+ }
+ })
+ ) {
if (node.type !== 'CallExpression') {
continue
}
diff --git ORI/eslint-plugin-vue/lib/rules/no-computed-properties-in-data.js ALT/eslint-plugin-vue/lib/rules/no-computed-properties-in-data.js
index a227394..36acb50 100644
--- ORI/eslint-plugin-vue/lib/rules/no-computed-properties-in-data.js
+++ ALT/eslint-plugin-vue/lib/rules/no-computed-properties-in-data.js
@@ -64,10 +64,12 @@ module.exports = {
return
}
const computedNames = new Set()
- for (const computed of utils.iterateProperties(
- node,
- new Set(['computed'])
- )) {
+ for (
+ const computed of utils.iterateProperties(
+ node,
+ new Set(['computed'])
+ )
+ ) {
computedNames.add(computed.name)
}
diff --git ORI/eslint-plugin-vue/lib/rules/no-lifecycle-after-await.js ALT/eslint-plugin-vue/lib/rules/no-lifecycle-after-await.js
index c695ae4..f6fdc13 100644
--- ORI/eslint-plugin-vue/lib/rules/no-lifecycle-after-await.js
+++ ALT/eslint-plugin-vue/lib/rules/no-lifecycle-after-await.js
@@ -71,10 +71,9 @@ module.exports = {
}
}
- for (const { node } of utils.iterateReferencesTraceMap(
- tracker,
- traceMap
- )) {
+ for (
+ const { node } of utils.iterateReferencesTraceMap(tracker, traceMap)
+ ) {
lifecycleHookCallNodes.add(node)
}
}
diff --git ORI/eslint-plugin-vue/lib/rules/no-mutating-props.js ALT/eslint-plugin-vue/lib/rules/no-mutating-props.js
index 3689d38..06e5783 100644
--- ORI/eslint-plugin-vue/lib/rules/no-mutating-props.js
+++ ALT/eslint-plugin-vue/lib/rules/no-mutating-props.js
@@ -341,10 +341,12 @@ module.exports = {
return
}
- for (const { node: prop, path } of iteratePatternProperties(
- target.parent.id,
- []
- )) {
+ for (
+ const { node: prop, path } of iteratePatternProperties(
+ target.parent.id,
+ []
+ )
+ ) {
if (path.length === 0) {
propsInfo.name = prop.name
} else {
@@ -391,10 +393,12 @@ module.exports = {
// cannot check
return
}
- for (const { node: prop, path } of iteratePatternProperties(
- propsParam,
- []
- )) {
+ for (
+ const { node: prop, path } of iteratePatternProperties(
+ propsParam,
+ []
+ )
+ ) {
verifyPropVariable(prop, path)
}
},
diff --git ORI/eslint-plugin-vue/lib/rules/no-restricted-class.js ALT/eslint-plugin-vue/lib/rules/no-restricted-class.js
index 41d30df..b69750c 100644
--- ORI/eslint-plugin-vue/lib/rules/no-restricted-class.js
+++ ALT/eslint-plugin-vue/lib/rules/no-restricted-class.js
@@ -152,9 +152,11 @@ module.exports = {
return
}
- for (const { className, reportNode } of extractClassNames(
- /** @type {Expression} */ (node.expression)
- )) {
+ for (
+ const { className, reportNode } of extractClassNames(
+ /** @type {Expression} */ (node.expression)
+ )
+ ) {
reportForbiddenClass(
className,
reportNode,
diff --git ORI/eslint-plugin-vue/lib/rules/no-side-effects-in-computed-properties.js ALT/eslint-plugin-vue/lib/rules/no-side-effects-in-computed-properties.js
index 36b0e87..766f245 100644
--- ORI/eslint-plugin-vue/lib/rules/no-side-effects-in-computed-properties.js
+++ ALT/eslint-plugin-vue/lib/rules/no-side-effects-in-computed-properties.js
@@ -184,11 +184,13 @@ module.exports = {
Program(program) {
const tracker = new ReferenceTracker(utils.getScope(context, program))
- for (const { node } of utils.iterateReferencesTraceMap(tracker, {
- computed: {
- [ReferenceTracker.CALL]: true
- }
- })) {
+ for (
+ const { node } of utils.iterateReferencesTraceMap(tracker, {
+ computed: {
+ [ReferenceTracker.CALL]: true
+ }
+ })
+ ) {
if (node.type !== 'CallExpression') {
continue
}
diff --git ORI/eslint-plugin-vue/lib/rules/no-undef-properties.js ALT/eslint-plugin-vue/lib/rules/no-undef-properties.js
index 06eda24..7048621 100644
--- ORI/eslint-plugin-vue/lib/rules/no-undef-properties.js
+++ ALT/eslint-plugin-vue/lib/rules/no-undef-properties.js
@@ -275,8 +275,9 @@ module.exports = {
const moduleScope = globalScope.childScopes.find(
(scope) => scope.type === 'module'
)
- for (const variable of (moduleScope && moduleScope.variables) ||
- []) {
+ for (
+ const variable of (moduleScope && moduleScope.variables) || []
+ ) {
ctx.defineProperties.set(variable.name, {})
}
}
@@ -334,18 +335,20 @@ module.exports = {
onVueObjectEnter(node) {
const ctx = getVueComponentContext(node)
- for (const prop of utils.iterateProperties(
- node,
- new Set([
- GROUP_PROPERTY,
- GROUP_ASYNC_DATA,
- GROUP_DATA,
- GROUP_COMPUTED_PROPERTY,
- GROUP_SETUP,
- GROUP_METHODS,
- GROUP_INJECT
- ])
- )) {
+ for (
+ const prop of utils.iterateProperties(
+ node,
+ new Set([
+ GROUP_PROPERTY,
+ GROUP_ASYNC_DATA,
+ GROUP_DATA,
+ GROUP_COMPUTED_PROPERTY,
+ GROUP_SETUP,
+ GROUP_METHODS,
+ GROUP_INJECT
+ ])
+ )
+ ) {
const propertyMap =
(prop.groupName === GROUP_DATA ||
prop.groupName === GROUP_ASYNC_DATA) &&
@@ -365,10 +368,12 @@ module.exports = {
})
}
- for (const watcherOrExpose of utils.iterateProperties(
- node,
- new Set([GROUP_WATCHER, GROUP_EXPOSE])
- )) {
+ for (
+ const watcherOrExpose of utils.iterateProperties(
+ node,
+ new Set([GROUP_WATCHER, GROUP_EXPOSE])
+ )
+ ) {
if (watcherOrExpose.groupName === GROUP_WATCHER) {
const watcher = watcherOrExpose
// Process `watch: { foo /* <- this */ () {} }`
@@ -382,9 +387,11 @@ module.exports = {
if (watcher.type === 'object') {
const property = watcher.property
if (property.kind === 'init') {
- for (const handlerValueNode of utils.iterateWatchHandlerValues(
- property
- )) {
+ for (
+ const handlerValueNode of utils.iterateWatchHandlerValues(
+ property
+ )
+ ) {
ctx.verifyReferences(
propertyReferenceExtractor.extractFromNameLiteral(
handlerValueNode
diff --git ORI/eslint-plugin-vue/lib/rules/no-unused-properties.js ALT/eslint-plugin-vue/lib/rules/no-unused-properties.js
index b15cf5a..d4ac0c8 100644
--- ORI/eslint-plugin-vue/lib/rules/no-unused-properties.js
+++ ALT/eslint-plugin-vue/lib/rules/no-unused-properties.js
@@ -556,10 +556,12 @@ module.exports = {
onVueObjectEnter(node, vueNode) {
const container = getVueComponentPropertiesContainer(vueNode.node)
- for (const watcherOrExpose of utils.iterateProperties(
- node,
- new Set([GROUP_WATCHER, GROUP_EXPOSE])
- )) {
+ for (
+ const watcherOrExpose of utils.iterateProperties(
+ node,
+ new Set([GROUP_WATCHER, GROUP_EXPOSE])
+ )
+ ) {
if (watcherOrExpose.groupName === GROUP_WATCHER) {
const watcher = watcherOrExpose
// Process `watch: { foo /* <- this */ () {} }`
@@ -574,9 +576,11 @@ module.exports = {
if (watcher.type === 'object') {
const property = watcher.property
if (property.kind === 'init') {
- for (const handlerValueNode of utils.iterateWatchHandlerValues(
- property
- )) {
+ for (
+ const handlerValueNode of utils.iterateWatchHandlerValues(
+ property
+ )
+ ) {
container.propertyReferences.push(
propertyReferenceExtractor.extractFromNameLiteral(
handlerValueNode
diff --git ORI/eslint-plugin-vue/lib/rules/no-unused-refs.js ALT/eslint-plugin-vue/lib/rules/no-unused-refs.js
index 9033d9c..3e26ebc 100644
--- ORI/eslint-plugin-vue/lib/rules/no-unused-refs.js
+++ ALT/eslint-plugin-vue/lib/rules/no-unused-refs.js
@@ -207,10 +207,9 @@ module.exports = {
: {},
utils.defineVueVisitor(context, {
onVueObjectEnter(node) {
- for (const prop of utils.iterateProperties(
- node,
- new Set(['setup'])
- )) {
+ for (
+ const prop of utils.iterateProperties(node, new Set(['setup']))
+ ) {
usedRefs.add(prop.name)
}
}
diff --git ORI/eslint-plugin-vue/lib/rules/no-use-computed-property-like-method.js ALT/eslint-plugin-vue/lib/rules/no-use-computed-property-like-method.js
index 6e89ad2..35dfb44 100644
--- ORI/eslint-plugin-vue/lib/rules/no-use-computed-property-like-method.js
+++ ALT/eslint-plugin-vue/lib/rules/no-use-computed-property-like-method.js
@@ -592,9 +592,11 @@ module.exports = {
if (!templateComponent) {
return
}
- for (const id of node.references
- .filter((ref) => ref.variable == null)
- .map((ref) => ref.id)) {
+ for (
+ const id of node.references
+ .filter((ref) => ref.variable == null)
+ .map((ref) => ref.id)
+ ) {
if (
id.parent.type !== 'CallExpression' ||
id.parent.callee !== id
diff --git ORI/eslint-plugin-vue/lib/rules/no-watch-after-await.js ALT/eslint-plugin-vue/lib/rules/no-watch-after-await.js
index 7c4e852..79329a3 100644
--- ORI/eslint-plugin-vue/lib/rules/no-watch-after-await.js
+++ ALT/eslint-plugin-vue/lib/rules/no-watch-after-await.js
@@ -79,14 +79,16 @@ module.exports = {
Program(program) {
const tracker = new ReferenceTracker(utils.getScope(context, program))
- for (const { node } of utils.iterateReferencesTraceMap(tracker, {
- watch: {
- [ReferenceTracker.CALL]: true
- },
- watchEffect: {
- [ReferenceTracker.CALL]: true
- }
- })) {
+ for (
+ const { node } of utils.iterateReferencesTraceMap(tracker, {
+ watch: {
+ [ReferenceTracker.CALL]: true
+ },
+ watchEffect: {
+ [ReferenceTracker.CALL]: true
+ }
+ })
+ ) {
watchCallNodes.add(node)
}
}
diff --git ORI/eslint-plugin-vue/lib/rules/quote-props.js ALT/eslint-plugin-vue/lib/rules/quote-props.js
index ded792e..137095c 100644
--- ORI/eslint-plugin-vue/lib/rules/quote-props.js
+++ ALT/eslint-plugin-vue/lib/rules/quote-props.js
@@ -35,9 +35,9 @@ module.exports = wrapStylisticOrCoreRule('quote-props', {
context.report({
...descriptor,
*fix(fixer) {
- for (const fix of flatten(
- descriptor.fix && descriptor.fix(fixer)
- )) {
+ for (
+ const fix of flatten(descriptor.fix && descriptor.fix(fixer))
+ ) {
yield fixer.replaceTextRange(
fix.range,
fix.text.replace(/["']/gu, expectedQuote)
diff --git ORI/eslint-plugin-vue/lib/rules/return-in-computed-property.js ALT/eslint-plugin-vue/lib/rules/return-in-computed-property.js
index 0728d0c..9c53386 100644
--- ORI/eslint-plugin-vue/lib/rules/return-in-computed-property.js
+++ ALT/eslint-plugin-vue/lib/rules/return-in-computed-property.js
@@ -63,10 +63,9 @@ module.exports = {
}
}
- for (const { node } of utils.iterateReferencesTraceMap(
- tracker,
- map
- )) {
+ for (
+ const { node } of utils.iterateReferencesTraceMap(tracker, map)
+ ) {
if (node.type !== 'CallExpression') {
continue
}
diff --git ORI/eslint-plugin-vue/lib/rules/script-setup-uses-vars.js ALT/eslint-plugin-vue/lib/rules/script-setup-uses-vars.js
index 703d0cb..ef0827d 100644
--- ORI/eslint-plugin-vue/lib/rules/script-setup-uses-vars.js
+++ ALT/eslint-plugin-vue/lib/rules/script-setup-uses-vars.js
@@ -86,9 +86,9 @@ module.exports = {
context,
{
VExpressionContainer(node) {
- for (const ref of node.references.filter(
- (ref) => ref.variable == null
- )) {
+ for (
+ const ref of node.references.filter((ref) => ref.variable == null)
+ ) {
markVariableAsUsed(ref.id.name)
}
},
diff --git ORI/eslint-plugin-vue/lib/rules/v-on-function-call.js ALT/eslint-plugin-vue/lib/rules/v-on-function-call.js
index efd5b6f..6084b7d 100644
--- ORI/eslint-plugin-vue/lib/rules/v-on-function-call.js
+++ ALT/eslint-plugin-vue/lib/rules/v-on-function-call.js
@@ -179,10 +179,9 @@ module.exports = {
},
utils.defineVueVisitor(context, {
onVueObjectEnter(node) {
- for (const method of utils.iterateProperties(
- node,
- new Set(['methods'])
- )) {
+ for (
+ const method of utils.iterateProperties(node, new Set(['methods']))
+ ) {
if (useArgsMethods.has(method.name)) {
continue
}
diff --git ORI/eslint-plugin-vue/lib/rules/v-on-handler-style.js ALT/eslint-plugin-vue/lib/rules/v-on-handler-style.js
index 10ff9b6..429538d 100644
--- ORI/eslint-plugin-vue/lib/rules/v-on-handler-style.js
+++ ALT/eslint-plugin-vue/lib/rules/v-on-handler-style.js
@@ -558,10 +558,12 @@ module.exports = {
// converting from `v-on:click="() => foo()"` to `v-on:click="foo"`.
utils.defineVueVisitor(context, {
onVueObjectEnter(node) {
- for (const method of utils.iterateProperties(
- node,
- new Set(['methods'])
- )) {
+ for (
+ const method of utils.iterateProperties(
+ node,
+ new Set(['methods'])
+ )
+ ) {
if (method.type !== 'object') {
// This branch is usually not passed.
continue
diff --git ORI/eslint-plugin-vue/lib/rules/valid-define-options.js ALT/eslint-plugin-vue/lib/rules/valid-define-options.js
index 52f1b84..08bf16a 100644
--- ORI/eslint-plugin-vue/lib/rules/valid-define-options.js
+++ ALT/eslint-plugin-vue/lib/rules/valid-define-options.js
@@ -49,12 +49,14 @@ module.exports = {
if (node.arguments.length > 0) {
const define = node.arguments[0]
if (define.type === 'ObjectExpression') {
- for (const [propName, insteadMacro] of [
- ['props', 'defineProps'],
- ['emits', 'defineEmits'],
- ['expose', 'defineExpose'],
- ['slots', 'defineSlots']
- ]) {
+ for (
+ const [propName, insteadMacro] of [
+ ['props', 'defineProps'],
+ ['emits', 'defineEmits'],
+ ['expose', 'defineExpose'],
+ ['slots', 'defineSlots']
+ ]
+ ) {
const prop = utils.findProperty(define, propName)
if (prop) {
context.report({
diff --git ORI/eslint-plugin-vue/lib/utils/indent-common.js ALT/eslint-plugin-vue/lib/utils/indent-common.js
index bacf43e..e9292af 100644
--- ORI/eslint-plugin-vue/lib/utils/indent-common.js
+++ ALT/eslint-plugin-vue/lib/utils/indent-common.js
@@ -1183,11 +1183,13 @@ module.exports.defineVisitor = function create(
setOffset(tokenStore.getFirstToken(typeArguments), 1, firstToken)
}
- for (const optionalToken of tokenStore.getTokensBetween(
- tokenStore.getLastToken(typeArguments || node.callee),
- leftToken,
- isOptionalToken
- )) {
+ for (
+ const optionalToken of tokenStore.getTokensBetween(
+ tokenStore.getLastToken(typeArguments || node.callee),
+ leftToken,
+ isOptionalToken
+ )
+ ) {
setOffset(optionalToken, 1, firstToken)
}
@@ -1571,10 +1573,12 @@ module.exports.defineVisitor = function create(
)
)
processNodeList(namedSpecifiers, leftBrace, rightBrace, 1)
- for (const token of [
- ...tokenStore.getTokensBetween(leftBrace, rightBrace),
- rightBrace
- ]) {
+ for (
+ const token of [
+ ...tokenStore.getTokensBetween(leftBrace, rightBrace),
+ rightBrace
+ ]
+ ) {
const i = beforeTokens.indexOf(token)
if (i >= 0) {
beforeTokens.splice(i, 1)
@@ -1641,11 +1645,13 @@ module.exports.defineVisitor = function create(
isClosingBracketToken
)
- for (const optionalToken of tokenStore.getTokensBetween(
- tokenStore.getLastToken(node.object),
- leftBracketToken,
- isOptionalToken
- )) {
+ for (
+ const optionalToken of tokenStore.getTokensBetween(
+ tokenStore.getLastToken(node.object),
+ leftBracketToken,
+ isOptionalToken
+ )
+ ) {
setOffset(optionalToken, 1, objectToken)
}
@@ -2004,10 +2010,12 @@ module.exports.defineVisitor = function create(
}
for (const key of Object.keys(visitor)) {
- for (const nodeName of key
- .split(/\s*,\s*/gu)
- .map((s) => s.trim())
- .filter((s) => /[a-z]+/i.test(s))) {
+ for (
+ const nodeName of key
+ .split(/\s*,\s*/gu)
+ .map((s) => s.trim())
+ .filter((s) => /[a-z]+/i.test(s))
+ ) {
knownNodes.add(nodeName)
}
}
diff --git ORI/eslint-plugin-vue/lib/utils/property-references.js ALT/eslint-plugin-vue/lib/utils/property-references.js
index 57fe599..5f0eb7a 100644
--- ORI/eslint-plugin-vue/lib/utils/property-references.js
+++ ALT/eslint-plugin-vue/lib/utils/property-references.js
@@ -119,21 +119,25 @@ function definePropertyReferenceExtractor(
context.getSourceCode().scopeManager.scopes[0]
)
const toRefNodes = new Set()
- for (const { node } of utils.iterateReferencesTraceMap(tracker, {
- [eslintUtils.ReferenceTracker.ESM]: true,
- toRef: {
- [eslintUtils.ReferenceTracker.CALL]: true
- }
- })) {
+ for (
+ const { node } of utils.iterateReferencesTraceMap(tracker, {
+ [eslintUtils.ReferenceTracker.ESM]: true,
+ toRef: {
+ [eslintUtils.ReferenceTracker.CALL]: true
+ }
+ })
+ ) {
toRefNodes.add(node)
}
const toRefsNodes = new Set()
- for (const { node } of utils.iterateReferencesTraceMap(tracker, {
- [eslintUtils.ReferenceTracker.ESM]: true,
- toRefs: {
- [eslintUtils.ReferenceTracker.CALL]: true
- }
- })) {
+ for (
+ const { node } of utils.iterateReferencesTraceMap(tracker, {
+ [eslintUtils.ReferenceTracker.ESM]: true,
+ toRefs: {
+ [eslintUtils.ReferenceTracker.CALL]: true
+ }
+ })
+ ) {
toRefsNodes.add(node)
}
@@ -655,9 +659,11 @@ function definePropertyReferenceExtractor(
}
/** @type {IPropertyReferences[]} */
const references = []
- for (const id of node.references
- .filter((ref) => ref.variable == null)
- .map((ref) => ref.id)) {
+ for (
+ const id of node.references
+ .filter((ref) => ref.variable == null)
+ .map((ref) => ref.id)
+ ) {
if (ignoreRef(id.name)) {
continue
}
diff --git ORI/eslint-plugin-vue/lib/utils/ref-object-references.js ALT/eslint-plugin-vue/lib/utils/ref-object-references.js
index fe6f261..b3464d7 100644
--- ORI/eslint-plugin-vue/lib/utils/ref-object-references.js
+++ ALT/eslint-plugin-vue/lib/utils/ref-object-references.js
@@ -82,26 +82,28 @@ const cacheForReactiveVariableReferences = new WeakMap()
*/
function* iterateDefineRefs(globalScope) {
const tracker = new ReferenceTracker(globalScope)
- for (const { node, path } of utils.iterateReferencesTraceMap(tracker, {
- ref: {
- [ReferenceTracker.CALL]: true
- },
- computed: {
- [ReferenceTracker.CALL]: true
- },
- toRef: {
- [ReferenceTracker.CALL]: true
- },
- customRef: {
- [ReferenceTracker.CALL]: true
- },
- shallowRef: {
- [ReferenceTracker.CALL]: true
- },
- toRefs: {
- [ReferenceTracker.CALL]: true
- }
- })) {
+ for (
+ const { node, path } of utils.iterateReferencesTraceMap(tracker, {
+ ref: {
+ [ReferenceTracker.CALL]: true
+ },
+ computed: {
+ [ReferenceTracker.CALL]: true
+ },
+ toRef: {
+ [ReferenceTracker.CALL]: true
+ },
+ customRef: {
+ [ReferenceTracker.CALL]: true
+ },
+ shallowRef: {
+ [ReferenceTracker.CALL]: true
+ },
+ toRefs: {
+ [ReferenceTracker.CALL]: true
+ }
+ })
+ ) {
const expr = /** @type {CallExpression} */ (node)
yield {
node: expr,
@@ -496,10 +498,12 @@ class RefObjectReferenceExtractor {
}
this._processedIds.add(node)
- for (const reference of iterateIdentifierReferences(
- node,
- getGlobalScope(this.context)
- )) {
+ for (
+ const reference of iterateIdentifierReferences(
+ node,
+ getGlobalScope(this.context)
+ )
+ ) {
const def =
reference.resolved &&
reference.resolved.defs.length === 1 &&
@@ -615,10 +619,12 @@ class ReactiveVariableReferenceExtractor {
}
this._processedIds.add(node)
- for (const reference of iterateIdentifierReferences(
- node,
- getGlobalScope(this.context)
- )) {
+ for (
+ const reference of iterateIdentifierReferences(
+ node,
+ getGlobalScope(this.context)
+ )
+ ) {
const def =
reference.resolved &&
reference.resolved.defs.length === 1 &&
@@ -690,9 +696,11 @@ function extractReactiveVariableReferences(context) {
const references = new ReactiveVariableReferenceExtractor(context)
- for (const { node, name } of iterateDefineReactiveVariables(
- getGlobalScope(context)
- )) {
+ for (
+ const { node, name } of iterateDefineReactiveVariables(
+ getGlobalScope(context)
+ )
+ ) {
references.processDefineReactiveVariable(node, name)
}
diff --git ORI/eslint-plugin-vue/lib/utils/style-variables/index.js ALT/eslint-plugin-vue/lib/utils/style-variables/index.js
index 651d06e..4b86cc3 100644
--- ORI/eslint-plugin-vue/lib/utils/style-variables/index.js
+++ ALT/eslint-plugin-vue/lib/utils/style-variables/index.js
@@ -16,9 +16,9 @@ class StyleVariablesContext {
for (const node of style.children) {
if (node.type === 'VExpressionContainer') {
this.vBinds.push(node)
- for (const ref of node.references.filter(
- (ref) => ref.variable == null
- )) {
+ for (
+ const ref of node.references.filter((ref) => ref.variable == null)
+ ) {
this.references.push(ref)
}
}
diff --git ORI/eslint-plugin-vue/lib/utils/ts-utils/index.js ALT/eslint-plugin-vue/lib/utils/ts-utils/index.js
index 8b6c53b..59fade0 100644
--- ORI/eslint-plugin-vue/lib/utils/ts-utils/index.js
+++ ALT/eslint-plugin-vue/lib/utils/ts-utils/index.js
@@ -39,10 +39,12 @@ module.exports = {
function getComponentPropsFromTypeDefine(context, propsNode) {
/** @type {(ComponentTypeProp|ComponentInferTypeProp|ComponentUnknownProp)[]} */
const result = []
- for (const defNode of flattenTypeNodes(
- context,
- /** @type {TSESTreeTypeNode} */ (propsNode)
- )) {
+ for (
+ const defNode of flattenTypeNodes(
+ context,
+ /** @type {TSESTreeTypeNode} */ (propsNode)
+ )
+ ) {
if (isTSInterfaceBody(defNode) || isTSTypeLiteral(defNode)) {
result.push(...extractRuntimeProps(context, defNode))
} else {
@@ -66,10 +68,12 @@ function getComponentPropsFromTypeDefine(context, propsNode) {
function getComponentEmitsFromTypeDefine(context, emitsNode) {
/** @type {(ComponentTypeEmit|ComponentInferTypeEmit|ComponentUnknownEmit)[]} */
const result = []
- for (const defNode of flattenTypeNodes(
- context,
- /** @type {TSESTreeTypeNode} */ (emitsNode)
- )) {
+ for (
+ const defNode of flattenTypeNodes(
+ context,
+ /** @type {TSESTreeTypeNode} */ (emitsNode)
+ )
+ ) {
if (
isTSInterfaceBody(defNode) ||
isTSTypeLiteralOrTSFunctionType(defNode)
diff --git ORI/eslint-plugin-vue/lib/utils/ts-utils/ts-ast.js ALT/eslint-plugin-vue/lib/utils/ts-utils/ts-ast.js
index ddbb9de..a057125 100644
--- ORI/eslint-plugin-vue/lib/utils/ts-utils/ts-ast.js
+++ ALT/eslint-plugin-vue/lib/utils/ts-utils/ts-ast.js
@@ -396,12 +396,14 @@ function inferRuntimeType(context, node, checked = new Set()) {
return inferEnumType(context, defNode)
}
}
- for (const name of [
- node.typeName.name,
- ...(node.typeName.name.startsWith('Readonly')
- ? [node.typeName.name.slice(8)]
- : [])
- ]) {
+ for (
+ const name of [
+ node.typeName.name,
+ ...(node.typeName.name.startsWith('Readonly')
+ ? [node.typeName.name.slice(8)]
+ : [])
+ ]
+ ) {
switch (name) {
case 'Array':
case 'Function':
@@ -555,10 +557,12 @@ function inferEnumType(context, node) {
}
}
} else {
- for (const type of inferRuntimeTypeFromTypeNode(
- context,
- /** @type {Expression} */ (m.initializer)
- )) {
+ for (
+ const type of inferRuntimeTypeFromTypeNode(
+ context,
+ /** @type {Expression} */ (m.initializer)
+ )
+ ) {
types.add(type)
}
}
diff --git ORI/eslint-plugin-vue/tests/lib/utils/ref-object-references.js ALT/eslint-plugin-vue/tests/lib/utils/ref-object-references.js
index 68c526b..ab907b7 100644
--- ORI/eslint-plugin-vue/tests/lib/utils/ref-object-references.js
+++ ALT/eslint-plugin-vue/tests/lib/utils/ref-object-references.js
@@ -35,14 +35,16 @@ const REACTIVE_VARS_FIXTURE_ROOT = path.resolve(FIXTURE_ROOT, 'reactive-vars')
*/
function loadPatterns(rootDir) {
return fs.readdirSync(rootDir).map((name) => {
- for (const [sourceFile, resultFile, options] of [
- ['source.js', 'result.js'],
- [
- 'source.vue',
- 'result.vue',
- { languageOptions: { parser: 'vue-eslint-parser' } }
+ for (
+ const [sourceFile, resultFile, options] of [
+ ['source.js', 'result.js'],
+ [
+ 'source.vue',
+ 'result.vue',
+ { languageOptions: { parser: 'vue-eslint-parser' } }
+ ]
]
- ]) {
+ ) {
const sourceFilePath = path.join(rootDir, name, sourceFile)
if (fs.existsSync(sourceFilePath)) {
return {
@@ -123,9 +125,11 @@ function extractRefs(code, extract, options) {
}
describe('extractRefObjectReferences()', () => {
- for (const { code, sourceFilePath, resultFilePath, options } of loadPatterns(
- REF_OBJECTS_FIXTURE_ROOT
- )) {
+ for (
+ const { code, sourceFilePath, resultFilePath, options } of loadPatterns(
+ REF_OBJECTS_FIXTURE_ROOT
+ )
+ ) {
describe(sourceFilePath, () => {
it('should to extract the references to match the expected references.', () => {
/** @type {import('../../../lib/utils/ref-object-references').RefObjectReference[]} */
@@ -162,9 +166,11 @@ describe('extractRefObjectReferences()', () => {
}
})
describe('extractReactiveVariableReferences()', () => {
- for (const { code, sourceFilePath, resultFilePath, options } of loadPatterns(
- REACTIVE_VARS_FIXTURE_ROOT
- )) {
+ for (
+ const { code, sourceFilePath, resultFilePath, options } of loadPatterns(
+ REACTIVE_VARS_FIXTURE_ROOT
+ )
+ ) {
describe(sourceFilePath, () => {
it('should to extract the references to match the expected references.', () => {
/** @type {import('../../../lib/utils/ref-object-references').ReactiveVariableReference[]} */
diff --git ORI/eslint-plugin-vue/tests/lib/utils/ts-utils/index/get-component-emits.js ALT/eslint-plugin-vue/tests/lib/utils/ts-utils/index/get-component-emits.js
index 8c9d5d3..ab290ac 100644
--- ORI/eslint-plugin-vue/tests/lib/utils/ts-utils/index/get-component-emits.js
+++ ALT/eslint-plugin-vue/tests/lib/utils/ts-utils/index/get-component-emits.js
@@ -69,50 +69,52 @@ function extractComponentProps(code, tsFileCode) {
}
describe('getComponentEmitsFromTypeDefineTypes', () => {
- for (const { scriptCode, tsFileCode, props: expected } of [
- {
- scriptCode: `defineEmits<{(e:'foo'):void,(e:'bar'):void}>()`,
- props: [
- { type: 'type', name: 'foo' },
- { type: 'type', name: 'bar' }
- ]
- },
- {
- tsFileCode: `export type Emits = {(e:'foo'):void,(e:'bar'):void}`,
- scriptCode: `import { Emits } from './test'
+ for (
+ const { scriptCode, tsFileCode, props: expected } of [
+ {
+ scriptCode: `defineEmits<{(e:'foo'):void,(e:'bar'):void}>()`,
+ props: [
+ { type: 'type', name: 'foo' },
+ { type: 'type', name: 'bar' }
+ ]
+ },
+ {
+ tsFileCode: `export type Emits = {(e:'foo'):void,(e:'bar'):void}`,
+ scriptCode: `import { Emits } from './test'
defineEmits<Emits>()`,
- props: [
- { type: 'infer-type', name: 'foo' },
- { type: 'infer-type', name: 'bar' }
- ]
- },
- {
- tsFileCode: `export type Emits = any`,
- scriptCode: `import { Emits } from './test'
+ props: [
+ { type: 'infer-type', name: 'foo' },
+ { type: 'infer-type', name: 'bar' }
+ ]
+ },
+ {
+ tsFileCode: `export type Emits = any`,
+ scriptCode: `import { Emits } from './test'
defineEmits<Emits>()`,
- props: [{ type: 'unknown', name: null }]
- },
- {
- tsFileCode: `export type Emits = {(e:'foo' | 'bar'): void, (e:'baz',payload:number): void}`,
- scriptCode: `import { Emits } from './test'
+ props: [{ type: 'unknown', name: null }]
+ },
+ {
+ tsFileCode: `export type Emits = {(e:'foo' | 'bar'): void, (e:'baz',payload:number): void}`,
+ scriptCode: `import { Emits } from './test'
defineEmits<Emits>()`,
- props: [
- { type: 'infer-type', name: 'foo' },
- { type: 'infer-type', name: 'bar' },
- { type: 'infer-type', name: 'baz' }
- ]
- },
- {
- tsFileCode: `export type Emits = { a: [], b: [number], c: [string]}`,
- scriptCode: `import { Emits } from './test'
+ props: [
+ { type: 'infer-type', name: 'foo' },
+ { type: 'infer-type', name: 'bar' },
+ { type: 'infer-type', name: 'baz' }
+ ]
+ },
+ {
+ tsFileCode: `export type Emits = { a: [], b: [number], c: [string]}`,
+ scriptCode: `import { Emits } from './test'
defineEmits<Emits>()`,
- props: [
- { type: 'infer-type', name: 'a' },
- { type: 'infer-type', name: 'b' },
- { type: 'infer-type', name: 'c' }
- ]
- }
- ]) {
+ props: [
+ { type: 'infer-type', name: 'a' },
+ { type: 'infer-type', name: 'b' },
+ { type: 'infer-type', name: 'c' }
+ ]
+ }
+ ]
+ ) {
const code = `<script setup lang="ts"> ${scriptCode} </script>`
it(`should return expected props with :${code}`, () => {
const props = extractComponentProps(code, tsFileCode)
diff --git ORI/eslint-plugin-vue/tests/lib/utils/ts-utils/index/get-component-props.js ALT/eslint-plugin-vue/tests/lib/utils/ts-utils/index/get-component-props.js
index 100d0a1..de17c0e 100644
--- ORI/eslint-plugin-vue/tests/lib/utils/ts-utils/index/get-component-props.js
+++ ALT/eslint-plugin-vue/tests/lib/utils/ts-utils/index/get-component-props.js
@@ -71,44 +71,55 @@ function extractComponentProps(code, tsFileCode) {
}
describe('getComponentPropsFromTypeDefineTypes', () => {
- for (const { scriptCode, tsFileCode, props: expected } of [
- {
- scriptCode: `defineProps<{foo:string,bar?:number}>()`,
- props: [
- { type: 'type', name: 'foo', required: true, types: ['String'] },
- { type: 'type', name: 'bar', required: false, types: ['Number'] }
- ]
- },
- {
- scriptCode: `defineProps<{foo:string,bar?:number} & {baz?:string|number}>()`,
- props: [
- { type: 'type', name: 'foo', required: true, types: ['String'] },
- { type: 'type', name: 'bar', required: false, types: ['Number'] },
- {
- type: 'type',
- name: 'baz',
- required: false,
- types: ['String', 'Number']
- }
- ]
- },
- {
- tsFileCode: `export type Props = {foo:string,bar?:number}`,
- scriptCode: `import { Props } from './test'
+ for (
+ const { scriptCode, tsFileCode, props: expected } of [
+ {
+ scriptCode: `defineProps<{foo:string,bar?:number}>()`,
+ props: [
+ { type: 'type', name: 'foo', required: true, types: ['String'] },
+ { type: 'type', name: 'bar', required: false, types: ['Number'] }
+ ]
+ },
+ {
+ scriptCode: `defineProps<{foo:string,bar?:number} & {baz?:string|number}>()`,
+ props: [
+ { type: 'type', name: 'foo', required: true, types: ['String'] },
+ { type: 'type', name: 'bar', required: false, types: ['Number'] },
+ {
+ type: 'type',
+ name: 'baz',
+ required: false,
+ types: ['String', 'Number']
+ }
+ ]
+ },
+ {
+ tsFileCode: `export type Props = {foo:string,bar?:number}`,
+ scriptCode: `import { Props } from './test'
defineProps<Props>()`,
- props: [
- { type: 'infer-type', name: 'foo', required: true, types: ['String'] },
- { type: 'infer-type', name: 'bar', required: false, types: ['Number'] }
- ]
- },
- {
- tsFileCode: `export type Props = any`,
- scriptCode: `import { Props } from './test'
+ props: [
+ {
+ type: 'infer-type',
+ name: 'foo',
+ required: true,
+ types: ['String']
+ },
+ {
+ type: 'infer-type',
+ name: 'bar',
+ required: false,
+ types: ['Number']
+ }
+ ]
+ },
+ {
+ tsFileCode: `export type Props = any`,
+ scriptCode: `import { Props } from './test'
defineProps<Props>()`,
- props: [{ type: 'unknown', name: null, required: null, types: null }]
- },
- {
- tsFileCode: `
+ props: [{ type: 'unknown', name: null, required: null, types: null }]
+ },
+ {
+ tsFileCode: `
interface Props {
a?: number;
b?: string;
@@ -116,16 +127,21 @@ describe('getComponentPropsFromTypeDefineTypes', () => {
export interface Props2 extends Required<Props> {
c?: boolean;
}`,
- scriptCode: `import { Props2 } from './test'
+ scriptCode: `import { Props2 } from './test'
defineProps<Props2>()`,
- props: [
- { type: 'infer-type', name: 'c', required: false, types: ['Boolean'] },
- { type: 'infer-type', name: 'a', required: true, types: ['Number'] },
- { type: 'infer-type', name: 'b', required: true, types: ['String'] }
- ]
- },
- {
- tsFileCode: `
+ props: [
+ {
+ type: 'infer-type',
+ name: 'c',
+ required: false,
+ types: ['Boolean']
+ },
+ { type: 'infer-type', name: 'a', required: true, types: ['Number'] },
+ { type: 'infer-type', name: 'b', required: true, types: ['String'] }
+ ]
+ },
+ {
+ tsFileCode: `
export type Props = {
a: string
b?: number
@@ -137,73 +153,91 @@ describe('getComponentPropsFromTypeDefineTypes', () => {
h?: string[]
i?: readonly string[]
}`,
- scriptCode: `import { Props } from './test'
+ scriptCode: `import { Props } from './test'
defineProps<Props>()`,
- props: [
- { type: 'infer-type', name: 'a', required: true, types: ['String'] },
- { type: 'infer-type', name: 'b', required: false, types: ['Number'] },
- { type: 'infer-type', name: 'c', required: false, types: ['Boolean'] },
- { type: 'infer-type', name: 'd', required: false, types: ['Boolean'] },
- {
- type: 'infer-type',
- name: 'e',
- required: false,
- types: ['String', 'Number']
- },
- { type: 'infer-type', name: 'f', required: false, types: ['Function'] },
- { type: 'infer-type', name: 'g', required: false, types: ['Object'] },
- { type: 'infer-type', name: 'h', required: false, types: ['Array'] },
- { type: 'infer-type', name: 'i', required: false, types: ['Array'] }
- ]
- },
- {
- tsFileCode: `
+ props: [
+ { type: 'infer-type', name: 'a', required: true, types: ['String'] },
+ { type: 'infer-type', name: 'b', required: false, types: ['Number'] },
+ {
+ type: 'infer-type',
+ name: 'c',
+ required: false,
+ types: ['Boolean']
+ },
+ {
+ type: 'infer-type',
+ name: 'd',
+ required: false,
+ types: ['Boolean']
+ },
+ {
+ type: 'infer-type',
+ name: 'e',
+ required: false,
+ types: ['String', 'Number']
+ },
+ {
+ type: 'infer-type',
+ name: 'f',
+ required: false,
+ types: ['Function']
+ },
+ { type: 'infer-type', name: 'g', required: false, types: ['Object'] },
+ { type: 'infer-type', name: 'h', required: false, types: ['Array'] },
+ { type: 'infer-type', name: 'i', required: false, types: ['Array'] }
+ ]
+ },
+ {
+ tsFileCode: `
export interface Props {
a?: number;
b?: string;
}`,
- scriptCode: `import { Props } from './test'
+ scriptCode: `import { Props } from './test'
defineProps<Props & {foo?:string}>()`,
- props: [
- { type: 'infer-type', name: 'a', required: false, types: ['Number'] },
- { type: 'infer-type', name: 'b', required: false, types: ['String'] },
- { type: 'type', name: 'foo', required: false, types: ['String'] }
- ]
- },
- {
- tsFileCode: `
+ props: [
+ { type: 'infer-type', name: 'a', required: false, types: ['Number'] },
+ { type: 'infer-type', name: 'b', required: false, types: ['String'] },
+ { type: 'type', name: 'foo', required: false, types: ['String'] }
+ ]
+ },
+ {
+ tsFileCode: `
export type A = string | number`,
- scriptCode: `import { A } from './test'
+ scriptCode: `import { A } from './test'
defineProps<{foo?:A}>()`,
- props: [
- {
- type: 'type',
- name: 'foo',
- required: false,
- types: ['String', 'Number']
- }
- ]
- },
- {
- scriptCode: `enum A {a = 'a', b = 'b'}
+ props: [
+ {
+ type: 'type',
+ name: 'foo',
+ required: false,
+ types: ['String', 'Number']
+ }
+ ]
+ },
+ {
+ scriptCode: `enum A {a = 'a', b = 'b'}
defineProps<{foo?:A}>()`,
- props: [{ type: 'type', name: 'foo', required: false, types: ['String'] }]
- },
- {
- scriptCode: `
+ props: [
+ { type: 'type', name: 'foo', required: false, types: ['String'] }
+ ]
+ },
+ {
+ scriptCode: `
const foo = 42
enum A {a = foo, b = 'b'}
defineProps<{foo?:A}>()`,
- props: [
- {
- type: 'type',
- name: 'foo',
- required: false,
- types: ['Number', 'String']
- }
- ]
- }
- ]) {
+ props: [
+ {
+ type: 'type',
+ name: 'foo',
+ required: false,
+ types: ['Number', 'String']
+ }
+ ]
+ }
+ ]
+ ) {
const code = `<script setup lang="ts"> ${scriptCode} </script>`
it(`should return expected props with :${code}`, () => {
const props = extractComponentProps(code, tsFileCode)
diff --git ORI/eslint-plugin-vue/tools/lib/utils.js ALT/eslint-plugin-vue/tools/lib/utils.js
index 937288e..69ab88d 100644
--- ORI/eslint-plugin-vue/tools/lib/utils.js
+++ ALT/eslint-plugin-vue/tools/lib/utils.js
@@ -27,9 +27,11 @@ function formatItems(items, suffix) {
function getPresetIds(categoryIds) {
const subsetCategoryIds = []
for (const categoryId of categoryIds) {
- for (const [subsetCategoryId, supersetCategoryId] of Object.entries(
- presetCategories
- )) {
+ for (
+ const [subsetCategoryId, supersetCategoryId] of Object.entries(
+ presetCategories
+ )
+ ) {
if (supersetCategoryId === categoryId) {
subsetCategoryIds.push(subsetCategoryId)
} |
prettier/prettier#16768 VS prettier/prettier@main :: excalidraw/excalidraw@275f6fb Diff (185 lines)diff --git ORI/excalidraw/excalidraw-app/data/tabSync.ts ALT/excalidraw/excalidraw-app/data/tabSync.ts
index 0617a55..336bef7 100644
--- ORI/excalidraw/excalidraw-app/data/tabSync.ts
+++ ALT/excalidraw/excalidraw-app/data/tabSync.ts
@@ -26,9 +26,9 @@ export const updateBrowserStateVersion = (type: BrowserStateTypes) => {
export const resetBrowserStateVersions = () => {
try {
- for (const key of Object.keys(
- LOCAL_STATE_VERSIONS,
- ) as BrowserStateTypes[]) {
+ for (
+ const key of Object.keys(LOCAL_STATE_VERSIONS) as BrowserStateTypes[]
+ ) {
const timestamp = -1;
localStorage.setItem(key, JSON.stringify(timestamp));
LOCAL_STATE_VERSIONS[key] = timestamp;
diff --git ORI/excalidraw/packages/excalidraw/change.ts ALT/excalidraw/packages/excalidraw/change.ts
index b8c88f5..5f0c27e 100644
--- ORI/excalidraw/packages/excalidraw/change.ts
+++ ALT/excalidraw/packages/excalidraw/change.ts
@@ -107,11 +107,9 @@ class Delta<T> {
// - we do this only on previously detected changed elements
// - we do shallow compare only on the first level of properties (not going any deeper)
// - # of properties is reasonably small
- for (const key of this.distinctKeysIterator(
- "full",
- prevObject,
- nextObject,
- )) {
+ for (
+ const key of this.distinctKeysIterator("full", prevObject, nextObject)
+ ) {
deleted[key as keyof T] = prevObject[key];
inserted[key as keyof T] = nextObject[key];
}
@@ -1312,11 +1310,13 @@ export class ElementsChange implements Change<SceneElementsMap> {
}
// updated delta is affecting the binding only in case it contains changed binding or bindable property
- for (const [id] of Array.from(this.updated).filter(([_, delta]) =>
- Object.keys({ ...delta.deleted, ...delta.inserted }).find((prop) =>
- bindingProperties.has(prop as BindingProp | BindableProp),
- ),
- )) {
+ for (
+ const [id] of Array.from(this.updated).filter(([_, delta]) =>
+ Object.keys({ ...delta.deleted, ...delta.inserted }).find((prop) =>
+ bindingProperties.has(prop as BindingProp | BindableProp),
+ ),
+ )
+ ) {
const updatedElement = nextElements.get(id);
if (!updatedElement || updatedElement.isDeleted) {
// skip fixing bindings for updates on deleted elements
diff --git ORI/excalidraw/packages/excalidraw/components/App.tsx ALT/excalidraw/packages/excalidraw/components/App.tsx
index ae2f1bb..9a605a6 100644
--- ORI/excalidraw/packages/excalidraw/components/App.tsx
+++ ALT/excalidraw/packages/excalidraw/components/App.tsx
@@ -8297,13 +8297,15 @@ class App extends React.Component<AppProps, AppState> {
// We want to unselect all groups hitElement is part of
// as well as all elements that are part of the groups
// hitElement is part of
- for (const groupedElement of hitElement.groupIds.flatMap(
- (groupId) =>
- getElementsInGroup(
- this.scene.getNonDeletedElements(),
- groupId,
- ),
- )) {
+ for (
+ const groupedElement of hitElement.groupIds.flatMap(
+ (groupId) =>
+ getElementsInGroup(
+ this.scene.getNonDeletedElements(),
+ groupId,
+ ),
+ )
+ ) {
delete nextSelectedElementIds[groupedElement.id];
}
diff --git ORI/excalidraw/packages/excalidraw/data/restore.ts ALT/excalidraw/packages/excalidraw/data/restore.ts
index c5e2fad..5dd2022 100644
--- ORI/excalidraw/packages/excalidraw/data/restore.ts
+++ ALT/excalidraw/packages/excalidraw/data/restore.ts
@@ -505,9 +505,11 @@ export const restoreAppState = (
// first, migrate all legacy AppState properties to new ones. We do it
// in one go before migrate the rest of the properties in case the new ones
// depend on checking any other key (i.e. they are coupled)
- for (const legacyKey of Object.keys(
- LegacyAppStateMigrations,
- ) as (keyof typeof LegacyAppStateMigrations)[]) {
+ for (
+ const legacyKey of Object.keys(
+ LegacyAppStateMigrations,
+ ) as (keyof typeof LegacyAppStateMigrations)[]
+ ) {
if (legacyKey in appState) {
const [nextKey, nextValue] = LegacyAppStateMigrations[legacyKey](
appState,
@@ -517,10 +519,12 @@ export const restoreAppState = (
}
}
- for (const [key, defaultValue] of Object.entries(defaultAppState) as [
- keyof typeof defaultAppState,
- any,
- ][]) {
+ for (
+ const [key, defaultValue] of Object.entries(defaultAppState) as [
+ keyof typeof defaultAppState,
+ any,
+ ][]
+ ) {
// if AppState contains a legacy key, prefer that one and migrate its
// value to the new one
const suppliedValue = appState[key];
diff --git ORI/excalidraw/packages/excalidraw/element/resizeElements.ts ALT/excalidraw/packages/excalidraw/element/resizeElements.ts
index b3df073..98ea5ba 100644
--- ORI/excalidraw/packages/excalidraw/element/resizeElements.ts
+++ ALT/excalidraw/packages/excalidraw/element/resizeElements.ts
@@ -849,10 +849,12 @@ export const resizeMultipleElements = (
const elementsToUpdate = elementsAndUpdates.map(({ element }) => element);
- for (const {
- element,
- update: { boundTextFontSize, ...update },
- } of elementsAndUpdates) {
+ for (
+ const {
+ element,
+ update: { boundTextFontSize, ...update },
+ } of elementsAndUpdates
+ ) {
const { width, height, angle } = update;
mutateElement(element, update, false);
diff --git ORI/excalidraw/packages/excalidraw/frame.ts ALT/excalidraw/packages/excalidraw/frame.ts
index c2e7aa1..0923a1d 100644
--- ORI/excalidraw/packages/excalidraw/frame.ts
+++ ALT/excalidraw/packages/excalidraw/frame.ts
@@ -473,10 +473,9 @@ export const addElementsToFrame = <T extends ElementsMapOrArray>(
// - add bound text elements if not already in the array
// - filter out elements that are already in the frame
- for (const element of omitGroupsContainingFrameLikes(
- allElements,
- elementsToAdd,
- )) {
+ for (
+ const element of omitGroupsContainingFrameLikes(allElements, elementsToAdd)
+ ) {
// don't add frames or their children
if (
isFrameLikeElement(element) ||
diff --git ORI/excalidraw/packages/excalidraw/tests/regressionTests.test.tsx ALT/excalidraw/packages/excalidraw/tests/regressionTests.test.tsx
index 6b0d913..69fd2c8 100644
--- ORI/excalidraw/packages/excalidraw/tests/regressionTests.test.tsx
+++ ALT/excalidraw/packages/excalidraw/tests/regressionTests.test.tsx
@@ -130,14 +130,16 @@ describe("regression tests", () => {
expect(API.getSelectedElement().id).not.toEqual(prevSelectedId);
});
- for (const [keys, shape, shouldSelect] of [
- [`2${KEYS.R}`, "rectangle", true],
- [`3${KEYS.D}`, "diamond", true],
- [`4${KEYS.O}`, "ellipse", true],
- [`5${KEYS.A}`, "arrow", true],
- [`6${KEYS.L}`, "line", true],
- [`7${KEYS.P}`, "freedraw", false],
- ] as [string, ExcalidrawElement["type"], boolean][]) {
+ for (
+ const [keys, shape, shouldSelect] of [
+ [`2${KEYS.R}`, "rectangle", true],
+ [`3${KEYS.D}`, "diamond", true],
+ [`4${KEYS.O}`, "ellipse", true],
+ [`5${KEYS.A}`, "arrow", true],
+ [`6${KEYS.L}`, "line", true],
+ [`7${KEYS.P}`, "freedraw", false],
+ ] as [string, ExcalidrawElement["type"], boolean][]
+ ) {
for (const key of keys) {
it(`key ${key} selects ${shape} tool`, () => {
Keyboard.keyPress(key); |
prettier/prettier#16768 VS prettier/prettier@main :: prettier/prettier@a32fca0 Diff (907 lines)diff --git ORI/prettier/scripts/lint-changelog.js ALT/prettier/scripts/lint-changelog.js
index f729ef7..20a63ad 100644
--- ORI/prettier/scripts/lint-changelog.js
+++ ALT/prettier/scripts/lint-changelog.js
@@ -31,11 +31,13 @@ for (const file of files) {
showErrorMessage(`Please remove "${file}" from "${CHANGELOG_DIR}".`);
}
}
-for (const file of [
- TEMPLATE_FILE,
- BLOG_POST_INTRO_TEMPLATE_FILE,
- ...CHANGELOG_CATEGORIES,
-]) {
+for (
+ const file of [
+ TEMPLATE_FILE,
+ BLOG_POST_INTRO_TEMPLATE_FILE,
+ ...CHANGELOG_CATEGORIES,
+ ]
+) {
if (!files.includes(file)) {
showErrorMessage(`Please don't remove "${file}" from "${CHANGELOG_DIR}".`);
}
diff --git ORI/prettier/scripts/release/run.js ALT/prettier/scripts/release/run.js
index 4c22b8b..bd6e4f7 100644
--- ORI/prettier/scripts/release/run.js
+++ ALT/prettier/scripts/release/run.js
@@ -19,49 +19,51 @@ if (semver.parse(previousVersion) === null) {
).version;
}
-for (let step of [
- {
- name: "Validating new version",
- process: steps.validateNewVersion,
- },
- {
- name: "Checking git status",
- process: steps.checkGitStatus,
- skip: params.dry,
- },
- {
- name: "Installing NPM dependencies",
- process: steps.installDependencies,
- skip: params.dry || params.skipDependenciesInstall || !params.manual,
- },
- {
- name: "Linting files",
- process: steps.lintFiles,
- skip: params.dry,
- },
- {
- name: "Bumping version",
- process: steps.updateVersion,
- skip: params.dry,
- },
- steps.generateBundles,
- steps.updateChangelog,
- {
- name: "Committing and pushing to remote",
- process: steps.pushToGit,
- skip: params.dry,
- },
- params.manual ? steps.publishToNpm : steps.waitForBotRelease,
- steps.showInstructionsAfterNpmPublish,
- steps.updateDependentsCount,
- steps.bumpPrettier,
- {
- name: "Cleaning changelog",
- process: steps.cleanChangelog,
- skip: params.dry || params.next,
- },
- steps.postPublishSteps,
-]) {
+for (
+ let step of [
+ {
+ name: "Validating new version",
+ process: steps.validateNewVersion,
+ },
+ {
+ name: "Checking git status",
+ process: steps.checkGitStatus,
+ skip: params.dry,
+ },
+ {
+ name: "Installing NPM dependencies",
+ process: steps.installDependencies,
+ skip: params.dry || params.skipDependenciesInstall || !params.manual,
+ },
+ {
+ name: "Linting files",
+ process: steps.lintFiles,
+ skip: params.dry,
+ },
+ {
+ name: "Bumping version",
+ process: steps.updateVersion,
+ skip: params.dry,
+ },
+ steps.generateBundles,
+ steps.updateChangelog,
+ {
+ name: "Committing and pushing to remote",
+ process: steps.pushToGit,
+ skip: params.dry,
+ },
+ params.manual ? steps.publishToNpm : steps.waitForBotRelease,
+ steps.showInstructionsAfterNpmPublish,
+ steps.updateDependentsCount,
+ steps.bumpPrettier,
+ {
+ name: "Cleaning changelog",
+ process: steps.cleanChangelog,
+ skip: params.dry || params.next,
+ },
+ steps.postPublishSteps,
+ ]
+) {
if (typeof step === "function") {
step = { process: step };
}
diff --git ORI/prettier/src/cli/expand-patterns.js ALT/prettier/src/cli/expand-patterns.js
index 6c28afb..af437a6 100644
--- ORI/prettier/src/cli/expand-patterns.js
+++ ALT/prettier/src/cli/expand-patterns.js
@@ -12,9 +12,9 @@ async function* expandPatterns(context) {
const seen = new Set();
let noResults = true;
- for await (const { filePath, ignoreUnknown, error } of expandPatternsInternal(
- context,
- )) {
+ for await (
+ const { filePath, ignoreUnknown, error } of expandPatternsInternal(context)
+ ) {
noResults = false;
if (error) {
yield { error };
diff --git ORI/prettier/src/cli/format.js ALT/prettier/src/cli/format.js
index 296a658..b2c7cfc 100644
--- ORI/prettier/src/cli/format.js
+++ ALT/prettier/src/cli/format.js
@@ -319,9 +319,9 @@ async function formatFiles(context) {
}
}
- for await (const { error, filename, ignoreUnknown } of expandPatterns(
- context,
- )) {
+ for await (
+ const { error, filename, ignoreUnknown } of expandPatterns(context)
+ ) {
if (error) {
context.logger.error(error);
// Don't exit, but set the exit code to 2
diff --git ORI/prettier/src/config/searcher.js ALT/prettier/src/config/searcher.js
index 6c70152..4327ac9 100644
--- ORI/prettier/src/config/searcher.js
+++ ALT/prettier/src/config/searcher.js
@@ -44,10 +44,9 @@ class Searcher {
const searchedDirectories = [];
let result;
- for (const directory of iterateDirectoryUp(
- startDirectory,
- this.#stopDirectory,
- )) {
+ for (
+ const directory of iterateDirectoryUp(startDirectory, this.#stopDirectory)
+ ) {
searchedDirectories.push(directory);
result = await this.#searchInDirectory(directory, shouldCache);
diff --git ORI/prettier/src/language-html/ast.js ALT/prettier/src/language-html/ast.js
index bdcaf18..003af07 100644
--- ORI/prettier/src/language-html/ast.js
+++ ALT/prettier/src/language-html/ast.js
@@ -12,10 +12,12 @@ const NON_ENUMERABLE_PROPERTIES = new Set(["parent"]);
class Node {
constructor(nodeOrProperties = {}) {
- for (const property of new Set([
- ...NON_ENUMERABLE_PROPERTIES,
- ...Object.keys(nodeOrProperties),
- ])) {
+ for (
+ const property of new Set([
+ ...NON_ENUMERABLE_PROPERTIES,
+ ...Object.keys(nodeOrProperties),
+ ])
+ ) {
this.setProperty(property, nodeOrProperties[property]);
}
}
diff --git ORI/prettier/src/language-html/embed/attribute.js ALT/prettier/src/language-html/embed/attribute.js
index 24ddf8e..4135a3d 100644
--- ORI/prettier/src/language-html/embed/attribute.js
+++ ALT/prettier/src/language-html/embed/attribute.js
@@ -33,13 +33,15 @@ function printAttribute(path, options) {
return [node.rawName, "=", node.value];
}
- for (const getValuePrinter of [
- printSrcset,
- printStyleAttribute,
- printClassNames,
- printVueAttribute,
- printAngularAttribute,
- ]) {
+ for (
+ const getValuePrinter of [
+ printSrcset,
+ printStyleAttribute,
+ printClassNames,
+ printVueAttribute,
+ printAngularAttribute,
+ ]
+ ) {
const printValue = getValuePrinter(path, options);
if (printValue) {
return printAttributeWithValuePrinter(printValue);
diff --git ORI/prettier/src/language-js/clean.js ALT/prettier/src/language-js/clean.js
index 987fd05..117a090 100644
--- ORI/prettier/src/language-js/clean.js
+++ ALT/prettier/src/language-js/clean.js
@@ -146,10 +146,9 @@ function clean(original, cloned, parent) {
expression.arguments.length === 1
) {
const astProps = original.expression.arguments[0].properties;
- for (const [
- index,
- prop,
- ] of cloned.expression.arguments[0].properties.entries()) {
+ for (
+ const [index, prop] of cloned.expression.arguments[0].properties.entries()
+ ) {
switch (astProps[index].key.name) {
case "styles":
if (isArrayOrTupleExpression(prop.value)) {
diff --git ORI/prettier/src/language-js/embed/index.js ALT/prettier/src/language-js/embed/index.js
index 3af16fe..e605ae6 100644
--- ORI/prettier/src/language-js/embed/index.js
+++ ALT/prettier/src/language-js/embed/index.js
@@ -17,12 +17,9 @@ function embed(path) {
}
let embedder;
- for (const getEmbedder of [
- printCss,
- printGraphQL,
- printHtml,
- printMarkdown,
- ]) {
+ for (
+ const getEmbedder of [printCss, printGraphQL, printHtml, printMarkdown]
+ ) {
embedder = getEmbedder(path);
if (!embedder) {
diff --git ORI/prettier/src/language-js/print/index.js ALT/prettier/src/language-js/print/index.js
index 70eb850..47e1d7f 100644
--- ORI/prettier/src/language-js/print/index.js
+++ ALT/prettier/src/language-js/print/index.js
@@ -23,13 +23,15 @@ function printWithoutParentheses(path, options, print, args) {
return printIgnored(path, options);
}
- for (const printer of [
- printAngular,
- printJsx,
- printFlow,
- printTypescript,
- printEstree,
- ]) {
+ for (
+ const printer of [
+ printAngular,
+ printJsx,
+ printFlow,
+ printTypescript,
+ printEstree,
+ ]
+ ) {
const doc = printer(path, options, print, args);
if (doc !== undefined) {
return doc;
diff --git ORI/prettier/src/main/get-cursor-node.js ALT/prettier/src/main/get-cursor-node.js
index 66220b0..ede27b2 100644
--- ORI/prettier/src/main/get-cursor-node.js
+++ ALT/prettier/src/main/get-cursor-node.js
@@ -10,10 +10,12 @@ function getCursorNode(ast, options) {
locStart(node) <= cursorOffset && locEnd(node) >= cursorOffset;
let cursorNode = ast;
- for (const node of getDescendants(ast, {
- getVisitorKeys,
- filter: nodeContainsCursor,
- })) {
+ for (
+ const node of getDescendants(ast, {
+ getVisitorKeys,
+ filter: nodeContainsCursor,
+ })
+ ) {
cursorNode = node;
}
diff --git ORI/prettier/src/main/support.js ALT/prettier/src/main/support.js
index 9e1b54d..5f7d4bf 100644
--- ORI/prettier/src/main/support.js
+++ ALT/prettier/src/main/support.js
@@ -17,9 +17,11 @@ function getSupportInfo({ plugins = [], showDeprecated = false } = {}) {
const languages = plugins.flatMap((plugin) => plugin.languages ?? []);
const options = [];
- for (const option of normalizeOptionSettings(
- Object.assign({}, ...plugins.map(({ options }) => options), coreOptions),
- )) {
+ for (
+ const option of normalizeOptionSettings(
+ Object.assign({}, ...plugins.map(({ options }) => options), coreOptions),
+ )
+ ) {
if (!showDeprecated && option.deprecated) {
continue;
}
diff --git ORI/prettier/src/plugins/builtin-plugins-proxy.js ALT/prettier/src/plugins/builtin-plugins-proxy.js
index 75d30e5..e0c5a78 100644
--- ORI/prettier/src/plugins/builtin-plugins-proxy.js
+++ ALT/prettier/src/plugins/builtin-plugins-proxy.js
@@ -17,11 +17,13 @@ function createParsersAndPrinters(modules) {
const parsers = Object.create(null);
const printers = Object.create(null);
- for (const {
- importPlugin,
- parsers: parserNames = [],
- printers: printerNames = [],
- } of modules) {
+ for (
+ const {
+ importPlugin,
+ parsers: parserNames = [],
+ printers: printerNames = [],
+ } of modules
+ ) {
const loadPlugin = async () => {
const plugin = await importPlugin();
Object.assign(parsers, plugin.parsers);
diff --git ORI/prettier/src/utils/create-language.js ALT/prettier/src/utils/create-language.js
index 3e2b5cc..ed8cc96 100644
--- ORI/prettier/src/utils/create-language.js
+++ ALT/prettier/src/utils/create-language.js
@@ -12,12 +12,9 @@ function createLanguage(linguistData, getOverrides) {
const overrides = getOverrides(linguistData);
if (process.env.NODE_ENV !== "production" && overrides) {
- for (const property of [
- "parsers",
- "extensions",
- "interpreters",
- "filenames",
- ]) {
+ for (
+ const property of ["parsers", "extensions", "interpreters", "filenames"]
+ ) {
const value = overrides[property];
if (value) {
diff --git ORI/prettier/tests/integration/__tests__/config-resolution.js ALT/prettier/tests/integration/__tests__/config-resolution.js
index 0397117..61f2377 100644
--- ORI/prettier/tests/integration/__tests__/config-resolution.js
+++ ALT/prettier/tests/integration/__tests__/config-resolution.js
@@ -272,34 +272,40 @@ test(".js config file", async () => {
singleQuote: true,
};
- for (const directoryName of [
- "cjs-prettier-config-js-in-type-commonjs",
- "cjs-prettier-config-js-in-type-none",
- "cjs-prettierrc-js-in-type-commonjs",
- "cjs-prettierrc-js-in-type-none",
- "mjs-prettier-config-js-in-type-module",
- "mjs-prettierrc-js-in-type-module",
- ]) {
+ for (
+ const directoryName of [
+ "cjs-prettier-config-js-in-type-commonjs",
+ "cjs-prettier-config-js-in-type-none",
+ "cjs-prettierrc-js-in-type-commonjs",
+ "cjs-prettierrc-js-in-type-none",
+ "mjs-prettier-config-js-in-type-module",
+ "mjs-prettierrc-js-in-type-module",
+ ]
+ ) {
const file = new URL(`${directoryName}/foo.js`, parentDirectory);
await expect(prettier.resolveConfig(file)).resolves.toMatchObject(config);
}
const cjsError = /module is not defined in ES module scope/;
- for (const directoryName of [
- "cjs-prettier-config-js-in-type-module",
- "cjs-prettierrc-js-in-type-module",
- ]) {
+ for (
+ const directoryName of [
+ "cjs-prettier-config-js-in-type-module",
+ "cjs-prettierrc-js-in-type-module",
+ ]
+ ) {
const file = new URL(`./${directoryName}/foo.js`, parentDirectory);
await expect(prettier.resolveConfig(file)).rejects.toThrow(cjsError);
}
const mjsError = /Unexpected token 'export'/;
- for (const directoryName of [
- "mjs-prettier-config-js-in-type-commonjs",
- "mjs-prettier-config-js-in-type-none",
- "mjs-prettierrc-js-in-type-commonjs",
- "mjs-prettierrc-js-in-type-none",
- ]) {
+ for (
+ const directoryName of [
+ "mjs-prettier-config-js-in-type-commonjs",
+ "mjs-prettier-config-js-in-type-none",
+ "mjs-prettierrc-js-in-type-commonjs",
+ "mjs-prettierrc-js-in-type-none",
+ ]
+ ) {
const file = new URL(`./${directoryName}/foo.js`, parentDirectory);
await expect(prettier.resolveConfig(file)).rejects.toThrow(mjsError);
}
@@ -313,14 +319,16 @@ test(".cjs config file", async () => {
singleQuote: true,
};
- for (const directoryName of [
- "prettierrc-cjs-in-type-module",
- "prettierrc-cjs-in-type-commonjs",
- "prettierrc-cjs-in-type-none",
- "prettier-config-cjs-in-type-commonjs",
- "prettier-config-cjs-in-type-none",
- "prettier-config-cjs-in-type-module",
- ]) {
+ for (
+ const directoryName of [
+ "prettierrc-cjs-in-type-module",
+ "prettierrc-cjs-in-type-commonjs",
+ "prettierrc-cjs-in-type-none",
+ "prettier-config-cjs-in-type-commonjs",
+ "prettier-config-cjs-in-type-none",
+ "prettier-config-cjs-in-type-module",
+ ]
+ ) {
const file = new URL(`./${directoryName}/foo.js`, parentDirectory);
await expect(prettier.resolveConfig(file)).resolves.toMatchObject(config);
}
@@ -334,14 +342,16 @@ test(".mjs config file", async () => {
singleQuote: true,
};
- for (const directoryName of [
- "prettierrc-mjs-in-type-module",
- "prettierrc-mjs-in-type-commonjs",
- "prettierrc-mjs-in-type-none",
- "prettier-config-mjs-in-type-commonjs",
- "prettier-config-mjs-in-type-none",
- "prettier-config-mjs-in-type-module",
- ]) {
+ for (
+ const directoryName of [
+ "prettierrc-mjs-in-type-module",
+ "prettierrc-mjs-in-type-commonjs",
+ "prettierrc-mjs-in-type-none",
+ "prettier-config-mjs-in-type-commonjs",
+ "prettier-config-mjs-in-type-none",
+ "prettier-config-mjs-in-type-module",
+ ]
+ ) {
const file = new URL(`./${directoryName}/foo.js`, parentDirectory);
await expect(prettier.resolveConfig(file)).resolves.toMatchObject(config);
}
diff --git ORI/prettier/tests/integration/__tests__/log-level.js ALT/prettier/tests/integration/__tests__/log-level.js
index 2bc5393..7ab42dd 100644
--- ORI/prettier/tests/integration/__tests__/log-level.js
+++ ALT/prettier/tests/integration/__tests__/log-level.js
@@ -31,72 +31,74 @@ describe("Should use default level logger to log `--log-level` error", () => {
});
describe("log-level should not effect information print", () => {
- for (const { argv, runOptions, assertOptions } of [
- {
- argv: ["--version"],
- assertOptions: {
- stdout(value) {
- expect(value).not.toBe("");
+ for (
+ const { argv, runOptions, assertOptions } of [
+ {
+ argv: ["--version"],
+ assertOptions: {
+ stdout(value) {
+ expect(value).not.toBe("");
+ },
},
},
- },
- {
- argv: ["--help"],
- assertOptions: {
- stdout(value) {
- expect(value.includes("-v, --version")).toBe(true);
+ {
+ argv: ["--help"],
+ assertOptions: {
+ stdout(value) {
+ expect(value.includes("-v, --version")).toBe(true);
+ },
},
},
- },
- {
- argv: ["--help", "write"],
- assertOptions: {
- stdout(value) {
- expect(value.startsWith("-w, --write")).toBe(true);
+ {
+ argv: ["--help", "write"],
+ assertOptions: {
+ stdout(value) {
+ expect(value.startsWith("-w, --write")).toBe(true);
+ },
},
},
- },
- {
- argv: ["--support-info"],
- assertOptions: {
- stdout(value) {
- expect(JSON.parse(value)).toBeDefined();
+ {
+ argv: ["--support-info"],
+ assertOptions: {
+ stdout(value) {
+ expect(JSON.parse(value)).toBeDefined();
+ },
},
},
- },
- {
- argv: ["--find-config-path", "any-file"],
- assertOptions: {
- stdout: ".prettierrc",
+ {
+ argv: ["--find-config-path", "any-file"],
+ assertOptions: {
+ stdout: ".prettierrc",
+ },
},
- },
- {
- argv: ["--file-info", "any-js-file.js"],
- assertOptions: {
- stdout(value) {
- expect(JSON.parse(value)).toEqual({
- ignored: false,
- inferredParser: "babel",
- });
+ {
+ argv: ["--file-info", "any-js-file.js"],
+ assertOptions: {
+ stdout(value) {
+ expect(JSON.parse(value)).toEqual({
+ ignored: false,
+ inferredParser: "babel",
+ });
+ },
},
},
- },
- {
- argv: [],
- runOptions: { isTTY: true },
- assertOptions: {
- status: "non-zero",
- stdout(value) {
- expect(value.includes("-v, --version")).toBe(true);
+ {
+ argv: [],
+ runOptions: { isTTY: true },
+ assertOptions: {
+ status: "non-zero",
+ stdout(value) {
+ expect(value.includes("-v, --version")).toBe(true);
+ },
},
},
- },
- {
- argv: ["--parser", "babel"],
- runOptions: { input: "foo" },
- assertOptions: { stdout: "foo;" },
- },
- ]) {
+ {
+ argv: ["--parser", "babel"],
+ runOptions: { input: "foo" },
+ assertOptions: { stdout: "foo;" },
+ },
+ ]
+ ) {
runCli("cli/log-level", ["--log-level", "silent", ...argv], {
...runOptions,
title: argv.join(" "),
diff --git ORI/prettier/tests/integration/__tests__/print-doc-to-string.js ALT/prettier/tests/integration/__tests__/print-doc-to-string.js
index 076dd90..5d19466 100644
--- ORI/prettier/tests/integration/__tests__/print-doc-to-string.js
+++ ALT/prettier/tests/integration/__tests__/print-doc-to-string.js
@@ -4,30 +4,32 @@ const { printDocToString } = prettier.doc.printer;
test("Throw error on invalid doc", () => {
const printDocToStringOptions = { printWidth: 80, tabWidth: 2 };
- for (const doc of [
- true,
- false,
- 0,
- 1,
- Number.NaN,
- Number.POSITIVE_INFINITY,
- 1n,
- Symbol("symbol"),
- function () {},
- () => {},
- {},
- undefined,
- null,
- Promise.resolve("1"),
- (function* () {})(),
- /regexp/g,
- new Date(),
- new Error("error"),
- Buffer.from("buffer"),
- new Uint8Array(2),
- { type: "invalid-type" },
- { "without-type": true },
- ]) {
+ for (
+ const doc of [
+ true,
+ false,
+ 0,
+ 1,
+ Number.NaN,
+ Number.POSITIVE_INFINITY,
+ 1n,
+ Symbol("symbol"),
+ function () {},
+ () => {},
+ {},
+ undefined,
+ null,
+ Promise.resolve("1"),
+ (function* () {})(),
+ /regexp/g,
+ new Date(),
+ new Error("error"),
+ Buffer.from("buffer"),
+ new Uint8Array(2),
+ { type: "invalid-type" },
+ { "without-type": true },
+ ]
+ ) {
expect(() =>
printDocToString(doc, printDocToStringOptions),
).toThrowErrorMatchingSnapshot();
diff --git ORI/prettier/tests/integration/create-path-serializer.js ALT/prettier/tests/integration/create-path-serializer.js
index f2e4a80..281424f 100644
--- ORI/prettier/tests/integration/create-path-serializer.js
+++ ALT/prettier/tests/integration/create-path-serializer.js
@@ -11,12 +11,14 @@ function createPathSerializer(options) {
for (const [url, replacement] of options.replacements.entries()) {
const path = fileURLToPath(url);
- for (const find of isWindows
- ? [
- path.charAt(0).toLowerCase() + path.slice(1),
- path.charAt(0).toUpperCase() + path.slice(1),
- ]
- : [path]) {
+ for (
+ const find of isWindows
+ ? [
+ path.charAt(0).toLowerCase() + path.slice(1),
+ path.charAt(0).toUpperCase() + path.slice(1),
+ ]
+ : [path]
+ ) {
replacements.push({ find, replacement });
}
}
diff --git ORI/prettier/tests/unit/whitespace-utils.js ALT/prettier/tests/unit/whitespace-utils.js
index 7ed383b..4b00f65 100644
--- ORI/prettier/tests/unit/whitespace-utils.js
+++ ALT/prettier/tests/unit/whitespace-utils.js
@@ -16,15 +16,17 @@ it("constructor", () => {
const utils = new WhitespaceUtils(" ");
describe("trimStart", () => {
- for (const [string, expected] of [
- ["", ""],
- [" ", ""],
- [" ".repeat(3), ""],
- ["a", "a"],
- ["a" + " ".repeat(3), "a "],
- [" ".repeat(3) + "a", "a"],
- [" ".repeat(3) + "a" + " ".repeat(3), "a "],
- ]) {
+ for (
+ const [string, expected] of [
+ ["", ""],
+ [" ", ""],
+ [" ".repeat(3), ""],
+ ["a", "a"],
+ ["a" + " ".repeat(3), "a "],
+ [" ".repeat(3) + "a", "a"],
+ [" ".repeat(3) + "a" + " ".repeat(3), "a "],
+ ]
+ ) {
it(JSON.stringify(string), () => {
expect(utils.trimStart(string)).toBe(expected);
});
@@ -32,15 +34,17 @@ describe("trimStart", () => {
});
describe("trimEnd", () => {
- for (const [string, expected] of [
- ["", ""],
- [" ", ""],
- [" ".repeat(3), ""],
- ["a", "a"],
- ["a" + " ".repeat(3), "a"],
- [" ".repeat(3) + "a", " a"],
- [" ".repeat(3) + "a" + " ".repeat(3), " a"],
- ]) {
+ for (
+ const [string, expected] of [
+ ["", ""],
+ [" ", ""],
+ [" ".repeat(3), ""],
+ ["a", "a"],
+ ["a" + " ".repeat(3), "a"],
+ [" ".repeat(3) + "a", " a"],
+ [" ".repeat(3) + "a" + " ".repeat(3), " a"],
+ ]
+ ) {
it(JSON.stringify(string), () => {
expect(utils.trimEnd(string)).toBe(expected);
});
@@ -48,15 +52,17 @@ describe("trimEnd", () => {
});
describe("trim", () => {
- for (const [string, expected] of [
- ["", ""],
- [" ", ""],
- [" ".repeat(3), ""],
- ["a", "a"],
- ["a" + " ".repeat(3), "a"],
- [" ".repeat(3) + "a", "a"],
- [" ".repeat(3) + "a" + " ".repeat(3), "a"],
- ]) {
+ for (
+ const [string, expected] of [
+ ["", ""],
+ [" ", ""],
+ [" ".repeat(3), ""],
+ ["a", "a"],
+ ["a" + " ".repeat(3), "a"],
+ [" ".repeat(3) + "a", "a"],
+ [" ".repeat(3) + "a" + " ".repeat(3), "a"],
+ ]
+ ) {
it(JSON.stringify(string), () => {
expect(utils.trim(string)).toBe(expected);
});
@@ -64,15 +70,17 @@ describe("trim", () => {
});
describe("getLeadingWhitespaceCount", () => {
- for (const [string, expected] of [
- ["", 0],
- [" ", 1],
- [" ".repeat(3), 3],
- ["a", 0],
- ["a" + " ".repeat(3), 0],
- [" ".repeat(3) + "a", 3],
- [" ".repeat(3) + "a" + " ".repeat(3), 3],
- ]) {
+ for (
+ const [string, expected] of [
+ ["", 0],
+ [" ", 1],
+ [" ".repeat(3), 3],
+ ["a", 0],
+ ["a" + " ".repeat(3), 0],
+ [" ".repeat(3) + "a", 3],
+ [" ".repeat(3) + "a" + " ".repeat(3), 3],
+ ]
+ ) {
it(JSON.stringify(string), () => {
expect(utils.getLeadingWhitespaceCount(string)).toBe(expected);
});
@@ -80,15 +88,17 @@ describe("getLeadingWhitespaceCount", () => {
});
describe("getTrailingWhitespaceCount", () => {
- for (const [string, expected] of [
- ["", 0],
- [" ", 1],
- [" ".repeat(3), 3],
- ["a", 0],
- ["a" + " ".repeat(3), 3],
- [" ".repeat(3) + "a", 0],
- [" ".repeat(3) + "a" + " ".repeat(3), 3],
- ]) {
+ for (
+ const [string, expected] of [
+ ["", 0],
+ [" ", 1],
+ [" ".repeat(3), 3],
+ ["a", 0],
+ ["a" + " ".repeat(3), 3],
+ [" ".repeat(3) + "a", 0],
+ [" ".repeat(3) + "a" + " ".repeat(3), 3],
+ ]
+ ) {
it(JSON.stringify(string), () => {
expect(utils.getTrailingWhitespaceCount(string)).toBe(expected);
});
@@ -96,18 +106,20 @@ describe("getTrailingWhitespaceCount", () => {
});
describe("split", () => {
- for (const string of [
- "",
- " ",
- " ".repeat(3),
- " a",
- " ".repeat(3) + "a",
- "a ",
- "a" + " ".repeat(3),
- " a ",
- " ".repeat(3) + "a" + " ".repeat(3),
- " a a a ",
- ]) {
+ for (
+ const string of [
+ "",
+ " ",
+ " ".repeat(3),
+ " a",
+ " ".repeat(3) + "a",
+ "a ",
+ "a" + " ".repeat(3),
+ " a ",
+ " ".repeat(3) + "a" + " ".repeat(3),
+ " a a a ",
+ ]
+ ) {
it(JSON.stringify(string), () => {
expect(utils.split(string)).toEqual(string.split(/ +/));
});
diff --git ORI/prettier/website/playground/PrettierFormat.js ALT/prettier/website/playground/PrettierFormat.js
index a10a06c..a57fd0f 100644
--- ORI/prettier/website/playground/PrettierFormat.js
+++ ALT/prettier/website/playground/PrettierFormat.js
@@ -11,17 +11,19 @@ export default class PrettierFormat extends React.Component {
}
componentDidUpdate(prevProps) {
- for (const key of [
- "enabled",
- "code",
- "options",
- "debugAst",
- "debugPreprocessedAst",
- "debugDoc",
- "debugComments",
- "reformat",
- "rethrowEmbedErrors",
- ]) {
+ for (
+ const key of [
+ "enabled",
+ "code",
+ "options",
+ "debugAst",
+ "debugPreprocessedAst",
+ "debugDoc",
+ "debugComments",
+ "reformat",
+ "rethrowEmbedErrors",
+ ]
+ ) {
if (prevProps[key] !== this.props[key]) {
this.format();
break; |
prettier/prettier#16768 VS prettier/prettier@main :: marmelab/react-admin@83f6ec3 The diff is empty. |
prettier/prettier#16768 VS prettier/prettier@main :: typescript-eslint/typescript-eslint@7984ef7 Diff (325 lines)diff --git ORI/typescript-eslint/packages/eslint-plugin/src/rules/ban-ts-comment.ts ALT/typescript-eslint/packages/eslint-plugin/src/rules/ban-ts-comment.ts
index b554510..bdef5b5 100644
--- ORI/typescript-eslint/packages/eslint-plugin/src/rules/ban-ts-comment.ts
+++ ALT/typescript-eslint/packages/eslint-plugin/src/rules/ban-ts-comment.ts
@@ -117,12 +117,14 @@ export default createRule<[Options], MessageIds>({
/^\s*(?:\/|\*)*\s*@ts-(?<directive>expect-error|ignore)(?<description>.*)/;
const descriptionFormats = new Map<string, RegExp>();
- for (const directive of [
- 'ts-expect-error',
- 'ts-ignore',
- 'ts-nocheck',
- 'ts-check',
- ] as const) {
+ for (
+ const directive of [
+ 'ts-expect-error',
+ 'ts-ignore',
+ 'ts-nocheck',
+ 'ts-check',
+ ] as const
+ ) {
const option = options[directive];
if (typeof option === 'object' && option.descriptionFormat) {
descriptionFormats.set(directive, new RegExp(option.descriptionFormat));
diff --git ORI/typescript-eslint/packages/eslint-plugin/src/rules/no-floating-promises.ts ALT/typescript-eslint/packages/eslint-plugin/src/rules/no-floating-promises.ts
index b9fb9b1..1d4ec6c 100644
--- ORI/typescript-eslint/packages/eslint-plugin/src/rules/no-floating-promises.ts
+++ ALT/typescript-eslint/packages/eslint-plugin/src/rules/no-floating-promises.ts
@@ -327,9 +327,11 @@ export default createRule<Options, MessageId>({
function isPromiseArray(checker: ts.TypeChecker, node: ts.Node): boolean {
const type = checker.getTypeAtLocation(node);
- for (const ty of tsutils
- .unionTypeParts(type)
- .map(t => checker.getApparentType(t))) {
+ for (
+ const ty of tsutils
+ .unionTypeParts(type)
+ .map(t => checker.getApparentType(t))
+ ) {
if (checker.isArrayType(ty)) {
const arrayType = checker.getTypeArguments(ty)[0];
if (isPromiseLike(checker, node, arrayType)) {
diff --git ORI/typescript-eslint/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts ALT/typescript-eslint/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts
index 0c6d6c8..64ace62 100644
--- ORI/typescript-eslint/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts
+++ ALT/typescript-eslint/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts
@@ -281,11 +281,13 @@ export default createRule({
{ typeFlags, typeName }: TypeFlagsWithName,
typeNode: TSESTree.TypeNode,
): boolean {
- for (const [messageId, checkFlag] of [
- ['overrides', ts.TypeFlags.Any],
- ['overrides', ts.TypeFlags.Never],
- ['overridden', ts.TypeFlags.Unknown],
- ] as const) {
+ for (
+ const [messageId, checkFlag] of [
+ ['overrides', ts.TypeFlags.Any],
+ ['overrides', ts.TypeFlags.Never],
+ ['overridden', ts.TypeFlags.Unknown],
+ ] as const
+ ) {
if (typeFlags === checkFlag) {
context.report({
data: {
@@ -409,10 +411,9 @@ export default createRule({
{ typeFlags, typeName }: TypeFlagsWithName,
typeNode: TSESTree.TypeNode,
): boolean {
- for (const checkFlag of [
- ts.TypeFlags.Any,
- ts.TypeFlags.Unknown,
- ] as const) {
+ for (
+ const checkFlag of [ts.TypeFlags.Any, ts.TypeFlags.Unknown] as const
+ ) {
if (typeFlags === checkFlag) {
context.report({
data: {
diff --git ORI/typescript-eslint/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts ALT/typescript-eslint/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts
index b472f75..91e5d55 100644
--- ORI/typescript-eslint/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts
+++ ALT/typescript-eslint/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts
@@ -161,10 +161,12 @@ export default createRule<Options, MessageIds>({
return undefined;
}
- for (const [against, expression] of [
- [node.right, node.left],
- [node.left, node.right],
- ]) {
+ for (
+ const [against, expression] of [
+ [node.right, node.left],
+ [node.left, node.right],
+ ]
+ ) {
if (
against.type !== AST_NODE_TYPES.Literal ||
typeof against.value !== 'boolean'
diff --git ORI/typescript-eslint/packages/eslint-plugin/src/rules/prefer-readonly.ts ALT/typescript-eslint/packages/eslint-plugin/src/rules/prefer-readonly.ts
index 80f3983..a676f09 100644
--- ORI/typescript-eslint/packages/eslint-plugin/src/rules/prefer-readonly.ts
+++ ALT/typescript-eslint/packages/eslint-plugin/src/rules/prefer-readonly.ts
@@ -193,7 +193,9 @@ export default createRule<Options, MessageIds>({
'Stack should exist on class exit',
);
- for (const violatingNode of finalizedClassScope.finalizeUnmodifiedPrivateNonReadonlys()) {
+ for (
+ const violatingNode of finalizedClassScope.finalizeUnmodifiedPrivateNonReadonlys()
+ ) {
const { esNode, nameNode } =
getEsNodesFromViolatingNode(violatingNode);
context.report({
diff --git ORI/typescript-eslint/packages/eslint-plugin/src/rules/restrict-plus-operands.ts ALT/typescript-eslint/packages/eslint-plugin/src/rules/restrict-plus-operands.ts
index 1953c15..fcc358a 100644
--- ORI/typescript-eslint/packages/eslint-plugin/src/rules/restrict-plus-operands.ts
+++ ALT/typescript-eslint/packages/eslint-plugin/src/rules/restrict-plus-operands.ts
@@ -153,10 +153,12 @@ export default createRule<Options, MessageIds>({
let hadIndividualComplaint = false;
- for (const [baseNode, baseType, otherType] of [
- [node.left, leftType, rightType],
- [node.right, rightType, leftType],
- ] as const) {
+ for (
+ const [baseNode, baseType, otherType] of [
+ [node.left, leftType, rightType],
+ [node.right, rightType, leftType],
+ ] as const
+ ) {
if (
isTypeFlagSetInUnion(
baseType,
@@ -210,10 +212,12 @@ export default createRule<Options, MessageIds>({
return;
}
- for (const [baseType, otherType] of [
- [leftType, rightType],
- [rightType, leftType],
- ] as const) {
+ for (
+ const [baseType, otherType] of [
+ [leftType, rightType],
+ [rightType, leftType],
+ ] as const
+ ) {
if (
!allowNumberAndString &&
isTypeFlagSetInUnion(baseType, ts.TypeFlags.StringLike) &&
diff --git ORI/typescript-eslint/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts ALT/typescript-eslint/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts
index 1ea0b7c..9057102 100644
--- ORI/typescript-eslint/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts
+++ ALT/typescript-eslint/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts
@@ -126,9 +126,9 @@ export default createRule<Options, MessageIds>({
const missingLiteralBranchTypes: ts.Type[] = [];
for (const unionPart of tsutils.unionTypeParts(discriminantType)) {
- for (const intersectionPart of tsutils.intersectionTypeParts(
- unionPart,
- )) {
+ for (
+ const intersectionPart of tsutils.intersectionTypeParts(unionPart)
+ ) {
if (
caseTypes.has(intersectionPart) ||
!isTypeLiteralLikeType(intersectionPart)
diff --git ORI/typescript-eslint/packages/eslint-plugin/tests/docs.test.ts ALT/typescript-eslint/packages/eslint-plugin/tests/docs.test.ts
index 049c0d1..245a51b 100644
--- ORI/typescript-eslint/packages/eslint-plugin/tests/docs.test.ts
+++ ALT/typescript-eslint/packages/eslint-plugin/tests/docs.test.ts
@@ -246,9 +246,9 @@ describe('Validating rule docs', () => {
for (const schemaItem of schema) {
if (schemaItem.type === 'object') {
- for (const property of Object.keys(
- schemaItem.properties as object,
- )) {
+ for (
+ const property of Object.keys(schemaItem.properties as object)
+ ) {
if (!headingTextAfterOptions.includes(`\`${property}\``)) {
throw new Error(
`At least one header should include \`${property}\`.`,
diff --git ORI/typescript-eslint/packages/integration-tests/tests/flat-config-types.test.ts ALT/typescript-eslint/packages/integration-tests/tests/flat-config-types.test.ts
index a8483fb..46f7841 100644
--- ORI/typescript-eslint/packages/integration-tests/tests/flat-config-types.test.ts
+++ ALT/typescript-eslint/packages/integration-tests/tests/flat-config-types.test.ts
@@ -3,11 +3,13 @@ import {
typescriptIntegrationTest,
} from '../tools/integration-test-base';
-for (const additionalFlags of [
- [],
- ['--strictNullChecks'],
- ['--strictNullChecks', '--exactOptionalPropertyTypes'],
-]) {
+for (
+ const additionalFlags of [
+ [],
+ ['--strictNullChecks'],
+ ['--strictNullChecks', '--exactOptionalPropertyTypes'],
+ ]
+) {
typescriptIntegrationTest(
`typescript${additionalFlags.length ? ` with ${additionalFlags.join(', ')}` : ''}`,
__filename,
diff --git ORI/typescript-eslint/packages/rule-tester/src/utils/dependencyConstraints.ts ALT/typescript-eslint/packages/rule-tester/src/utils/dependencyConstraints.ts
index e651356..a863c71 100644
--- ORI/typescript-eslint/packages/rule-tester/src/utils/dependencyConstraints.ts
+++ ALT/typescript-eslint/packages/rule-tester/src/utils/dependencyConstraints.ts
@@ -36,9 +36,9 @@ export function satisfiesAllDependencyConstraints(
return true;
}
- for (const [packageName, constraint] of Object.entries(
- dependencyConstraints,
- )) {
+ for (
+ const [packageName, constraint] of Object.entries(dependencyConstraints)
+ ) {
if (!satisfiesDependencyConstraint(packageName, constraint)) {
return false;
}
diff --git ORI/typescript-eslint/packages/typescript-estree/src/convert.ts ALT/typescript-eslint/packages/typescript-estree/src/convert.ts
index 9d068cb..1ce94cd 100644
--- ORI/typescript-eslint/packages/typescript-estree/src/convert.ts
+++ ALT/typescript-eslint/packages/typescript-estree/src/convert.ts
@@ -3228,10 +3228,12 @@ export class Converter {
);
}
- for (const decorator of getDecorators(
- node,
- /* includeIllegalDecorators */ true,
- ) ?? []) {
+ for (
+ const decorator of getDecorators(
+ node,
+ /* includeIllegalDecorators */ true,
+ ) ?? []
+ ) {
// `checkGrammarModifiers` function in typescript
if (!nodeCanBeDecorated(node as TSNode)) {
if (ts.isMethodDeclaration(node) && !nodeIsPresent(node.body)) {
@@ -3245,10 +3247,12 @@ export class Converter {
}
}
- for (const modifier of getModifiers(
- node,
- /* includeIllegalModifiers */ true,
- ) ?? []) {
+ for (
+ const modifier of getModifiers(
+ node,
+ /* includeIllegalModifiers */ true,
+ ) ?? []
+ ) {
if (modifier.kind !== SyntaxKind.ReadonlyKeyword) {
if (
node.kind === SyntaxKind.PropertySignature ||
diff --git ORI/typescript-eslint/packages/website/blog/2023-07-09-announcing-typescript-eslint-v6.md ALT/typescript-eslint/packages/website/blog/2023-07-09-announcing-typescript-eslint-v6.md
index e035274..b98f412 100644
--- ORI/typescript-eslint/packages/website/blog/2023-07-09-announcing-typescript-eslint-v6.md
+++ ALT/typescript-eslint/packages/website/blog/2023-07-09-announcing-typescript-eslint-v6.md
@@ -432,9 +432,11 @@ function createDiffPatch(v5, v6) {
const v6Keys = new Set(Object.keys(v6));
const output = ['{'];
- for (const key of Array.from(new Set([...v5Keys, ...v6Keys])).sort((a, b) =>
- trimSlash(a).localeCompare(trimSlash(b)),
- )) {
+ for (
+ const key of Array.from(new Set([...v5Keys, ...v6Keys])).sort((a, b) =>
+ trimSlash(a).localeCompare(trimSlash(b)),
+ )
+ ) {
const prefix = v5Keys.has(key) ? (v6Keys.has(key) ? ' ' : '-') : '+';
output.push(`${prefix} '${key}': '...',`);
diff --git ORI/typescript-eslint/packages/website/plugins/generated-rule-docs/utils.ts ALT/typescript-eslint/packages/website/plugins/generated-rule-docs/utils.ts
index d8a2d61..57ad219 100644
--- ORI/typescript-eslint/packages/website/plugins/generated-rule-docs/utils.ts
+++ ALT/typescript-eslint/packages/website/plugins/generated-rule-docs/utils.ts
@@ -43,10 +43,12 @@ export function convertToPlaygroundHash(eslintrc: string): string {
}
export function getUrlForRuleTest(ruleName: string): string {
- for (const localPath of [
- `tests/rules/${ruleName}.test.ts`,
- `tests/rules/${ruleName}/`,
- ]) {
+ for (
+ const localPath of [
+ `tests/rules/${ruleName}.test.ts`,
+ `tests/rules/${ruleName}/`,
+ ]
+ ) {
if (fs.existsSync(`${eslintPluginDirectory}/${localPath}`)) {
return `${sourceUrlPrefix}${localPath}`;
}
diff --git ORI/typescript-eslint/packages/website/src/components/editor/createProvideTwoslashInlay.ts ALT/typescript-eslint/packages/website/src/components/editor/createProvideTwoslashInlay.ts
index 4a2c6d2..501ca76 100644
--- ORI/typescript-eslint/packages/website/src/components/editor/createProvideTwoslashInlay.ts
+++ ALT/typescript-eslint/packages/website/src/components/editor/createProvideTwoslashInlay.ts
@@ -41,9 +41,11 @@ export function createTwoslashInlayProvider(
const results: Monaco.languages.InlayHint[] = [];
- for (const result of await Promise.all(
- queryMatches.map(q => resolveInlayHint(q)),
- )) {
+ for (
+ const result of await Promise.all(
+ queryMatches.map(q => resolveInlayHint(q)),
+ )
+ ) {
if (result) {
results.push(result);
} |
prettier/prettier#16768 VS prettier/prettier@main :: vega/vega-lite@a573af5 Diff (62 lines)diff --git ORI/vega-lite/src/compile/data/geojson.ts ALT/vega-lite/src/compile/data/geojson.ts
index 6e47d59..f716dfa 100644
--- ORI/vega-lite/src/compile/data/geojson.ts
+++ ALT/vega-lite/src/compile/data/geojson.ts
@@ -20,10 +20,12 @@ export class GeoJSONNode extends DataFlowNode {
let geoJsonCounter = 0;
- for (const coordinates of [
- [LONGITUDE, LATITUDE],
- [LONGITUDE2, LATITUDE2]
- ] as Vector2<GeoPositionChannel>[]) {
+ for (
+ const coordinates of [
+ [LONGITUDE, LATITUDE],
+ [LONGITUDE2, LATITUDE2]
+ ] as Vector2<GeoPositionChannel>[]
+ ) {
const pair = coordinates.map(channel => {
const def = getFieldOrDatumDef(model.encoding[channel]);
return isFieldDef(def)
diff --git ORI/vega-lite/src/compile/data/geopoint.ts ALT/vega-lite/src/compile/data/geopoint.ts
index a885913..b832d27 100644
--- ORI/vega-lite/src/compile/data/geopoint.ts
+++ ALT/vega-lite/src/compile/data/geopoint.ts
@@ -26,10 +26,12 @@ export class GeoPointNode extends DataFlowNode {
return parent;
}
- for (const coordinates of [
- [LONGITUDE, LATITUDE],
- [LONGITUDE2, LATITUDE2]
- ] as Vector2<GeoPositionChannel>[]) {
+ for (
+ const coordinates of [
+ [LONGITUDE, LATITUDE],
+ [LONGITUDE2, LATITUDE2]
+ ] as Vector2<GeoPositionChannel>[]
+ ) {
const pair = coordinates.map(channel => {
const def = getFieldOrDatumDef(model.encoding[channel]);
return isFieldDef(def)
diff --git ORI/vega-lite/src/compile/projection/parse.ts ALT/vega-lite/src/compile/projection/parse.ts
index 3eb1000..b6c233c 100644
--- ORI/vega-lite/src/compile/projection/parse.ts
+++ ALT/vega-lite/src/compile/projection/parse.ts
@@ -47,10 +47,12 @@ function gatherFitData(model: UnitModel) {
const {encoding} = model;
- for (const posssiblePair of [
- [LONGITUDE, LATITUDE],
- [LONGITUDE2, LATITUDE2]
- ]) {
+ for (
+ const posssiblePair of [
+ [LONGITUDE, LATITUDE],
+ [LONGITUDE2, LATITUDE2]
+ ]
+ ) {
if (getFieldOrDatumDef(encoding[posssiblePair[0]]) || getFieldOrDatumDef(encoding[posssiblePair[1]])) {
data.push({
signal: model.getName(`geojson_${data.length}`) |
No description provided.
The text was updated successfully, but these errors were encountered: