repo
stringlengths
5
106
file_url
stringlengths
78
301
file_path
stringlengths
4
211
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:56:49
2026-01-05 02:23:25
truncated
bool
2 classes
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/insert-pragma/format.test.js
tests/format/yaml/insert-pragma/format.test.js
runFormatTest(import.meta, ["yaml"], { insertPragma: true });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/prettier-ignore/format.test.js
tests/format/yaml/prettier-ignore/format.test.js
runFormatTest(import.meta, ["yaml"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/json/trailing-comma/format.test.js
tests/format/yaml/json/trailing-comma/format.test.js
runFormatTest(import.meta, ["yaml"]); runFormatTest(import.meta, ["yaml"], { trailingComma: "none" }); runFormatTest(import.meta, ["yaml"], { trailingComma: "es5" }); runFormatTest(import.meta, ["yaml"], { trailingComma: "all" });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/yaml-test-suite/format.test.js
tests/format/yaml/yaml-test-suite/format.test.js
import yamlTestSuite from "yaml-test-suite"; const SKIP = new Set([ // Plain value cannot start with a tab character // https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAzCEkB0oAIswBGAhgE4gA0IEADjAJbQDOyoZpEA7gApkIspiAG07EAniyqFSxMAGs4MAMrEAtnAAy9KHGSphTOFQiEAVnDAwA6jJrIQNUnEOkAbrqkz5ipTVnaAc2QYUgBXIxBDVXpgsIi4AA...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/comment/format.test.js
tests/format/yaml/comment/format.test.js
runFormatTest(import.meta, ["yaml"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/alias/format.test.js
tests/format/yaml/alias/format.test.js
runFormatTest(import.meta, ["yaml"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/block-value/format.test.js
tests/format/yaml/block-value/format.test.js
const blockStyles = ["|", ">", "|+", "|-", ">+", ">-"]; const trailingSpace = ["", " ", "\t"]; const newlines = ["", "\n", "\n\n", "\n\n\n"]; const snippets = blockStyles.flatMap((blockStyle) => trailingSpace.flatMap((space) => newlines.flatMap((lines) => [ `foo: ${blockStyle}\n${lines}`, ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/spec/format.test.js
tests/format/yaml/spec/format.test.js
runFormatTest(import.meta, ["yaml"], { useTabs: true }); runFormatTest(import.meta, ["yaml"], { proseWrap: "always" });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/block-folded/format.test.js
tests/format/yaml/block-folded/format.test.js
runFormatTest(import.meta, ["yaml"]); runFormatTest(import.meta, ["yaml"], { proseWrap: "always" });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/ansible/format.test.js
tests/format/yaml/ansible/format.test.js
runFormatTest(import.meta, ["yaml"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/sequence/format.test.js
tests/format/yaml/sequence/format.test.js
runFormatTest(import.meta, ["yaml"]); runFormatTest(import.meta, ["yaml"], { tabWidth: 4 });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/document/format.test.js
tests/format/yaml/document/format.test.js
runFormatTest(import.meta, ["yaml"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/flow-sequence/format.test.js
tests/format/yaml/flow-sequence/format.test.js
runFormatTest(import.meta, ["yaml"]); runFormatTest(import.meta, ["yaml"], { tabWidth: 4 }); runFormatTest(import.meta, ["yaml"], { bracketSpacing: false });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/flow-sequence/trailing-comma/format.test.js
tests/format/yaml/flow-sequence/trailing-comma/format.test.js
runFormatTest(import.meta, ["yaml"]); runFormatTest(import.meta, ["yaml"], { trailingComma: "none" }); runFormatTest(import.meta, ["yaml"], { trailingComma: "es5" }); runFormatTest(import.meta, ["yaml"], { trailingComma: "all" });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/directive/format.test.js
tests/format/yaml/directive/format.test.js
runFormatTest(import.meta, ["yaml"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/yaml/plain/format.test.js
tests/format/yaml/plain/format.test.js
runFormatTest(import.meta, ["yaml"]); runFormatTest(import.meta, ["yaml"], { proseWrap: "never" }); runFormatTest(import.meta, ["yaml"], { proseWrap: "always" });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/abnormal/return.js
tests/format/flow-repo/abnormal/return.js
function bar(x:number) { } function foo() { var x = null; if (x == null) return; bar(x); }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/abnormal/toplevel_throw.js
tests/format/flow-repo/abnormal/toplevel_throw.js
// @flow throw new Error('foo'); // no error
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/abnormal/break-continue.js
tests/format/flow-repo/abnormal/break-continue.js
function foo() { while(true) { break; } } function bar() { L: do { continue L; } while(false) }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/abnormal/format.test.js
tests/format/flow-repo/abnormal/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/lib_interfaces/declarations/underscore.js
tests/format/flow-repo/lib_interfaces/declarations/underscore.js
interface C<T> { foo(): CArrays<T>; bar(): C<any>; } interface CArrays<T> extends C<Array<T>> { bar(): C<any>; }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/lib_interfaces/declarations/format.test.js
tests/format/flow-repo/lib_interfaces/declarations/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/generics/generics.js
tests/format/flow-repo/generics/generics.js
class C<X> { x:X; constructor(x:X) { this.x = x; } get():X { return this.x; } } class D<T> { x:T; m<S>(z:S,u:T,v):S { this.x = u; v.u = u; return z; } } var d = new D(); var o = {}; var b = d.m(true,0,o); var s:string = d.x; var n:number = o.u; class E<X> extends C<X> { //x:X; set(x:X...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/generics/format.test.js
tests/format/flow-repo/generics/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/strict/annot.js
tests/format/flow-repo/strict/annot.js
var A = require('./unknown_class'); class B extends A { foo(x:A):A { return x; } bar(x) { } qux<X,Y>(x:X,y:Y):X { return x;} } module.exports = B;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/strict/fun.js
tests/format/flow-repo/strict/fun.js
/** * @flow */ // progressively annotate: //function f(x) { return x; } function f(x:number) { return x; } //function f(x:number):string { return x; } var x:string = f(0); module.exports = f;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/strict/obj.js
tests/format/flow-repo/strict/obj.js
/** * @flow */ // progressively annotate: var o = { x: 0 } //var o: {x: number;} = { x: 0 } var x:string = o.x; module.exports = o;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/strict/format.test.js
tests/format/flow-repo/strict/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/config_munging_underscores/chain.js
tests/format/flow-repo/config_munging_underscores/chain.js
/* @flow */ class A { _property1: number; static _sProperty: number; constructor() { this._property1 = 5; } _method1(): number { return 1; } static _sMethod(): string { return "some string"; } } A._sProperty = 48; class B extends A { _property1: string; static _sProperty: string; c...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/config_munging_underscores/commonjs_import.js
tests/format/flow-repo/config_munging_underscores/commonjs_import.js
/* @flow */ import {_p} from "./commonjs_export";
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/config_munging_underscores/commonjs_export.js
tests/format/flow-repo/config_munging_underscores/commonjs_export.js
/* @flow */ class C { _p: string; } module.exports = new C;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/config_munging_underscores/format.test.js
tests/format/flow-repo/config_munging_underscores/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/predicates-inferred/simple-predicate-func.js
tests/format/flow-repo/predicates-inferred/simple-predicate-func.js
// @flow function is_string(y): %checks { return typeof y === "string"; } function is_bool(y): %checks { return typeof y === "boolean"; } function is_number(y): %checks { return typeof y === "number"; } // Feature check: function foo(x: string | Array<string>): string { if (is_string(x)) { // The use of...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/predicates-inferred/simple-predicate-func-post.js
tests/format/flow-repo/predicates-inferred/simple-predicate-func-post.js
// @flow // Feature check: // The predicate function is defined after the conditional check function foo(x: string | Array<string>): string { if (is_string(x)) { // The use of `is_string` as a conditional check // should guarantee the narrowing of the type of `x` // to string. return x; } else { ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/predicates-inferred/sanity-ordering.js
tests/format/flow-repo/predicates-inferred/sanity-ordering.js
// @flow declare var key: string; declare var obj: { page: ?Object; }; if (dotAccess(obj)) { (obj.page: Object); } function dotAccess(head, create) { const path = 'path.location'; const stack = path.split('.'); do { const key = stack.shift(); head = head[key] || create && (head[key] = {}); } while ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/predicates-inferred/sanity-unbound-var.js
tests/format/flow-repo/predicates-inferred/sanity-unbound-var.js
// @flow declare var y: mixed; // Sanity check: this should fail, because the preficate function // checks `y` instead of `x`. function err(x): %checks { return typeof y === "string"; } function foo(x: string | Array<string>): string { if (err(x)) { return x; } else { return x.join(); } }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/predicates-inferred/sanity.js
tests/format/flow-repo/predicates-inferred/sanity.js
// @flow // Sanity check: shouldn't be allowed to declare a predicate AND use `chekcs` function check(y): %checks(typeof y === "string") { return typeof y === "number"; } declare var y: number | boolean; if (check(y)) { (y: number); } // Sanity: disallowed body function indirect_is_number(y): %checks { var y...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/predicates-inferred/sanity-multi-params.js
tests/format/flow-repo/predicates-inferred/sanity-multi-params.js
// @flow // Feature: multi params function multi_param(w,x,y,z): %checks { return typeof z === "string"; } function foo(x: string | Array<string>): string { if (multi_param("1", "2", x, "3")) { return x; } else { return x.join(); } }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/predicates-inferred/format.test.js
tests/format/flow-repo/predicates-inferred/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/libconfig/libB.js
tests/format/flow-repo/libconfig/libB.js
declare function bar(x: string): void;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/libconfig/libA.js
tests/format/flow-repo/libconfig/libA.js
declare function foo(x: number): void;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/libconfig/libtest.js
tests/format/flow-repo/libconfig/libtest.js
foo(123); bar(123);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/libconfig/format.test.js
tests/format/flow-repo/libconfig/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/name_prop/function.js
tests/format/flow-repo/name_prop/function.js
/* TODO - we currently say that a function's statics are an AnyObjT and * anything goes. When we start enforcing the statics properly, we'll need to * know that .name exists */
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/name_prop/class.js
tests/format/flow-repo/name_prop/class.js
class A {} var test1 = A.bar; // Error bar doesn't exist var test2: string = A.name; var test3: number = A.name; // Error string ~> number var a = new A(); var test4 = a.constructor.bar; // Error bar doesn't exist var test5: string = a.constructor.name; var test6: number = a.constructor.name; // Error string ~> numbe...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/name_prop/format.test.js
tests/format/flow-repo/name_prop/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/esproposal_class_instance_fields.warn/test.js
tests/format/flow-repo/esproposal_class_instance_fields.warn/test.js
/* @flow */ class Foo { annotationOnly: string; initOnly = 'asdf'; initWithAnnotation: string = 'asdf'; }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/esproposal_class_instance_fields.warn/format.test.js
tests/format/flow-repo/esproposal_class_instance_fields.warn/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/commonjs/Abs.js
tests/format/flow-repo/commonjs/Abs.js
function f(x:string) { } module.exports = f;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/commonjs/format.test.js
tests/format/flow-repo/commonjs/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/commonjs/Rel.js
tests/format/flow-repo/commonjs/Rel.js
var f = require('./Abs'); f(0);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/esproposal_decorators.ignore/test.js
tests/format/flow-repo/esproposal_decorators.ignore/test.js
/* @flow */ @decorator4 class Foo { @decorator1 method1() {} @decorator2 @decorator3 method2() {} }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/esproposal_decorators.ignore/format.test.js
tests/format/flow-repo/esproposal_decorators.ignore/format.test.js
runFormatTest(import.meta, ["flow"], { errors: { hermes: ["test.js"], }, });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/disjoint-union-perf/emit.js
tests/format/flow-repo/disjoint-union-perf/emit.js
/** * @flow */ import * as t from './jsAst'; const b = t.builders; import type { TypedNode } from './ast'; function getBinaryOp(op: 'plus' | 'minus' | 'divide' | 'multiply') : '+' | '-' | '*' | '/' { switch (op) { case 'plus': return '+'; case 'minus': return '-'; case 'divide': return ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/disjoint-union-perf/ast.js
tests/format/flow-repo/disjoint-union-perf/ast.js
/** * @flow */ export type InferredType = | 'unknown' | 'gender' | 'enum' | 'number-or-string' | 'number' | 'string' | 'error' ; export type Pos = { firstLine: number, firstColumn: number, lastLine: number, lastColumn: number, }; export type TypedBinaryOpNode = { exprNodeType: 'binary_op', ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/disjoint-union-perf/jsAst.js
tests/format/flow-repo/disjoint-union-perf/jsAst.js
/** * @flow */ export type Comment = { loc: ?SourceLocation, value: string, leading: boolean, trailing: boolean, }; export type SourceLocation = { start: SourcePosition, end: SourcePosition, source: ?string, }; export type SourcePosition = { line: number, column: number, }; export type File = { ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/disjoint-union-perf/format.test.js
tests/format/flow-repo/disjoint-union-perf/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/destructuring/string_lit.js
tests/format/flow-repo/destructuring/string_lit.js
var { "key": val } = { key: "val" }; (val: void); // error: string ~> void var { "with-dash": with_dash } = { "with-dash": "motivating example" }; (with_dash: "motivating example"); // ok
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/destructuring/destructuring.js
tests/format/flow-repo/destructuring/destructuring.js
declare var a:string; declare var b:string; declare var c:string; [{a1:a, b},c] = [{a1:0, b:1},2]; var {m} = {m:0}; ({m} = {m:m}); var obj; ({n: obj.x} = {n:3}); [obj.x] = ['foo']; function foo({p, z:[r]}) { a = p; b = z; c = r; } foo({p:0, z:[1,2]}); [a,,b,...c] = [0,1,true,3]; function bar({x, ...z})...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/destructuring/unannotated.js
tests/format/flow-repo/destructuring/unannotated.js
// @flow var { x } = { x: { foo: "foo" } }; function bar() { x.bar }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/destructuring/array_rest.js
tests/format/flow-repo/destructuring/array_rest.js
let xs = [0, "", true]; let [a, ...ys] = xs; let [b, ...zs] = ys; let c = zs[0]; // retain tuple info let d = zs[1]; // run off the end (a: void); // error: number ~> void (b: void); // error: string ~> void (c: void); // error: boolean ~> void (d: void); // error: number|string|boolean ~> void let [...e] = 0;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/destructuring/rec.js
tests/format/flow-repo/destructuring/rec.js
// @flow // Make sure that destructuring doesn't cause infinite loops when combined with // funny doses of repositioning let foo = (i: number) => [i]; const bar = (i: number) => { [i] = foo(i); return [i]; }; foo = (i: number) => { return bar(i); }; // Also make sure that the following doesn't loop declare ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/destructuring/computed.js
tests/format/flow-repo/destructuring/computed.js
var { ["key"]: val1 } = { key: "val" }; (val1: void); // error: string ~> void var key: string = "key"; var { [key]: val2 } = { key: "val" }; (val2: void); // ok (gasp!) by existing StrT -> ElemT rule var { ["key"]: val3, ...spread } = { key: "val" }; (spread.key: void); // error (gasp!) in general we don't know if a...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/destructuring/eager.js
tests/format/flow-repo/destructuring/eager.js
var x; ({x} = null); // error, property `x` can not be accessed on `null`
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/destructuring/defaults.js
tests/format/flow-repo/destructuring/defaults.js
/* @flow */ function obj_prop_fun({p:{q=0}={q:true}}={p:{q:""}}) { // errors: // * number ~> void, from default on _.p.q // * boolean ~> void, from default on _.p // * string ~> void, from default on _ // * null ~> void, from call below (q:void); } obj_prop_fun(); // ok obj_prop_fun({}); // ok obj_pro...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/destructuring/poly.js
tests/format/flow-repo/destructuring/poly.js
// @flow function obj_pattern<X>({ prop } : { prop: X }) {} // prop: X type Prop<X> = { prop: X }; function obj_pattern2<X>({ prop } : Prop<X>) {} // prop: X function arr_pattern<X>([ elem ] : X[]) {} // elem: X type Elem<X> = X[]; function arr_pattern2<X>([ elem ] : Elem<X>) {} // elem: X function tup_pattern<X>([ ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/destructuring/refinement_non_termination.js
tests/format/flow-repo/destructuring/refinement_non_termination.js
// @flow function _([argArray]: Array<Value>) { if (argArray instanceof NullValue || argArray instanceof UndefinedValue) { } }; class Value { } class NullValue extends Value { } class UndefinedValue extends Value { }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/destructuring/format.test.js
tests/format/flow-repo/destructuring/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/flow_ast.template_strings/foo.js
tests/format/flow-repo/flow_ast.template_strings/foo.js
a`foo ${bar} baz`
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/flow_ast.template_strings/format.test.js
tests/format/flow-repo/flow_ast.template_strings/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/objmap/objmap.js
tests/format/flow-repo/objmap/objmap.js
declare function promiseAllByKey<O>(o: O): Promise<$ObjMap<O,typeof $await>>; declare function keyMirror<O>(o: O): $ObjMapi<O, <K>(k:K) => K>; var o = keyMirror({ FOO: null, BAR: null, }); (o.FOO : 'FOO'); // ok (o.FOO : 'BAR'); // error, 'FOO' incompatible with 'BAR' promiseAllByKey({ foo: Promise.resolve(0),...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/objmap/format.test.js
tests/format/flow-repo/objmap/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/qualified/qualified.js
tests/format/flow-repo/qualified/qualified.js
class C { } var M = { C: C }; var x:M.C = 0; type foo = {bar: number}; declare var of_type_foo: foo; type bar = typeof of_type_foo.bar; var a: bar = 42; var b: bar = 'asdf'; // Error: string ~> number
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/qualified/format.test.js
tests/format/flow-repo/qualified/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/simple_arrays/array.js
tests/format/flow-repo/simple_arrays/array.js
/* @flow */ var a = []; for (var i = 0; i < 10; ++i) { if (i % 2 == 0) { a[i] = 0; } else { a[i] = ''; }; } // `i` never gets a lower bound, so the array access is stalled until the // function is called. function foo(i): string { return a[i]; } // here, because we call `bar`, we the array access constraint i...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/simple_arrays/array2.js
tests/format/flow-repo/simple_arrays/array2.js
/* @flow */ var a = []; for (var i = 0; i < 10; ++i) { if (i % 2 == 0) { a[i] = 0; } else { a[i] = ''; }; } function foo(i: number): string { return a[i]; }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/simple_arrays/format.test.js
tests/format/flow-repo/simple_arrays/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/class_method_default_parameters/class_method_default_parameters.js
tests/format/flow-repo/class_method_default_parameters/class_method_default_parameters.js
class A { b: string; c(d = this.b) { // ok - can use `this` in function default parameter values } e() { return this.b; } f(g = this.e()) { // ok - can use `this` in function default parameter values } h(i: number = this.b) { // error } }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/class_method_default_parameters/format.test.js
tests/format/flow-repo/class_method_default_parameters/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/misc/A.js
tests/format/flow-repo/misc/A.js
/* @providesModule A */ module.exports = {}; var A = {x:true, ...{}}; module.exports.cls = A; function f(x:boolean) { } module.exports.fn = f; A.y = "?"; A.x = A.y; f(A.x); // A.x is now a string, by def assign
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/misc/E.js
tests/format/flow-repo/misc/E.js
/* @providesModule E */ function h(x:number) { } var proto = { fn: h } var o = Object.create(proto); o.fn(false); module.exports = {obj: o};
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/misc/D.js
tests/format/flow-repo/misc/D.js
/* @providesModule D */ var f = require('A').fn; function g():string { return this.i; } var o = {fn: g, ...{}}; o.i = true; var i = o.fn(); f(i); module.exports = "D for dummy";
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/misc/F.js
tests/format/flow-repo/misc/F.js
function fn2(x) { return x.length * 4; } fn2({length: 'hi'}); function foo(x: Array<number>): string { return x.length; }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/misc/C.js
tests/format/flow-repo/misc/C.js
/* @providesModule C */ var B = require('B'); var f = require('A').fn; function C() { var o = new B(); f(o.b); f(o.s); o.fn(); } module.exports = C;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/misc/B.js
tests/format/flow-repo/misc/B.js
/* @providesModule B */ var A = require('A').cls; function B() { this.b = "..."; } function f():number { return this.b; } B.prototype.s = 0; B.prototype.fn = f; module.exports = B;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/misc/G.js
tests/format/flow-repo/misc/G.js
var a = { length: "duck" }; a.length = 123; a.length(); var b = [ 123 ]; b.length = "duck"; b.length();
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/misc/format.test.js
tests/format/flow-repo/misc/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/esproposal_class_static_fields.ignore/test.js
tests/format/flow-repo/esproposal_class_static_fields.ignore/test.js
/* @flow */ class Foo { static annotationOnly: string; static initOnly = 'asdf'; static initWithAnnotation: string = 'asdf'; }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/esproposal_class_static_fields.ignore/format.test.js
tests/format/flow-repo/esproposal_class_static_fields.ignore/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/undefined/issue-518.js
tests/format/flow-repo/undefined/issue-518.js
function doSomethingAsync(): Promise<void> { return new Promise((resolve, reject) => { resolve(); // OK to leave out arg, same as resolve(undefined) var anotherVoidPromise: Promise<void> = Promise.resolve(); resolve(anotherVoidPromise); }); } // simpler repro to show that too few args are fine when ex...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/undefined/undefined2.js
tests/format/flow-repo/undefined/undefined2.js
// @flow let tests = [ function(x: number) { var id; var name = id ? 'John' : undefined; (name: boolean); // error, string or void const bar = [ undefined, 'bar', ]; (bar[x]: boolean); // error, string or void }, function(x: number) { var undefined = 'foo'; (undefine...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/undefined/format.test.js
tests/format/flow-repo/undefined/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/undefined/undefined.js
tests/format/flow-repo/undefined/undefined.js
function foo() { var x; x.foo(); } function bar() { var x:?{ bar():void; }; if (x) x.bar(); } function qux(x?: number, y:string = "", z) { }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/enumerror/enumerror.js
tests/format/flow-repo/enumerror/enumerror.js
/** @flow */ function isActive(ad: {state: $Keys<{ PAUSED: string; ACTIVE: string; DELETED: string; }>}): boolean { return ad.state === 'ACTIVE'; }; isActive({state: 'PAUSE'}); var MyStates = { PAUSED: 'PAUSED', ACTIVE: 'ACTIVE', DELETED: 'DELETED', }; function isActive2(ad: {state: $Keys<...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/enumerror/format.test.js
tests/format/flow-repo/enumerror/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/get-def2/override.js
tests/format/flow-repo/get-def2/override.js
// @flow class C { override() { } } class D extends C { foo() { this.override() } bar() { this.override } override() { } }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/get-def2/types.js
tests/format/flow-repo/get-def2/types.js
// @flow export type Foo = {};
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/get-def2/main.js
tests/format/flow-repo/get-def2/main.js
// @flow var Parent = require('./Parent'); // Hops through destructuring let ParentFoo; ({ParentFoo} = Parent); ParentFoo; // Points to lval in line above this // Follows assignment on simple/"non-destructuring" patterns let ParentFoo2; ParentFoo2 = Parent; ParentFoo2; // Points to LHS of line above this // Follows...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/get-def2/Parent.js
tests/format/flow-repo/get-def2/Parent.js
// @flow var ParentFoo = {foo: 'bar'}; module.exports = {ParentFoo};
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/get-def2/react.js
tests/format/flow-repo/get-def2/react.js
var React = require('react'); class C extends React.Component { props: { x: string }; } let msg = "hello"; (<C x={msg}/>); (<div id={msg}/>);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false