""} />;
;
-
;
+
;
;
;
GitHub Desktop has encountered an unrecoverable error and will need to 1231231
restart. This has been reported to the team, but if youencounter this121312331
repeatedly please report this issue to the GitHub 12312312312312313{" "}{" "}
;
```
**Prettier Similarity**: 79.41%
### jsx/jsx/regex.js
**Prettier Similarity**: 100.00%
### jsx/jsx/return-statement.js
**Prettier Similarity**: 100.00%
### jsx/jsx/self-closing.js
**Prettier Similarity**: 100.00%
### jsx/jsx/spacing.js
**Prettier Similarity**: 100.00%
### jsx/jsx/template-literal-in-attr.js
**Prettier Similarity**: 100.00%
### jsx/jsx/ternary.js
**Prettier Similarity**: 100.00%
### jsx/last-line/last_line.js
**Prettier Similarity**: 100.00%
### jsx/last-line/single_prop_multiline_string.js
**Prettier Similarity**: 100.00%
### jsx/multiline-assign/test.js
**Prettier Similarity**: 100.00%
### jsx/namespace/jsx_namespaced_name.js
**Prettier Similarity**: 100.00%
### jsx/newlines/test.js
**Prettier Similarity**: 100.00%
### jsx/newlines/windows.js
**Prettier Similarity**: 100.00%
### jsx/optional-chaining/optional-chaining.jsx
**Prettier Similarity**: 100.00%
### jsx/significant-space/comments.js
**Prettier Similarity**: 100.00%
### jsx/significant-space/test.js
**Prettier Similarity**: 100.00%
### jsx/single-attribute-per-line/single-attribute-per-line.js
**Prettier Similarity**: 100.00%
### jsx/split-attrs/test.js
**Prettier Similarity**: 100.00%
### jsx/spread/attribute.js
```diff
;
;
;
;
-
;
+
;
;
;
;
;
```
**Prettier Similarity**: 86.11%
### jsx/spread/child.js
```diff
{...a}
;
{...a /* comment */}
;
-
{/* comment */ ...a}
;
+
{.../* comment */ a}
;
{
...a //comment
}
;
{
...a
//comment
}
;
{
- //comment
- ...a
+ ...//comment
+ a
}
;
{
- //comment
- ...a // comment
+ ...//comment
+ a // comment
}
;
```
**Prettier Similarity**: 84.38%
### jsx/stateless-arrow-fn/test.js
**Prettier Similarity**: 100.00%
### jsx/text-wrap/test.js
**Prettier Similarity**: 100.00%
### typescript/abstract-class/export-default.ts
**Prettier Similarity**: 100.00%
### typescript/abstract-construct-types/abstract-construct-types.ts
**Prettier Similarity**: 100.00%
### typescript/abstract-property/semicolon.ts
**Prettier Similarity**: 100.00%
### typescript/ambient/ambient.ts
**Prettier Similarity**: 100.00%
### typescript/angular-component-examples/test.component.ts
**Prettier Similarity**: 100.00%
### typescript/argument-expansion/argument_expansion.ts
**Prettier Similarity**: 100.00%
### typescript/argument-expansion/arrow-with-return-type.ts
**Prettier Similarity**: 100.00%
### typescript/array/comment.ts
**Prettier Similarity**: 100.00%
### typescript/array/key.ts
**Prettier Similarity**: 100.00%
### typescript/arrow/arrow_regression.ts
**Prettier Similarity**: 100.00%
### typescript/arrow/comments.ts
```diff
const fn1 = () => {
return;
-}; /* foo */
+} /* foo */;
const fn2 = () => {
return;
};
// foo
```
**Prettier Similarity**: 88.89%
### typescript/arrow/issue-6107-curry.ts
**Prettier Similarity**: 100.00%
### typescript/arrows/arrow_function_expression.ts
**Prettier Similarity**: 100.00%
### typescript/arrows/short_body.ts
**Prettier Similarity**: 100.00%
### typescript/arrows/type_params.ts
**Prettier Similarity**: 100.00%
### typescript/as/array-pattern.ts
**Prettier Similarity**: 100.00%
### typescript/as/as.ts
**Prettier Similarity**: 100.00%
### typescript/as/assignment.ts
**Prettier Similarity**: 100.00%
### typescript/as/assignment2.ts
**Prettier Similarity**: 100.00%
### typescript/as/export_default_as.ts
**Prettier Similarity**: 100.00%
### typescript/as/expression-statement.ts
**Prettier Similarity**: 100.00%
### typescript/as/long-identifiers.ts
**Prettier Similarity**: 100.00%
### typescript/as/nested-await-and-as.ts
**Prettier Similarity**: 100.00%
### typescript/as/return.ts
**Prettier Similarity**: 100.00%
### typescript/as/ternary.ts
**Prettier Similarity**: 100.00%
### typescript/assert/comment.ts
**Prettier Similarity**: 100.00%
### typescript/assert/index.ts
**Prettier Similarity**: 100.00%
### typescript/assignment/issue-10846.ts
**Prettier Similarity**: 100.00%
### typescript/assignment/issue-10848.tsx
**Prettier Similarity**: 100.00%
### typescript/assignment/issue-10850.ts
**Prettier Similarity**: 100.00%
### typescript/assignment/issue-12413.ts
**Prettier Similarity**: 100.00%
### typescript/assignment/issue-2322.ts
**Prettier Similarity**: 100.00%
### typescript/assignment/issue-2482.ts
**Prettier Similarity**: 100.00%
### typescript/assignment/issue-2485.ts
**Prettier Similarity**: 100.00%
### typescript/assignment/issue-3122.ts
**Prettier Similarity**: 100.00%
### typescript/assignment/issue-5370.ts
```diff
-const durabilityMetricsSelectable: Immutable.OrderedSet
=
- myExperienceSelectable.concat(otherDurabilityMetricsSelectable);
+const durabilityMetricsSelectable: Immutable.OrderedSet<
+ SomeReportingMetric,
+> = myExperienceSelectable.concat(otherDurabilityMetricsSelectable);
```
**Prettier Similarity**: 0.00%
### typescript/assignment/issue-6783.ts
**Prettier Similarity**: 100.00%
### typescript/assignment/issue-8619.ts
**Prettier Similarity**: 100.00%
### typescript/assignment/issue-9172.ts
**Prettier Similarity**: 100.00%
### typescript/assignment/lone-arg.ts
**Prettier Similarity**: 100.00%
### typescript/assignment/parenthesized.ts
**Prettier Similarity**: 100.00%
### typescript/bigint/bigint.ts
**Prettier Similarity**: 100.00%
### typescript/break-calls/type_args.ts
**Prettier Similarity**: 100.00%
### typescript/call-signature/call-signature.ts
**Prettier Similarity**: 100.00%
### typescript/cast/as-const.ts
**Prettier Similarity**: 100.00%
### typescript/cast/assert-and-assign.ts
**Prettier Similarity**: 100.00%
### typescript/cast/generic-cast.ts
**Prettier Similarity**: 100.00%
### typescript/cast/hug-args.ts
**Prettier Similarity**: 100.00%
### typescript/cast/parenthesis.ts
**Prettier Similarity**: 100.00%
### typescript/cast/tuple-and-record.ts
```diff
breakAfterCast = | undefined>(
(permissions)[receiverType]
);
-breakAfterCast = | undefined>(
- (permissions)(#[receiverType])
-);
+breakAfterCast = | undefined>(permissions)(#[receiverType]);
testObjLiteral = | undefined>{ prop1: "myPropVal" };
-testObjLiteral = | undefined>#{ prop1: "myPropVal" };
+testObjLiteral = | undefined>
+#
+{
+ prop1: "myPropVal";
+}
```
**Prettier Similarity**: 45.45%
### typescript/catch-clause/type-annotation.ts
**Prettier Similarity**: 100.00%
### typescript/chain-expression/test.ts
```diff
-(a?.b)!.c;
-(a?.())!.b;
-(a?.b)!.c;
-(a?.())!.b;
+a?.b!.c;
+a?.()!.b;
+a?.b!.c;
+a?.()!.b;
```
**Prettier Similarity**: 0.00%
### typescript/class-comment/class-implements.ts
**Prettier Similarity**: 100.00%
### typescript/class-comment/declare.ts
**Prettier Similarity**: 100.00%
### typescript/class-comment/generic.ts
**Prettier Similarity**: 100.00%
### typescript/class-comment/misc.ts
**Prettier Similarity**: 100.00%
### typescript/class/abstract-method.ts
**Prettier Similarity**: 100.00%
### typescript/class/constructor.ts
```diff
class C {
constructor(override a: number) {}
}
class D {
constructor(private a: number) {}
}
class E {
constructor(protected a: number) {}
}
class F {
constructor(public a: number) {}
}
class G {
constructor(readonly a: number) {}
}
class A {
- "constructor": typeof A;
+ 'constructor': typeof A
static Foo() {
return new A();
}
}
class B {
constructor<>() {}
}
```
**Prettier Similarity**: 96.15%
### typescript/class/declare-readonly-field-initializer-w-annotation.ts
**Prettier Similarity**: 100.00%
### typescript/class/declare-readonly-field-initializer.ts
**Prettier Similarity**: 100.00%
### typescript/class/dunder.ts
**Prettier Similarity**: 100.00%
### typescript/class/duplicates-access-modifier.ts
```diff
class Foo {
- public a;
- private b;
- protected c;
- public d;
- public e;
+ public public a;
+ private public b;
+ protected private c;
+ public protected d;
+ public protected private e;
}
```
**Prettier Similarity**: 28.57%
### typescript/class/empty-method-body.ts
```diff
// #9324
class foo1 {
- bar /* bat */();
+ bar() /* bat */;
}
// #9367
class Test {
- foo /* 3 */(/* 2 */);
+ foo(/* 2 */) /* 3 */;
}
```
**Prettier Similarity**: 80.00%
### typescript/class/extends_implements.ts
**Prettier Similarity**: 100.00%
### typescript/class/generics.ts
**Prettier Similarity**: 100.00%
### typescript/class/methods.ts
**Prettier Similarity**: 100.00%
### typescript/class/optional.ts
**Prettier Similarity**: 100.00%
### typescript/class/parameter-properties.ts
**Prettier Similarity**: 100.00%
### typescript/class/quoted-property.ts
```diff
class User {
- "username": string;
+ username: string;
}
```
**Prettier Similarity**: 66.67%
### typescript/class/standard_private_fields.ts
**Prettier Similarity**: 100.00%
### typescript/classes/break-heritage.ts
**Prettier Similarity**: 100.00%
### typescript/classes/break.ts
**Prettier Similarity**: 100.00%
### typescript/comments-2/dangling.ts
**Prettier Similarity**: 100.00%
### typescript/comments-2/issues.ts
**Prettier Similarity**: 100.00%
### typescript/comments-2/last-arg.ts
**Prettier Similarity**: 100.00%
### typescript/comments/abstract_class.ts
**Prettier Similarity**: 100.00%
### typescript/comments/abstract_methods.ts
**Prettier Similarity**: 100.00%
### typescript/comments/after_jsx_generic.tsx
**Prettier Similarity**: 100.00%
### typescript/comments/declare_function.ts
```diff
declare function fn(
currentRequest: { a: number },
// TODO this is a very very very very long comment that makes it go > 80 columns
): number;
-declare function /* foo */ f(/* baz */ a /* taz */); /* bar */
+declare function /* foo */ f(/* baz */ a /* taz */) /* bar */;
```
**Prettier Similarity**: 83.33%
### typescript/comments/interface.ts
**Prettier Similarity**: 100.00%
### typescript/comments/issues.ts
**Prettier Similarity**: 100.00%
### typescript/comments/jsx.tsx
**Prettier Similarity**: 100.00%
### typescript/comments/location.ts
**Prettier Similarity**: 100.00%
### typescript/comments/mapped_types.ts
```diff
type A = {
// commentA
[a in A]: string;
};
type B = {
/* commentB */ [b in B]: string;
};
type C = {
[/* commentC */ c in C]: string;
};
type D = {
[d /* commentD */ in D]: string;
};
type E = {
[e in /* commentE */ E]: string;
};
type F = {
[f in F /* commentF */]: string;
};
type G = {
- [g in G /* commentG */]: string;
+ [g in G] /* commentG */ : string;
};
type H = { [/* commentH */ h in H]: string };
type I = { [/* commentI */ i in I]: string };
type J = { [j /* commentJ */ in J]: string };
type K = { [k in /* commentK */ K]: string };
type L = { [l in L /* commentL */]: string };
-type M = { [m in M /* commentG */]: string };
+type M = { [m in M] /* commentG */ : string };
```
**Prettier Similarity**: 95.00%
### typescript/comments/method_types.ts
```diff
interface foo1 {
bar3 /* foo */(/* baz */); // bat
- bar /* foo */ /* bar */?(/* baz */) /* bat */;
+ bar /* foo */?/* bar */ (/* baz */) /* bat */;
bar2 /* foo */(/* baz */) /* bat */;
}
interface foo2 {
- bar /* foo */?(/* bar */ bar: /* baz */ string): /* bat */ string;
+ bar /* foo */?/* bar */ (bar: /* baz */ string): /* bat */ string;
}
interface foo3 {
/* foo */ (/* bar */): /* baz */ string;
}
interface foo4 {
/* foo */ (bar: /* bar */ string): /* baz */ string;
}
interface foo5 {
- /* foo */ new (/* bar */ a: /* baz */ string): /* bat */ string;
+ /* foo */ new /* bar */ (a: /* baz */ string): /* bat */ string;
}
interface foo6 {
- /* foo */ new (/* baz */) /* bar */ : /* bat */ string;
+ /* foo */ new /* bar */ (/* baz */): /* bat */ string;
}
type foo7 = /* foo */ (/* bar */) /* baz */ => void;
type foo8 = /* foo */ (a: /* bar */ string) /* baz */ => void;
-let foo9: new (/* bar */) /* foo */ /* baz */ => string;
+let foo9: new /* foo */ (/* bar */) /* baz */ => string;
-let foo10: new (/* foo */ a: /* bar */ string) /* baz */ => string;
+let foo10: new /* foo */ (a: /* bar */ string) /* baz */ => string;
abstract class Test {
abstract foo12 /* foo */(a: /* bar */ string): /* baz */ void;
abstract foo13 /* foo */(/* bar */); /* baz */
}
```
**Prettier Similarity**: 84.62%
### typescript/comments/methods.ts
**Prettier Similarity**: 100.00%
### typescript/comments/ts-parameter-proerty.ts
**Prettier Similarity**: 100.00%
### typescript/comments/type-parameters.ts
```diff
functionName();
const a: T* comment */> = 1;
functionName* comment */>();
function foo* comment */>() {}
interface Foo {
- * comment */>(arg): any;
+ * comment */>(arg): any;
}
type T = * comment */>(arg) => any;
functionName(); // comment
const a: T<
// comment
> = 1;
functionName<
// comment
>();
function foo<
// comment
>() {}
interface Foo {
<
A, // comment
>(
arg,
): any;
}
type T = <
// comment
->(
- arg,
-) => any;
+>(arg) => any;
```
**Prettier Similarity**: 87.10%
### typescript/comments/type_literals.ts
**Prettier Similarity**: 100.00%
### typescript/comments/types.ts
**Prettier Similarity**: 100.00%
### typescript/comments/union.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/ClassDeclaration22.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/anyIsAssignableToObject.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/castOfAwait.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/castParentheses.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/castTest.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/checkInfiniteExpansionTermination.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/commentInNamespaceDeclarationWithIdentifierPathName.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/commentsInterface.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/contextualSignatureInstantiation2.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/declareDottedModuleName.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/decrementAndIncrementOperators.ts
```diff
var x = 0;
// errors
1++;
-1++;
-1--;
+(1)++;
+(1)--;
-++1;
---1;
+++(1);
+--(1);
(1 + 2)++;
(1 + 2)--;
++(1 + 2);
--(1 + 2);
(x + x)++;
(x + x)--;
++(x + x);
--(x + x);
//OK
x++;
x--;
++x;
--x;
x++;
--x;
x++;
x--;
x[x++]++;
```
**Prettier Similarity**: 89.19%
### typescript/compiler/es5ExportDefaultClassDeclaration4.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/functionOverloadsOnGenericArity1.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/globalIsContextualKeyword.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/indexSignatureWithInitializer.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/mappedTypeWithCombinedTypeMappers.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/modifiersOnInterfaceIndexSignature1.ts
**Prettier Similarity**: 100.00%
### typescript/compiler/privacyGloImport.ts
**Prettier Similarity**: 100.00%
### typescript/conditional-types/comments.ts
**Prettier Similarity**: 100.00%
### typescript/conditional-types/conditonal-types.ts
**Prettier Similarity**: 100.00%
### typescript/conditional-types/infer-type.ts
**Prettier Similarity**: 100.00%
### typescript/conditional-types/nested-in-condition.ts
**Prettier Similarity**: 100.00%
### typescript/conditional-types/new-ternary-spec.ts
**Prettier Similarity**: 100.00%
### typescript/conditional-types/parentheses.ts
```diff
// #13275
type Foo = T extends ((...a: any[]) => infer R extends string) ? R : never;
-type Foo = T extends (new (...a: any[]) => infer R extends string)
+type Foo = T extends (new (
+ ...a: any[]
+) => infer R extends string)
? R
: never;
// #14275
-type Test = T extends ((
+type Test = T extends (
token: TSESTree.Token,
-) => token is infer U extends TSESTree.Token)
+) => token is infer U extends TSESTree.Token
? U
: TSESTree.Token;
-type Test = T extends ((
+type Test = T extends (
token: TSESTree.Token,
-) => asserts token is infer U extends TSESTree.Token)
+) => asserts token is infer U extends TSESTree.Token
? U
: TSESTree.Token;
type Test = T extends (new (
- token: TSESTree.Token,
-) => token is infer U extends TSESTree.Token)
+ token: TSESTree.Token
+) => token is infer U extends TSESTree.Token
+)
? U
- : TSESTree.Token;
+ : TSESTree.Token
```
**Prettier Similarity**: 56.00%
### typescript/conformance/ambient/ambientDeclarations.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/abstract.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAccessor.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAsIdentifier.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAssignabilityConstructorFunction.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractClinterfaceAssignability.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractConstructorAssignability.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractCrashedOnce.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractExtends.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractFactoryFunction.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractGeneric.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractImportInstantiation.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInAModule.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInheritance.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations1.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations2.ts
```diff
class A {}
abstract class B {
foo(): number {
return this.bar();
}
abstract bar(): number;
}
new B();
var BB: typeof B = B;
var AA: typeof A = BB;
new AA();
function constructB(Factory: typeof B) {
new Factory();
}
var BB = B;
new BB();
var x: any = C;
new x();
class C extends B {}
abstract class D extends B {}
class E extends B {
bar() {
return 1;
}
}
abstract class F extends B {
abstract foo(): number;
bar() {
return 2;
}
}
abstract class G {
abstract qux(x: number): string;
abstract qux(): number;
y: number;
abstract quz(x: number, y: string): boolean;
abstract nom(): boolean;
nom(x: number): boolean;
}
class H {
- abstract baz(): number;
+ abstract baz() : number;
}
```
**Prettier Similarity**: 98.18%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMethodInNonAbstractClass.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMixedWithModifiers.ts
```diff
abstract class A {
abstract foo_a();
public abstract foo_b();
protected abstract foo_c();
private abstract foo_d();
- public abstract foo_bb();
- protected abstract foo_cc();
- private abstract foo_dd();
+ abstract public foo_bb();
+ abstract protected foo_cc();
+ abstract private foo_dd();
- static abstract foo_d();
+ abstract static foo_d();
static abstract foo_e();
}
```
**Prettier Similarity**: 73.33%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractOverloads.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractOverrideWithAbstract.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractProperties.ts
```diff
abstract class A {
abstract x: number;
public abstract y: number;
protected abstract z: number;
- private abstract w: number;
+ private abstract w : number;
abstract m: () => void;
abstract foo_x(): number;
public abstract foo_y(): number;
protected abstract foo_z(): number;
- private abstract foo_w(): number;
+ private abstract foo_w() : number;
}
```
**Prettier Similarity**: 84.62%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractSingleLineDecl.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractSuperCalls.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractUsingAbstractMethod1.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractUsingAbstractMethods2.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractWithInterface.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classHeritageSpecification/classAppearsToHaveMembersOfObject.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingClass.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classHeritageSpecification/classIsSubtypeOfBaseType.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classDeclarations/classInsideBlock.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/classExpression.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/constructorDeclarations/constructorParameters/constructorDefaultValuesReferencingThis.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/constructorDeclarations/constructorParameters/constructorOverloadsWithDefaultValues.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/constructorDeclarations/constructorParameters/constructorOverloadsWithOptionalParameters.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/constructorDeclarations/constructorParameters/declarationEmitReadonly.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/constructorDeclarations/constructorParameters/readonlyConstructorAssignment.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/constructorDeclarations/constructorParameters/readonlyInConstructorParameters.ts
```diff
class C {
constructor(readonly x: number) {}
}
new C(1).x = 2;
class E {
- constructor(public readonly x: number) {}
+ constructor(readonly public x: number) {}
}
class F {
constructor(private readonly x: number) {}
}
new F(1).x;
```
**Prettier Similarity**: 92.31%
### typescript/conformance/classes/constructorDeclarations/constructorParameters/readonlyReadonly.ts
```diff
class C {
- readonly x: number;
- constructor(readonly y: number) {}
+ readonly readonly x: number;
+ constructor(readonly readonly y: number) {}
}
```
**Prettier Similarity**: 50.00%
### typescript/conformance/classes/mixinAccessModifiers.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/mixinClassesAnnotated.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/mixinClassesAnonymous.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/mixinClassesMembers.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/classes/nestedClassDeclaration.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/comments/comments.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/declarationEmit/typePredicates/declarationEmitThisPredicatesWithPrivateName01.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/es6/Symbols/symbolProperty15.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAdditionES6.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/expressions/asOperator/asOperatorContextualType.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/expressions/functionCalls/callWithSpreadES6.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes2.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/internalModules/importDeclarations/circularImportAlias.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/internalModules/importDeclarations/exportImportAlias.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/internalModules/importDeclarations/exportInterface.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/internalModules/importDeclarations/importAliasIdentifiers.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/internalModules/importDeclarations/shadowedInternalModule.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts
```diff
//@target: ES5
-for (var of of) {
-}
+for (var of of) { }
```
**Prettier Similarity**: 33.33%
### typescript/conformance/parser/ecmascript5/Statements/parserForInStatement2.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/ambient/ambientDeclarations.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/any/anyAsConstructor.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/any/anyAsFunctionCall.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/any/anyAsGenericFunctionCall.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/any/anyPropertyAccess.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/constKeyword/constKeyword.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/constructorType/cunstructorType.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/enumDeclaration/enumDeclaration.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/firstTypeNode/firstTypeNode.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/functions/TSFunctionTypeNoUnnecessaryParentheses.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/functions/functionImplementationErrors.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/functions/functionImplementations.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/functions/functionOverloadCompatibilityWithVoid01.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/functions/functionOverloadCompatibilityWithVoid02.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/functions/functionOverloadCompatibilityWithVoid03.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/functions/functionOverloadErrorsSyntax.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/functions/functionTypeTypeParameters.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/functions/parameterInitializersForwardReferencing.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/importEqualsDeclaration/importEqualsDeclaration.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/indexedAccesType/indexedAccesType.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/interfaceDeclaration/interfaceDeclaration.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/intersectionType/intersectionType.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/lastTypeNode/lastTypeNode.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/mappedType/mappedType.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/methodSignature/methodSignature.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/moduleDeclaration/kind-detection.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/moduleDeclaration/moduleDeclaration.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/namespaceExportDeclaration/exportAsNamespace.d.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/never/never.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/nonNullExpression/nonNullExpression.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/parameterProperty/parameterProperty.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/symbol/symbol.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/thisType/thisType.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/contextualTypeWithTuple.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/indexerWithTuple.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/tupleElementTypes1.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/tupleElementTypes2.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/tupleElementTypes3.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/tupleElementTypes4.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/typeInferenceWithTupleType.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/wideningTuples1.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/wideningTuples2.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/wideningTuples3.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/wideningTuples4.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/wideningTuples5.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/wideningTuples6.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/tuple/wideningTuples7.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/typeOperator/typeOperator.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/typeParameter/typeParameter.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/typeParameters/typeParameterLists/innerTypeParameterShadowingOuterOne.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/typeParameters/typeParameterLists/innerTypeParameterShadowingOuterOne2.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/typeParameters/typeParameterLists/staticMembersUsingClassTypeParameter.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/typeParameters/typeParameterLists/typeParametersAvailableInNestedScope2.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/typeReference/typeReference.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/undefined/undefined.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/union/unionTypeCallSignatures.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/union/unionTypeCallSignatures3.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/union/unionTypeCallSignatures4.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/union/unionTypeConstructSignatures.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/union/unionTypeEquivalence.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/union/unionTypeFromArrayLiteral.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/union/unionTypeIndexSignature.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/union/unionTypePropertyAccessibility.ts
**Prettier Similarity**: 100.00%
### typescript/conformance/types/variableDeclarator/variableDeclarator.ts
**Prettier Similarity**: 100.00%
### typescript/const/initializer-ambient-context.ts
**Prettier Similarity**: 100.00%
### typescript/cursor/array-pattern.ts
**Prettier Similarity**: 100.00%
### typescript/cursor/arrow-function-type.ts
**Prettier Similarity**: 100.00%
### typescript/cursor/class-property.ts
**Prettier Similarity**: 100.00%
### typescript/cursor/function-return-type.ts
**Prettier Similarity**: 100.00%
### typescript/cursor/identifier-1.ts
**Prettier Similarity**: 100.00%
### typescript/cursor/identifier-2.ts
**Prettier Similarity**: 100.00%
### typescript/cursor/identifier-3.ts
**Prettier Similarity**: 100.00%
### typescript/cursor/method-signature.ts
**Prettier Similarity**: 100.00%
### typescript/cursor/property-signature.ts
**Prettier Similarity**: 100.00%
### typescript/cursor/rest.ts
**Prettier Similarity**: 100.00%
### typescript/custom/abstract/abstractNewlineHandling.ts
**Prettier Similarity**: 100.00%
### typescript/custom/abstract/abstractProperties.ts
```diff
abstract class Foo {
- private abstract a: 1;
+ abstract private a: 1;
private abstract b: 2;
static abstract c: 3;
- private abstract ["g"];
- private abstract ["h"];
- static abstract ["i"];
+ abstract private ['g'];
+ private abstract ['h'];
+ static abstract ['i'];
}
```
**Prettier Similarity**: 50.00%
### typescript/custom/call/callSignature.ts
**Prettier Similarity**: 100.00%
### typescript/custom/computedProperties/string.ts
**Prettier Similarity**: 100.00%
### typescript/custom/computedProperties/symbol.ts
**Prettier Similarity**: 100.00%
### typescript/custom/declare/declareModifier.d.ts
**Prettier Similarity**: 100.00%
### typescript/custom/modifiers/minustoken.ts
**Prettier Similarity**: 100.00%
### typescript/custom/modifiers/question.ts
**Prettier Similarity**: 100.00%
### typescript/custom/modifiers/readonly.ts
**Prettier Similarity**: 100.00%
### typescript/custom/module/global.ts
**Prettier Similarity**: 100.00%
### typescript/custom/module/moduleNamespace.ts
**Prettier Similarity**: 100.00%
### typescript/custom/module/nestedNamespace.ts
**Prettier Similarity**: 100.00%
### typescript/custom/new/newKeyword.ts
**Prettier Similarity**: 100.00%
### typescript/custom/stability/moduleBlock.ts
**Prettier Similarity**: 100.00%
### typescript/custom/typeParameters/callAndConstructSignatureLong.ts
**Prettier Similarity**: 100.00%
### typescript/custom/typeParameters/functionTypeLong.ts
**Prettier Similarity**: 100.00%
### typescript/custom/typeParameters/interfaceParamsLong.ts
**Prettier Similarity**: 100.00%
### typescript/custom/typeParameters/typeParametersLong.ts
**Prettier Similarity**: 100.00%
### typescript/custom/typeParameters/variables.ts
**Prettier Similarity**: 100.00%
### typescript/declare/declare-get-set-field.ts
**Prettier Similarity**: 100.00%
### typescript/declare/declare_class_fields.ts
**Prettier Similarity**: 100.00%
### typescript/declare/declare_enum.ts
**Prettier Similarity**: 100.00%
### typescript/declare/declare_function.ts
**Prettier Similarity**: 100.00%
### typescript/declare/declare_function_with_body.ts
```diff
// Invalid, but recoverable
-declare function foo() {};
+declare function foo() {}
declare function bar() {
// comment
-};
+}
```
**Prettier Similarity**: 60.00%
### typescript/declare/declare_interface.ts
**Prettier Similarity**: 100.00%
### typescript/declare/declare_module.ts
**Prettier Similarity**: 100.00%
### typescript/declare/declare_namespace.ts
**Prettier Similarity**: 100.00%
### typescript/declare/declare_var.ts
**Prettier Similarity**: 100.00%
### typescript/declare/object-type-in-declare-function.ts
```diff
-declare function foo(this: {
- a: boolean;
- b: string;
- c: number;
-}): Promise>;
+declare function foo(this: { a: boolean; b: string; c: number }): Promise<
+ Array
+>;
declare function bazFlip({
a: boolean,
b: string,
c: number,
}): Promise>;
declare function bar(
...{ a: boolean, b: string, c: number }
): Promise>;
declare function bar(
...x: { a: boolean; b: string; c: number }
): Promise>;
```
**Prettier Similarity**: 73.68%
### typescript/declare/trailing-comma/function-rest-trailing-comma.ts
```diff
-declare function foo(...args: any[]);
-declare function foo(
- ...long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_args: any[]
-);
+declare function foo(...args: any[], )
+declare function foo(...long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_args: any[], )
```
**Prettier Similarity**: 0.00%
### typescript/decorator-auto-accessors/decorator-auto-accessors-new-line.ts
**Prettier Similarity**: 100.00%
### typescript/decorator-auto-accessors/decorator-auto-accessors-type-annotations.ts
**Prettier Similarity**: 100.00%
### typescript/decorator-auto-accessors/no-semi/decorator-auto-accessor-like-property-name.ts
**Prettier Similarity**: 100.00%
### typescript/decorators-ts/accessor-decorator.ts
**Prettier Similarity**: 100.00%
### typescript/decorators-ts/angular.ts
```diff
@Component({
selector: "toh-hero-button",
- template: ``,
+ template: ``,
})
export class HeroButtonComponent {
@Output() change = new EventEmitter();
@Input() label: string;
}
```
**Prettier Similarity**: 87.50%
### typescript/decorators-ts/class-decorator.ts
**Prettier Similarity**: 100.00%
### typescript/decorators-ts/method-decorator.ts
**Prettier Similarity**: 100.00%
### typescript/decorators-ts/mobx.ts
**Prettier Similarity**: 100.00%
### typescript/decorators-ts/multiple.ts
**Prettier Similarity**: 100.00%
### typescript/decorators-ts/parameter-decorator.ts
**Prettier Similarity**: 100.00%
### typescript/decorators-ts/property-decorator.ts
**Prettier Similarity**: 100.00%
### typescript/decorators-ts/typeorm.ts
```diff
@Entity()
export class Board {
@PrimaryGeneratedColumn()
id: number;
@Column()
slug: string;
@Column()
name: string;
@Column()
theme: string;
@Column()
description: string;
- @OneToMany((type) => Topic, (topic) => topic.board)
+ @OneToMany(
+ (type) => Topic,
+ (topic) => topic.board,
+ )
topics: Topic[];
}
```
**Prettier Similarity**: 82.61%
### typescript/decorators/accessor.ts
**Prettier Similarity**: 100.00%
### typescript/decorators/argument-list-preserve-line.ts
**Prettier Similarity**: 100.00%
### typescript/decorators/comments.ts
**Prettier Similarity**: 100.00%
### typescript/decorators/decorator-type-assertion.ts
**Prettier Similarity**: 100.00%
### typescript/decorators/decorators-comments.ts
```diff
class Foo1 {
@foo
- // comment
- async method() {}
+ async // comment
+ method() {}
}
class Foo2 {
@foo
// comment
private method() {}
}
class Foo3 {
@foo
- // comment
- *method() {}
+ *// comment
+ method() {}
}
class Foo4 {
@foo
- // comment
- async *method() {}
+ async *// comment
+ method() {}
}
class Something {
@foo()
// comment
readonly property: Array;
}
class Something2 {
@foo()
- // comment
- abstract property: Array;
+ // comment
+ abstract property: Array
}
```
**Prettier Similarity**: 77.14%
### typescript/decorators/decorators.ts
**Prettier Similarity**: 100.00%
### typescript/decorators/inline-decorators.ts
**Prettier Similarity**: 100.00%
### typescript/decorators/legacy.ts
**Prettier Similarity**: 100.00%
### typescript/decorators/mobx.ts
**Prettier Similarity**: 100.00%
### typescript/definite/asi.ts
**Prettier Similarity**: 100.00%
### typescript/definite/definite.ts
**Prettier Similarity**: 100.00%
### typescript/definite/without-annotation.ts
```diff
class Foo {
- a!;
- #b!;
- static c!;
- [d]! = 1;
- "e"!;
+ a!
+ #b!
+ static c!
+ [d]! = 1
+ 'e'!
}
-let a! = x;
-const b! = x;
-var c! /* */ = x;
-export const d! = x;
+let a! = x
+const b! = x
+var c/* */! = x
+export const d! = x
```
**Prettier Similarity**: 25.00%
### typescript/destructuring/destructuring.ts
**Prettier Similarity**: 100.00%
### typescript/end-of-line/multiline.ts
**Prettier Similarity**: 100.00%
### typescript/enum/computed-members.ts
**Prettier Similarity**: 100.00%
### typescript/enum/enum.ts
**Prettier Similarity**: 100.00%
### typescript/enum/multiline.ts
**Prettier Similarity**: 100.00%
### typescript/explicit-resource-management/await-using-with-type-declaration.ts
**Prettier Similarity**: 100.00%
### typescript/explicit-resource-management/using-with-type-declaration.ts
**Prettier Similarity**: 100.00%
### typescript/export-default/function_as.ts
**Prettier Similarity**: 100.00%
### typescript/export/comment.ts
**Prettier Similarity**: 100.00%
### typescript/export/default.ts
**Prettier Similarity**: 100.00%
### typescript/export/export-as-ns.ts
**Prettier Similarity**: 100.00%
### typescript/export/export-class.ts
**Prettier Similarity**: 100.00%
### typescript/export/export-type-star-from.ts
**Prettier Similarity**: 100.00%
### typescript/export/export.ts
**Prettier Similarity**: 100.00%
### typescript/function-type/consistent.ts
**Prettier Similarity**: 100.00%
### typescript/function-type/single-parameter.ts
**Prettier Similarity**: 100.00%
### typescript/function-type/type-annotation.ts
**Prettier Similarity**: 100.00%
### typescript/function/single_expand.ts
**Prettier Similarity**: 100.00%
### typescript/functional-composition/pipe-function-calls-with-comments.ts
**Prettier Similarity**: 100.00%
### typescript/functional-composition/pipe-function-calls.ts
**Prettier Similarity**: 100.00%
### typescript/generic/arrow-return-type.ts
**Prettier Similarity**: 100.00%
### typescript/generic/issue-6899.ts
**Prettier Similarity**: 100.00%
### typescript/generic/object-method.ts
**Prettier Similarity**: 100.00%
### typescript/generic/ungrouped-parameters.ts
**Prettier Similarity**: 100.00%
### typescript/import-export/type-modifier.ts
```diff
export type { SomeThing };
export type { A as B };
export type { B as C } from "./a";
export type { foo } from "bar";
export type { foo };
// this should be treated as a normal import statement
import type from "./foo";
import type { SomeThing } from "./some-module.js";
import type { foo, bar } from "baz";
import type { foo as bar } from "baz";
import type * as foo from "./bar";
import type foo from "bar";
-import type foo, { bar } from "bar";
+import type foo, { bar } from 'bar';
```
**Prettier Similarity**: 93.33%
### typescript/import-require/import_require.ts
**Prettier Similarity**: 100.00%
### typescript/import-require/type-imports.ts
**Prettier Similarity**: 100.00%
### typescript/import-type/import-type.ts
**Prettier Similarity**: 100.00%
### typescript/index-signature/index-signature.ts
**Prettier Similarity**: 100.00%
### typescript/index-signature/static.ts
**Prettier Similarity**: 100.00%
### typescript/infer-extends/basic.ts
**Prettier Similarity**: 100.00%
### typescript/instantiation-expression/basic.ts
**Prettier Similarity**: 100.00%
### typescript/instantiation-expression/binary-expr.ts
**Prettier Similarity**: 100.00%
### typescript/instantiation-expression/inferface-asi.ts
**Prettier Similarity**: 100.00%
### typescript/instantiation-expression/logical-expr.ts
**Prettier Similarity**: 100.00%
### typescript/instantiation-expression/new.ts
**Prettier Similarity**: 100.00%
### typescript/instantiation-expression/property-access.ts
**Prettier Similarity**: 100.00%
### typescript/instantiation-expression/typeof.ts
**Prettier Similarity**: 100.00%
### typescript/interface/comments-generic.ts
**Prettier Similarity**: 100.00%
### typescript/interface/comments.ts
**Prettier Similarity**: 100.00%
### typescript/interface/generic.ts
**Prettier Similarity**: 100.00%
### typescript/interface/ignore.ts
**Prettier Similarity**: 100.00%
### typescript/interface/long-extends.ts
**Prettier Similarity**: 100.00%
### typescript/interface/long-type-parameters/long-type-parameters.ts
**Prettier Similarity**: 100.00%
### typescript/interface/pattern-parameters.ts
**Prettier Similarity**: 100.00%
### typescript/interface/separator.ts
**Prettier Similarity**: 100.00%
### typescript/interface2/break/break.ts
```diff
-export interface Environment1
- extends GenericEnvironment {
+export interface Environment1 extends GenericEnvironment<
+ SomeType,
+ AnotherType,
+ YetAnotherType,
+> {
m(): void;
}
export class Environment2 extends GenericEnvironment<
SomeType,
AnotherType,
YetAnotherType,
DifferentType1,
DifferentType2,
DifferentType3,
- DifferentType4
+ DifferentType4,
> {
- m() {}
+ m() {};
}
// Declare Interface Break
declare interface ExtendsOne extends ASingleInterface {
x: string;
}
declare interface ExtendsLarge
extends ASingleInterfaceWithAReallyReallyReallyReallyLongName {
x: string;
}
declare interface ExtendsMany
extends Interface1,
Interface2,
Interface3,
Interface4,
Interface5,
Interface6,
Interface7 {
x: string;
}
// Interface declaration break
interface ExtendsOne extends ASingleInterface {
x: string;
}
interface ExtendsLarge
extends ASingleInterfaceWithAReallyReallyReallyReallyLongName {
x: string;
}
interface ExtendsMany
extends Interface1,
Interface2,
Interface3,
Interface4,
Interface5,
Interface6,
Interface7 {
s: string;
}
// Generic Types
interface ExtendsOne extends ASingleInterface {
x: string;
}
interface ExtendsLarge
extends ASingleInterfaceWithAReallyReallyReallyReallyLongName {
x: string;
}
interface ExtendsMany
extends ASingleGenericInterface<
Interface1,
Interface2,
Interface3,
Interface4,
Interface5,
Interface6,
Interface7
> {
x: string;
}
interface ExtendsManyWithGenerics
extends InterfaceOne,
InterfaceTwo,
ASingleGenericInterface<
Interface1,
Interface2,
Interface3,
Interface4,
Interface5,
Interface6,
Interface7
>,
InterfaceThree {
x: string;
}
export interface ExtendsLongOneWithGenerics
extends Bar<
SomeLongTypeSomeLongTypeSomeLongTypeSomeLongType,
ToBreakLineToBreakLineToBreakLine
> {}
```
**Prettier Similarity**: 93.33%
### typescript/interface2/comments-declare.ts
**Prettier Similarity**: 100.00%
### typescript/interface2/comments.ts
**Prettier Similarity**: 100.00%
### typescript/interface2/module.ts
**Prettier Similarity**: 100.00%
### typescript/intersection/consistent-with-flow/comment.ts
**Prettier Similarity**: 100.00%
### typescript/intersection/consistent-with-flow/intersection-parens.ts
```diff
type A = (number | string) & boolean;
type B = (number | string) & boolean;
type C = (number | string) & boolean;
type D = (number | string) & boolean;
let b1: C;
let b2: C;
let b3: C;
let b4: C;
let b5: C;
let b6: /*1*/ C;
let b7: /*1*/ C;
let b8: /*1*/ C;
let b9: /*1*/ C;
let b10: /*1*/ /*2*/ C;
let b11: /*1*/ /*2*/ C;
let bb1: /*1*/ /*2*/ C & D;
let bb2: /*1*/ /*2*/ C & /*3*/ D;
let bb3: /*1*/ /*2*/ C & /*3*/ D /*5*/;
type B2 = C;
type B3 = C;
type B4 = C;
type B5 = C;
-type B6 /*1*/ = C;
-type B7 /*1*/ = C;
-type B8 /*1*/ = C;
-type B9 /*1*/ = C;
-type B10 /*1*/ = /*2*/ C;
-type B11 /*1*/ = /*2*/ C;
-type B12 /*1*/ = C;
+type B6 = /*1*/ C;
+type B7 = /*1*/ C;
+type B8 = /*1*/ C;
+type B9 = /*1*/ C;
+type B10 = /*1*/ /*2*/ C;
+type B11 = /*1*/ /*2*/ C;
+type B12 = /*1*/ C;
type Bb1 = /*1*/ /*2*/ C & D;
type Bb2 = /*1*/ /*2*/ C & /*3*/ D;
type Bb3 = /*1*/ /*2*/ C & /*3*/ D /*4*/;
-type D1 /*1*/ = a & b;
-type D2 /*1*/ = a & b;
-type D3 /*1*/ = a & b;
-type D4 /*1*/ = a & b;
-type D5 /*1*/ = a & b;
-type D6 /*0*/ /*1*/ = a & b;
+type D1 = /*1*/ a & b;
+type D2 = /*1*/ a & b;
+type D3 = /*1*/ a & b;
+type D4 = /*1*/ a & b;
+type D5 = /*1*/ a & b;
+type D6 /*0*/ = /*1*/ a & b;
```
**Prettier Similarity**: 69.77%
### typescript/intersection/type-arguments.ts
**Prettier Similarity**: 100.00%
### typescript/intrinsic/intrinsic.ts
**Prettier Similarity**: 100.00%
### typescript/key-remapping-in-mapped-types/key-remapping.ts
**Prettier Similarity**: 100.00%
### typescript/keyof/keyof.ts
**Prettier Similarity**: 100.00%
### typescript/keyword-types/conditional-types.ts
**Prettier Similarity**: 100.00%
### typescript/keyword-types/keyword-types-with-parens-comments.ts
**Prettier Similarity**: 100.00%
### typescript/keywords/keywords-2.ts
**Prettier Similarity**: 100.00%
### typescript/keywords/keywords.ts
**Prettier Similarity**: 100.00%
### typescript/keywords/module.ts
**Prettier Similarity**: 100.00%
### typescript/last-argument-expansion/break.ts
**Prettier Similarity**: 100.00%
### typescript/last-argument-expansion/decorated-function.tsx
```diff
-const Counter = decorator("my-counter")((props: {
- initialCount?: number;
- label?: string;
-}) => {
- const p = useDefault(props, {
- initialCount: 0,
- label: "Counter",
- });
+const Counter = decorator("my-counter")(
+ (props: { initialCount?: number; label?: string }) => {
+ const p = useDefault(props, {
+ initialCount: 0,
+ label: "Counter",
+ });
- const [s, set] = useState({ count: p.initialCount });
- const onClick = () => set("count", (it) => it + 1);
+ const [s, set] = useState({ count: p.initialCount });
+ const onClick = () => set("count", (it) => it + 1);
- return () => (
-
- );
-});
+ return () => (
+
+ );
+ },
+);
-const Counter2 = decorators.decorator("my-counter")((props: {
- initialCount?: number;
- label?: string;
-}) => {
- return () => (
-
- );
-});
+const Counter2 = decorators.decorator("my-counter")(
+ (props: { initialCount?: number; label?: string }) => {
+ return () => (
+
+ );
+ },
+);
-export default decorators.decorator("my-counter")((props: {
- initialCount?: number;
- label?: string;
-}) => {
- return foo;
-});
+export default decorators.decorator("my-counter")(
+ (props: { initialCount?: number; label?: string }) => {
+ return foo;
+ },
+);
-export = decorators.decorator("my-counter")((props: {
- initialCount?: number;
- label?: string;
-}) => {
- return foo;
-});
+export = decorators.decorator("my-counter")(
+ (props: { initialCount?: number; label?: string }) => {
+ return foo;
+ },
+);
-module.exports = decorators.decorator("my-counter")((props: {
- initialCount?: number;
- label?: string;
-}) => {
- return foo;
-});
+module.exports = decorators.decorator("my-counter")(
+ (props: { initialCount?: number; label?: string }) => {
+ return foo;
+ },
+);
const Counter = decorator("foo")(
decorator("bar")(
(props: {
loremFoo1: Array>;
ipsumBarr2: Promise;
}) => {
return ;
},
),
);
```
**Prettier Similarity**: 27.87%
### typescript/last-argument-expansion/edge_case.ts
**Prettier Similarity**: 100.00%
### typescript/last-argument-expansion/forward-ref.tsx
**Prettier Similarity**: 100.00%
### typescript/literal/multiline.ts
**Prettier Similarity**: 100.00%
### typescript/mapped-type/break-mode/break-mode.ts
**Prettier Similarity**: 100.00%
### typescript/mapped-type/intersection.ts
**Prettier Similarity**: 100.00%
### typescript/mapped-type/issue-11098.ts
**Prettier Similarity**: 100.00%
### typescript/mapped-type/mapped-type.ts
**Prettier Similarity**: 100.00%
### typescript/method-chain/comment.ts
**Prettier Similarity**: 100.00%
### typescript/method/issue-10352-consistency.ts
**Prettier Similarity**: 100.00%
### typescript/method/method-signature-with-wrapped-return-type.ts
**Prettier Similarity**: 100.00%
### typescript/method/method-signature.ts
**Prettier Similarity**: 100.00%
### typescript/method/semi.ts
**Prettier Similarity**: 100.00%
### typescript/method/type_literal_optional_method.ts
**Prettier Similarity**: 100.00%
### typescript/module/empty.ts
**Prettier Similarity**: 100.00%
### typescript/module/global.ts
**Prettier Similarity**: 100.00%
### typescript/module/keyword.ts
**Prettier Similarity**: 100.00%
### typescript/module/module_nested.ts
**Prettier Similarity**: 100.00%
### typescript/module/namespace_function.ts
**Prettier Similarity**: 100.00%
### typescript/module/namespace_nested.ts
**Prettier Similarity**: 100.00%
### typescript/multiparser-css/issue-6259.ts
```diff
const yesFrame = (
...args: Interpolation>[]
) => css`
- ${ChatRoot}[data-frame="yes"] & {
- ${css({}, ...args)}
- }
+ ${ChatRoot}[data-frame="yes"] & {
+ ${css({}, ...args)}
+ }
`;
```
**Prettier Similarity**: 57.14%
### typescript/namespace/invalid-await.ts
**Prettier Similarity**: 100.00%
### typescript/never/type-argument.src.ts
**Prettier Similarity**: 100.00%
### typescript/new/new-signature.ts
**Prettier Similarity**: 100.00%
### typescript/no-semi/no-semi.ts
**Prettier Similarity**: 100.00%
### typescript/no-semi/non-null.ts
**Prettier Similarity**: 100.00%
### typescript/non-null/braces.ts
**Prettier Similarity**: 100.00%
### typescript/non-null/member-chain.ts
**Prettier Similarity**: 100.00%
### typescript/non-null/optional-chain.ts
```diff
a?.b!.c;
a?.b!.c.d;
a?.b.c!.d;
a!.b?.c;
a?.b!?.c;
a?.b!.c?.c;
-(a?.b)!.c;
-(a?.b)!.c;
+a?.b!.c;
+a?.b!.c;
a?.().b!.c;
a?.().b!.c.d;
a?.().b.c!.d;
a?.().b!?.c;
a?.().b!.c?.c;
-(a?.().b)!.c;
-(a?.().b)!.c;
+a?.().b!.c;
+a?.().b!.c;
-(a?.b)![c?.d!];
+a?.b![c?.d!];
```
**Prettier Similarity**: 72.22%
### typescript/non-null/parens.ts
**Prettier Similarity**: 100.00%
### typescript/nosemi/index-signature.ts
**Prettier Similarity**: 100.00%
### typescript/nosemi/interface.ts
**Prettier Similarity**: 100.00%
### typescript/nosemi/type.ts
**Prettier Similarity**: 100.00%
### typescript/optional-call/type-parameters.ts
**Prettier Similarity**: 100.00%
### typescript/optional-method/optional-method.ts
**Prettier Similarity**: 100.00%
### typescript/optional-type/complex.ts
**Prettier Similarity**: 100.00%
### typescript/optional-type/simple.ts
**Prettier Similarity**: 100.00%
### typescript/optional-variance/basic.ts
**Prettier Similarity**: 100.00%
### typescript/optional-variance/with-jsx.tsx
**Prettier Similarity**: 100.00%
### typescript/override-modifiers/override-modifier.ts
**Prettier Similarity**: 100.00%
### typescript/override-modifiers/parameter-property.ts
**Prettier Similarity**: 100.00%
### typescript/predicate-types/predicate-types.ts
**Prettier Similarity**: 100.00%
### typescript/prettier-ignore/issue-14238.ts
```diff
-export const foo = // prettier-ignore
- (bar as Baz).qux;
+export const foo =
+ (
+ // prettier-ignore
+ bar as Baz
+).qux;
```
**Prettier Similarity**: 0.00%
### typescript/prettier-ignore/mapped-types.ts
```diff
type a = {
// prettier-ignore
[A in B]: C | D
};
type a = {
[
// prettier-ignore
A in B
]: C | D
};
-type a = {
- [A in B]: C | D; // prettier-ignore
-};
+// TODO: fix idempotency issue
+// type a= {
+// [
+// A in
+// // prettier-ignore
+// B
+// ]: C | D
+// }
type a = {
- A in B: C | D; // prettier-ignore
+ [A in B]: // prettier-ignore
+ C | D;
};
type a = {
[
/* prettier-ignore */
A in B
]: C | D
};
-type a = {
- [A /* prettier-ignore */ in B]: C | D;
-};
+// TODO: fix idempotency issue
+// type a= {
+// [
+// A in
+// /* prettier-ignore */
+// B
+// ]: C | D
+// }
type a = {
- A in B /* prettier-ignore */: C | D;
+ [A in B]: /* prettier-ignore */
+ C | D;
};
type a = {
/* prettier-ignore */ [A in B]: C | D
};
type a = {
- [/* prettier-ignore */ A in B ]: C | D
- };
+ [/* prettier-ignore */ A in B]: C | D;
+};
type a = {
[A in /* prettier-ignore */ B]: C | D;
};
type a = {
- [A in B /* prettier-ignore */]: C | D;
+ [A in B]: /* prettier-ignore */ C | D;
};
type a = {
/* prettier-ignore */
[A in B]: C | D
};
```
**Prettier Similarity**: 65.67%
### typescript/prettier-ignore/prettier-ignore-nested-unions.ts
```diff
export type a =
// foo
| (foo1 & foo2)
// bar
| (bar1 & bar2)
// prettier-ignore
- | (| aaaaaaaaaaaaa&1
- // b
- | bbbbbbbbbbbbb&2)
+ | (
+ | (aaaaaaaaaaaaa & 1)
+ // b
+ | (bbbbbbbbbbbbb & 2)
+ )
// baz
| (baz1 & baz2);
export type b =
// foo
| (foo1 & foo2)
// bar
| (bar1 & bar2)
// prettier-ignore
- | (| aaaaaaaaaaaaa&1
- // b
- | bbbbbbbbbbbbb&2)
+ | (
+ | (aaaaaaaaaaaaa & 1)
+ // b
+ | (bbbbbbbbbbbbb & 2)
+ )
// baz
| (baz1 & baz2);
```
**Prettier Similarity**: 62.96%
### typescript/prettier-ignore/prettier-ignore-parenthesized-type.ts
```diff
type Foo =
// prettier-ignore
- aa;
+ (
+ aa
+ );
```
**Prettier Similarity**: 40.00%
### typescript/private-fields-in-in/basic.ts
**Prettier Similarity**: 100.00%
### typescript/quote-props/types.ts
**Prettier Similarity**: 100.00%
### typescript/range/export-assignment.ts
**Prettier Similarity**: 100.00%
### typescript/range/issue-4926.ts
**Prettier Similarity**: 100.00%
### typescript/range/issue-7148.ts
**Prettier Similarity**: 100.00%
### typescript/readonly/array.ts
**Prettier Similarity**: 100.00%
### typescript/readonly/readonly.ts
**Prettier Similarity**: 100.00%
### typescript/rest-type/complex.ts
**Prettier Similarity**: 100.00%
### typescript/rest-type/infer-type.ts
**Prettier Similarity**: 100.00%
### typescript/rest-type/simple.ts
**Prettier Similarity**: 100.00%
### typescript/rest/rest.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/argument-expansion.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/assignment.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/basic.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/comments-unstable.ts
```diff
const t1 = {
prop1: 1,
prop2: 2,
prop3: 3,
-} satisfies Record; // Comment
+} satisfies
+ // Comment
+ Record;
```
**Prettier Similarity**: 57.14%
### typescript/satisfies-operators/comments.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/export-default-as.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/expression-statement.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/gt-lt.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/hug-args.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/lhs.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/nested-await-and-satisfies.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/non-null.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/satisfies.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/template-literal.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/ternary.ts
**Prettier Similarity**: 100.00%
### typescript/satisfies-operators/types-comments.ts
**Prettier Similarity**: 100.00%
### typescript/semi/no-semi.ts
**Prettier Similarity**: 100.00%
### typescript/static-blocks/multiple.ts
**Prettier Similarity**: 100.00%
### typescript/static-blocks/nested.ts
**Prettier Similarity**: 100.00%
### typescript/static-blocks/static-blocks.ts
**Prettier Similarity**: 100.00%
### typescript/symbol/symbol.ts
**Prettier Similarity**: 100.00%
### typescript/template-literal-types/template-literal-types.ts
**Prettier Similarity**: 100.00%
### typescript/template-literals/as-expression.ts
**Prettier Similarity**: 100.00%
### typescript/template-literals/expressions.ts
**Prettier Similarity**: 100.00%
### typescript/ternaries/indent.ts
**Prettier Similarity**: 100.00%
### typescript/test-declarations/test_declarations.ts
```diff
-test("does something really long and complicated so I have to write a very long name for the test", (done) => {
+test("does something really long and complicated so I have to write a very long name for the test", <
+ T,
+>(done) => {
console.log("hello!");
});
```
**Prettier Similarity**: 40.00%
### typescript/trailing-comma/arrow-functions.tsx
**Prettier Similarity**: 100.00%
### typescript/trailing-comma/trailing.ts
```diff
export class BaseSingleLevelProfileTargeting<
T extends ValidSingleLevelProfileNode,
> {}
enum Enum {
x = 1,
y = 2,
}
const {
longKeySoThisWillGoOnMultipleLines,
longKeySoThisWillGoOnMultipleLines2,
longKeySoThisWillGoOnMultipleLines3,
- ...rest
+ ...rest,
} = something;
```
**Prettier Similarity**: 93.33%
### typescript/trailing-comma/type-arguments.ts
**Prettier Similarity**: 100.00%
### typescript/trailing-comma/type-parameters-vs-arguments.ts
```diff
class FooClass {
a: A;
b: B;
c: C;
}
const instance = new FooClass<
- boolean,
- number,
- string // [ts] Trailing comma not allowed.
->();
+ boolean,
+ number,
+ string, // [ts] Trailing comma not allowed.
+ >();
```
**Prettier Similarity**: 63.64%
### typescript/tsx/generic-component.tsx
**Prettier Similarity**: 100.00%
### typescript/tsx/keyword.tsx
**Prettier Similarity**: 100.00%
### typescript/tsx/member-expression.tsx
**Prettier Similarity**: 100.00%
### typescript/tsx/not-react.ts
**Prettier Similarity**: 100.00%
### typescript/tsx/react.tsx
**Prettier Similarity**: 100.00%
### typescript/tsx/this.tsx
**Prettier Similarity**: 100.00%
### typescript/tsx/type-parameters.tsx
**Prettier Similarity**: 100.00%
### typescript/tsx/url.tsx
**Prettier Similarity**: 100.00%
### typescript/tuple/dangling-comments.ts
**Prettier Similarity**: 100.00%
### typescript/tuple/trailing-comma-for-empty-tuples.ts
**Prettier Similarity**: 100.00%
### typescript/tuple/trailing-comma-trailing-rest.ts
**Prettier Similarity**: 100.00%
### typescript/tuple/trailing-comma.ts
**Prettier Similarity**: 100.00%
### typescript/tuple/tuple-labeled.ts
**Prettier Similarity**: 100.00%
### typescript/tuple/tuple-rest-not-last.ts
**Prettier Similarity**: 100.00%
### typescript/tuple/tuple.ts
**Prettier Similarity**: 100.00%
### typescript/type-alias/issue-100857.ts
**Prettier Similarity**: 100.00%
### typescript/type-alias/issue-9874.ts
**Prettier Similarity**: 100.00%
### typescript/type-alias/pattern-parameter.ts
**Prettier Similarity**: 100.00%
### typescript/type-arguments-bit-shift-left-like/1.ts
```diff
-f << (x);
+f << x;
```
**Prettier Similarity**: 0.00%
### typescript/type-arguments-bit-shift-left-like/2.ts
**Prettier Similarity**: 100.00%
### typescript/type-arguments-bit-shift-left-like/4.ts
**Prettier Similarity**: 100.00%
### typescript/type-arguments-bit-shift-left-like/6.ts
**Prettier Similarity**: 100.00%
### typescript/type-member-get-set/type-member-get-set.ts
**Prettier Similarity**: 100.00%
### typescript/type-only-module-specifiers/basic.ts
**Prettier Similarity**: 100.00%
### typescript/typeof-this/decorators.ts
**Prettier Similarity**: 100.00%
### typescript/typeof-this/typeof-this.ts
**Prettier Similarity**: 100.00%
### typescript/typeof/typeof.ts
**Prettier Similarity**: 100.00%
### typescript/typeparams/class-method.ts
**Prettier Similarity**: 100.00%
### typescript/typeparams/consistent/flow-only.ts
**Prettier Similarity**: 100.00%
### typescript/typeparams/consistent/issue-9501.ts
**Prettier Similarity**: 100.00%
### typescript/typeparams/consistent/simple-types.ts
**Prettier Similarity**: 100.00%
### typescript/typeparams/consistent/template-literal-types.ts
**Prettier Similarity**: 100.00%
### typescript/typeparams/consistent/typescript-only.ts
**Prettier Similarity**: 100.00%
### typescript/typeparams/const.ts
```diff
function a() {}
function b() {}
function c() {}
declare function d();
() => {};
() => {};
(function () {});
(function () {});
(function () {});
class A {}
class B {}
class C {}
class D {}
class E {}
(class {});
(class {});
(class {});
(class {});
(class {});
interface I {}
interface J {}
interface K {}
-interface L {}
+interface L {}
interface M {}
class _ {
method() {}
method() {}
method() {}
}
```
**Prettier Similarity**: 96.88%
### typescript/typeparams/empty-parameters-with-arrow-function/issue-13817.ts
```diff
-const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxx<> = (
- arg,
-) => null;
+const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxx<> =
+ arg => null;
const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxx* comment */> =
- (arg) => null;
+ arg => null;
const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxx<
// comment
-> = (arg) => null;
+> =
+ arg => null;
```
**Prettier Similarity**: 50.00%
### typescript/typeparams/line-breaking-after-extends-2.ts
```diff
a = {
parseFunctionBodyAndFinish<
T extends
| N.Function
| N.TSDeclareMethod
| N.TSDeclareFunction
| N.ClassPrivateMethod,
>() {},
};
function parseFunctionBodyAndFinish<
T extends
| N.Function
| N.TSDeclareMethod
| N.TSDeclareFunction
| N.ClassPrivateMethod
| Foo
| Bar
| Baz,
>();
function parseFunctionBodyAndFinish<
T extends // comment
- N.Function | N.TSDeclareMethod | Baz,
+ N.Function | N.TSDeclareMethod | Baz,
>();
function makeChainWalker<
ArgT extends {
options: ValidatedOptions;
dirname: string;
filepath?: string;
},
>() {}
```
**Prettier Similarity**: 96.97%
### typescript/typeparams/line-breaking-after-extends.ts
**Prettier Similarity**: 100.00%
### typescript/typeparams/long-function-arg.ts
**Prettier Similarity**: 100.00%
### typescript/typeparams/print-width-120/issue-7542.tsx
```diff
export const Foo = forwardRef(
(props: FooProps, ref: Ref): JSX.Element => {
return ;
},
);
export const Bar = forwardRef(
(props: BarProps, ref: Ref): JSX.Element | null => {
return ;
},
);
users.map((user: User): User => {
return user;
});
-users.map((user: User): User => {
- // comment
-});
+// FIXME
+// TODO: reformat issue
+// users.map((user: User): User => {
+// ; // comment
+// })
users.map((user: User): User => {
// comment
});
```
**Prettier Similarity**: 80.00%
### typescript/typeparams/tagged-template-expression.ts
**Prettier Similarity**: 100.00%
### typescript/typeparams/trailing-comma/type-paramters.ts
**Prettier Similarity**: 100.00%
### typescript/union/comments.ts
```diff
type Foo = (
| "thing1" // Comment1
- | "thing2" // Comment2
-)[]; // Final comment1
+ | "thing2"
+)[]; // Comment2 // Final comment1
type Foo = (
| "thing1" // Comment1
- | "thing2" // Comment2
-) &
+ | "thing2"
+) & // Comment2
Bar; // Final comment2
```
**Prettier Similarity**: 60.00%
### typescript/union/consistent-with-flow/comment.ts
**Prettier Similarity**: 100.00%
### typescript/union/consistent-with-flow/comments.ts
**Prettier Similarity**: 100.00%
### typescript/union/consistent-with-flow/prettier-ignore.ts
```diff
export type a =
// foo
| (foo1 & foo2)
// bar
| (bar1 & bar2)
// prettier-ignore
- | (qux1&qux2);
+ | qux1&qux2;
export type b =
// foo
| (foo1 & foo2)
// bar
| (bar1 & bar2)
// prettier-ignore
- | (qux1&qux2)
+ | qux1&qux2
// baz
| (baz1 & baz2);
export type c =
// prettier-ignore
- | (foo1&foo2)
+ | foo1&foo2
// bar
| (bar1 & bar2)
// qux
| (qux1 & qux2);
```
**Prettier Similarity**: 88.00%
### typescript/union/consistent-with-flow/single-type.ts
```diff
type A1 =
| A
// A comment to force break
| B;
type A2 =
| (
| A
// A comment to force break
| B
)
| (
| A
// A comment to force break
| B
);
type A3 =
| A
// A comment to force break
| B;
type A4 =
| A
// A comment to force break
| B;
type A5 =
| ({ key: string } | { key: string } | { key: string } | { key: string })
| { key: string }
| { key: string };
-type A6 =
- /*1*/
- | A
- // A comment to force break
- | B;
+// FIXME
+// TODO: reformat issue
+// type A6 = | (
+// /*1*/ | (
+// | (
+// | A
+// // A comment to force break
+// | B
+// )
+// )
+// );
type B1 =
| A
// A comment to force break
| B;
type B2 =
| A
// A comment to force break
| B;
```
**Prettier Similarity**: 76.60%
### typescript/union/consistent-with-flow/within-tuple.ts
**Prettier Similarity**: 100.00%
### typescript/union/inlining.ts
**Prettier Similarity**: 100.00%
### typescript/union/single-type/single-type.ts
```diff
-type A1 /* 2 */ = /* 1 */ /* 3 */ /* 4 */ {
- key: string;
-};
+type A1 =
+ /* 1 */ /* 2 */
+ /* 3 */ /* 4 */ {
+ key: string;
+ };
```
**Prettier Similarity**: 0.00%
### typescript/union/union-parens.ts
```diff
export type A =
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
export type B =
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
export type C =
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
export type D =
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
export type Multi = (string | number)[];
function f(): string | number {}
var x: string | number;
var y: string | number;
class Foo {}
interface Interface {
i: (X | Y) & Z;
j: Partial;
}
type State = {
sharedProperty: any;
} & (
| { discriminant: "FOO"; foo: any }
| { discriminant: "BAR"; bar: any }
| { discriminant: "BAZ"; baz: any }
);
const foo1 = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as (
| string
| undefined
)[];
const foo2: (
| AAAAAAAAAAAAAAAAAAAAAA
| BBBBBBBBBBBBBBBBBBBBBB
| CCCCCCCCCCCCCCCCCCCCCC
| DDDDDDDDDDDDDDDDDDDDDD
)[] = [];
const foo3: keyof (
| AAAAAAAAAAAAAAAAAAAAAA
| BBBBBBBBBBBBBBBBBBBBBB
| CCCCCCCCCCCCCCCCCCCCCC
| DDDDDDDDDDDDDDDDDDDDDD
) = bar;
const foo4:
| foo
| (
| AAAAAAAAAAAAAAAAAAAAAA
| BBBBBBBBBBBBBBBBBBBBBB
| CCCCCCCCCCCCCCCCCCCCCC
| DDDDDDDDDDDDDDDDDDDDDD
) = bar;
let a1: C;
let a2: C;
let a3: C;
let a4: C;
let a5: C;
let a6: /*1*/ C;
let a7: /*1*/ C;
let a8: /*1*/ C;
let a9: /*1*/ C;
let a10: /*1*/ /*2*/ C;
let a11: /*1*/ /*2*/ C;
let aa1: /*1*/ /*2*/ C | D;
let aa2: /*1*/ /*2*/ C | /*3*/ D;
let aa3: /*1*/ /*2*/ C | /*3*/ D /*4*/;
type A1 = C;
type A2 = C;
type A3 = C;
type A4 = C;
type A5 = C;
-type A6 /*1*/ = C;
-type A7 /*1*/ = C;
-type A8 /*1*/ = C;
-type A9 /*1*/ = C;
-type A10 /*1*/ = /*2*/ C;
-type A11 /*1*/ = /*2*/ C;
-type A12 /*1*/ = C;
+type A6 = /*1*/ C;
+type A7 = /*1*/ C;
+type A8 = /*1*/ C;
+type A9 = /*1*/ C;
+type A10 = /*1*/ /*2*/ C;
+type A11 = /*1*/ /*2*/ C;
+type A12 = /*1*/ C;
type A13 = /*1*/ C;
type Aa1 = /*1*/ /*2*/ C | D;
type Aa2 = /*1*/ /*2*/ C | /*3*/ D;
type Aa3 = /*1*/ /*2*/ C | /*3*/ D /*4*/;
type C1 = /*1*/ a | b;
type C2 = /*1*/ a | b;
type C3 = /*1*/ a | b;
-type C4 /*1*/ = a | b;
+type C4 = /*1*/ a | b;
type C5 = /*1*/ a | b;
type C6 /*0*/ = /*1*/ a | b;
type Ctor = (new () => X) | Y;
```
**Prettier Similarity**: 92.59%
### typescript/union/with-type-params.ts
**Prettier Similarity**: 100.00%
### typescript/unique-symbol/unique-symbol.ts
**Prettier Similarity**: 100.00%
### typescript/unknown/unknown.ts
**Prettier Similarity**: 100.00%
### typescript/webhost/webtsc.ts
**Prettier Similarity**: 100.00%