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/js/comments/function/format.test.js
tests/format/js/comments/function/format.test.js
runFormatTest(import.meta, ["babel", "flow", "typescript"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/private-in/private-in.js
tests/format/js/private-in/private-in.js
if (#prop in obj) { } #prop in obj; #prop in obj; #prop in obj; #prop in obj; #prop in obj;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/private-in/format.test.js
tests/format/js/private-in/format.test.js
runFormatTest(import.meta, ["babel"], { errors: { espree: true }, });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/line/windows.js
tests/format/js/line/windows.js
const vscode = require("vscode"); const {getDir, getActiveFile, uint8arrayToString} = require("./utils"); let outChannel; let _commands;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/line/format.test.js
tests/format/js/line/format.test.js
runFormatTest(import.meta, ["babel", "flow", "typescript"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/unary-expression/comments.js
tests/format/js/unary-expression/comments.js
!x; !(x /* foo */); !(/* foo */ x); !( /* foo */ x ); !( x /* foo */ ); !( x // foo ); !(x + y); !(x + y /* foo */); !(/* foo */ x + y); !( /* foo */ x + y ); !( x + y /* foo */ ); !( x + y // foo ); !(x || y); !(/* foo */ x || y); !(x || y /* foo */); !( /* foo */ x || y ); !( x || y /* f...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/unary-expression/urnary_expression.js
tests/format/js/unary-expression/urnary_expression.js
!!x x++ x--; -+1; x + + + + 1; x + (+ (+ (+ 1))) x * +y; +x * y;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/unary-expression/format.test.js
tests/format/js/unary-expression/format.test.js
runFormatTest(import.meta, ["babel", "flow", "typescript"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/trailing-whitespace/format.test.js
tests/format/js/trailing-whitespace/format.test.js
runFormatTest( { importMeta: import.meta, snippets: ["`\n \n \n` + `\n \n \n`;"], }, ["babel", "flow", "typescript"], );
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/function-comments/params-trail-comments.js
tests/format/js/function-comments/params-trail-comments.js
function Foo( bar // Trailing comment ) {} function Foo( {bar} // Trailing comment ) {} function Foo( [bar] // Trailing comment ) {} function Foo( bar = 1 // Trailing comment ) {} function Foo( ...bar // Trailing comment ) {}
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/function-comments/comments-after-callee.js
tests/format/js/function-comments/comments-after-callee.js
a = (foo /* comment */)() a = new (A /* comment */)()
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/function-comments/format.test.js
tests/format/js/function-comments/format.test.js
runFormatTest(import.meta, ["babel", "flow", "typescript"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/optional-catch-binding/optional_catch_binding.js
tests/format/js/optional-catch-binding/optional_catch_binding.js
try { } catch { } finally { }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/optional-catch-binding/format.test.js
tests/format/js/optional-catch-binding/format.test.js
runFormatTest(import.meta, ["babel", "flow", "typescript"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/template/indent.js
tests/format/js/template/indent.js
const foo = () => { { { { return ` line 1 line 2 ... line n ${foo({ many: keys, many: keys })} line n + 1 line n + 2 line n + n `; } } } };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/template/graphql.js
tests/format/js/template/graphql.js
module.exports = Relay.createContainer( // ... { fragments: { nodes: ({solution_type, time_frame}) => Relay.QL` fragment on RelatedNode @relay(plural: true) { __typename ${OptimalSolutionsSection .getFragment( 'node', {solution_type, time...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/template/faulty-locations.js
tests/format/js/template/faulty-locations.js
var o = { [`key`]: () => { // Comment } }; var x = { y: () => Relay.QL` query { ${foo}, field, } ` };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/template/call.js
tests/format/js/template/call.js
insertRule(`*, *:before, *:after { box-sizing: inherit; }`); insertRule`*, *:before, *:after { box-sizing: inherit; }`; new Error(formatErrorMessage` This a really bad error. Which has more than one line. `);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/template/inline.js
tests/format/js/template/inline.js
this._pipe.write(`\n\n Pattern matches ${total} ${pluralizeTest}`); this._pipe.write( `\n\n Pattern matches ${total} ${pluralizeTest}` ); this._pipe .write( `\n\n Pattern matches ${total} ${pluralizeTest}` ); this._pipe.write(`\n\n Pattern matches ${total} ${pluralizeTest} but that's long`); this._pipe.writ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/template/arrow.js
tests/format/js/template/arrow.js
() => a` a `; () => ` a `;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/template/comment.js
tests/format/js/template/comment.js
` (?:${escapeChar}[\\S\\s]|(?:(?!${// Using `XRegExp.union` safely rewrites backreferences in `left` and `right`. // Intentionally not passing `basicFlags` to `XRegExp.union` since any syntax // transformation resulting from those flags was already applied to `left` and // `right` when they were passed through the XReg...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/template/format.test.js
tests/format/js/template/format.test.js
runFormatTest(import.meta, ["babel", "flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/template/parenthesis.js
tests/format/js/template/parenthesis.js
// "ArrowFunctionExpression" (() => {})``; // "AssignmentExpression" (b = c)``; // "AwaitExpression" async function f() { (await b)``; } // "BinaryExpression" (b + c)``; // "CallExpression" b()``; // "ClassExpression" (class {})``; // "ConditionalExpression" (b ? c : d)``; // "FunctionExpression" (function() {...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/ternaries/indent.js
tests/format/js/ternaries/indent.js
aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb : ccccccccccccccc ? ddddddddddddddd : eeeeeeeeeeeeeee ? fffffffffffffff : gggggggggggggggg aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? aa...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/ternaries/nested.js
tests/format/js/ternaries/nested.js
let icecream = what == "cone" ? p => !!p ? `here's your ${p} cone` : `just the empty cone for you` : p => `here's your ${p} ${what}`; const value = condition1 ? value1 : condition2 ? value2 : condition3 ? value3 : value4; const StorybookLoader = ({ match }) => ( match.params.storyId ===...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/ternaries/test.js
tests/format/js/ternaries/test.js
const obj0 = conditionIsTruthy ? shortThing : otherShortThing const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff } const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven l...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/ternaries/func-call.js
tests/format/js/ternaries/func-call.js
fn( bifornCringerMoshedPerplexSawder, askTrovenaBeenaDependsRowans, glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && anodyneCondosMalateOverateRetinol ? annularCooeedSplicesWalksWayWay : kochabCooieGameOnOboleUnweave ); // TODO(rattrayalex): try to indent consequent/alternate he...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/ternaries/binary.js
tests/format/js/ternaries/binary.js
const funnelSnapshotCard = (report === MY_OVERVIEW && !ReportGK.xar_metrics_active_capitol_v2) || (report === COMPANY_OVERVIEW && !ReportGK.xar_metrics_active_capitol_v2_company_metrics) ? <ReportMetricsFunnelSnapshotCard metrics={metrics} /> : null; room = room.map((row, rowIndex) => ( row.map((col, col...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/ternaries/nested-in-condition.js
tests/format/js/ternaries/nested-in-condition.js
$var = ($number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) ? kochabCooieGameOnOboleUnweave : annularCooeedSplicesWalksWayWay) ? anodyneCondosMalateOverateRetinol : averredBathersBoxroomBuggyNurl; const value = (bifornCringerMoshedPerplexSawder ? askTrovenaBeenaDependsRowans : glimseGlyphsHazardNoopsT...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/ternaries/indent-after-paren.js
tests/format/js/ternaries/indent-after-paren.js
foo7 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond ? baaaaaaaaaaaaaaaaaaaaar : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; foo8 = (condition ? firstValue : secondValue)[SomeType]; const foo9 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond ? baaaaaaaaaaaaaaaaaaaaar : baaaaaaaaaaaaaaaaaaaaaz...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/ternaries/format.test.js
tests/format/js/ternaries/format.test.js
runFormatTest(import.meta, ["babel", "flow", "typescript"]); runFormatTest(import.meta, ["babel", "flow", "typescript"], { tabWidth: 4 }); runFormatTest(import.meta, ["babel", "flow", "typescript"], { useTabs: true }); runFormatTest(import.meta, ["babel", "flow", "typescript"], { useTabs: true, tabWidth: 4, }); ru...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/ternaries/parenthesis.js
tests/format/js/ternaries/parenthesis.js
debug ? this.state.isVisible ? "partially visible" : "hidden" : null; debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null; a => a ? () => {a} : () => {a} a => a ? a : a a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/ternaries/parenthesis/await-expression.js
tests/format/js/ternaries/parenthesis/await-expression.js
stopDirectory = await (useCache ? memoizedFindProjectRoot : findProjectRootWithoutCache)(path.dirname(path.resolve(filePath)));
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/ternaries/parenthesis/format.test.js
tests/format/js/ternaries/parenthesis/format.test.js
const parsers = [ // Didn't test flow and typescript since they can't parse `await (a ? b : c)` correctly "babel", // "flow", "typescript" ]; runFormatTest(import.meta, parsers); runFormatTest(import.meta, parsers, { experimentalTernaries: true });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows-bind/arrows-bind.js
tests/format/js/arrows-bind/arrows-bind.js
a => ({}::b()``[''].c++ && 0 ? 0 : 0); (a => b)::c; a::(b => c);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows-bind/format.test.js
tests/format/js/arrows-bind/format.test.js
runFormatTest(import.meta, ["babel"], { errors: { acorn: true, espree: true, meriyah: true, oxc: true, "oxc-ts": true, }, });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/rest/trailing-commas.js
tests/format/js/rest/trailing-commas.js
class C { f( superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, ...args ) {} } function f( superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, ...args ) {} class D { f(...superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong) {}; } ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/rest/format.test.js
tests/format/js/rest/format.test.js
runFormatTest(import.meta, ["babel", "flow", "typescript"], { trailingComma: "all", });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/export/same-local-and-exported.js
tests/format/js/export/same-local-and-exported.js
export {a} from 'a'; export {b as b} from 'b'; export {c as /* comment */c} from 'c';
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/export/blank-line-between-specifiers.js
tests/format/js/export/blank-line-between-specifiers.js
export { // a foo1, // b bar1, baz1, } from "mod"; const foo2 = 1; const bar2 = 1; const baz2 = 1; export { // a foo2, // b bar2, baz2, };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/export/test.js
tests/format/js/export/test.js
export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; export * as ns from "mod"; export * as foo from "./baz";
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/export/empty.js
tests/format/js/export/empty.js
export {}; export {} from ".";
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/export/bracket.js
tests/format/js/export/bracket.js
const { runTaskForChanged, description, someOtherLabel, thatMakes, itGo, multiLine, andMore, soWeCanGetItTo80Columns,fitsIn, oneLine} = {} export { runTaskForChanged, description, someOtherLabel, thatMakes, itGo, multiLine, andMore, soWeCanGetItTo80Columns }; export {fitsIn, oneLine};
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/export/format.test.js
tests/format/js/export/format.test.js
const errors = { acorn: ["undefined.js"], espree: ["undefined.js"], }; runFormatTest(import.meta, ["babel", "flow", "typescript"], { errors }); runFormatTest(import.meta, ["babel", "flow", "typescript"], { errors, bracketSpacing: false, });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/export/undefined.js
tests/format/js/export/undefined.js
export { undefinedExport };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/dynamic-import.js
tests/format/js/import-attributes/dynamic-import.js
import("./foo.json", { with: { type: "json" } });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/empty.js
tests/format/js/import-attributes/empty.js
export * as foo from "foo.json" export * as bar from "bar.json" with { } export * as baz from "baz.json" with { /* comment */ } import * as foo from "foo.json" import * as bar from "bar.json" with { } import * as baz from "baz.json" with { /* comment */ }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/long-sources.js
tests/format/js/import-attributes/long-sources.js
import a11 from "./aaaaaaaaaa.json" with { type: "json" }; import a12 from "./aaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; import a13 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; import a14 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; import a15 from "./aaaaa...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/static-import.js
tests/format/js/import-attributes/static-import.js
import json from "./foo.json" with { type: "json" };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/multiple.js
tests/format/js/import-attributes/multiple.js
import syntaxImportAssertions from "@babel/plugin-syntax-import-assertions" with { BABEL_8_BREAKING: "false", USE_ESM: "true", IS_STANDALONE: "false" }; import a1 from "foo" with { BABEL_8_BREAKING: "false", USE_ESM: "true", IS_STANDALONE: "false" }; import a2 from "foo" with {BABEL_8_BREAKING: "false", USE_...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/multi-types.js
tests/format/js/import-attributes/multi-types.js
import json from "./foo.json" with { type: "json", type: "bar" };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/non-type.js
tests/format/js/import-attributes/non-type.js
import foo from "foo.json" with { lazy: "true" };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/keyword-detect.js
tests/format/js/import-attributes/keyword-detect.js
import "./test.json" /* assert */ with /* assert */ { type: "json" } import a from "./test.json" /* assert */ with /* assert */ { type: "json" } export {default as c} from "./test.json" /* assert */ with /* assert */ { type: "json" } export * from "./test.json" /* assert */ with /* assert */ { type: "json" }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/re-export.js
tests/format/js/import-attributes/re-export.js
export { default as foo2 } from "foo.json" with { type: "json" }; export * from "foo.json" with { type: "json" }; export * as foo3 from "foo.json" with { type: "json" };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/without-from.js
tests/format/js/import-attributes/without-from.js
import "foo" with { type: "json" }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/format.test.js
tests/format/js/import-attributes/format.test.js
const errors = { acorn: ["multi-types.js"], espree: ["multi-types.js"], meriyah: ["multi-types.js"], }; runFormatTest(import.meta, ["babel", "typescript"], { errors });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/bracket-spacing/dynamic-import.js
tests/format/js/import-attributes/bracket-spacing/dynamic-import.js
import("./foo.json", { with: { type: "json" } });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/bracket-spacing/empty.js
tests/format/js/import-attributes/bracket-spacing/empty.js
export * as bar from "bar.json" with { }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/bracket-spacing/static-import.js
tests/format/js/import-attributes/bracket-spacing/static-import.js
import json from "./foo.json" with { type: "json" };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/bracket-spacing/re-export.js
tests/format/js/import-attributes/bracket-spacing/re-export.js
export { default as foo2 } from "foo.json" with { type: "json" };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/bracket-spacing/format.test.js
tests/format/js/import-attributes/bracket-spacing/format.test.js
runFormatTest(import.meta, ["babel"], { bracketSpacing: false });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/quote-props/quoted-keys.js
tests/format/js/import-attributes/quote-props/quoted-keys.js
import json1 from './mod.js' with { "type":"json" }; import json2 from './mod.js' with { "foobar":"json" }; import json3 from './mod.js' with { "type-foo" :"json" }; import json4 from './mod.js' with { "333foo" :"json" }; import json5 from './mod.js' with { "0" :"json" }; import json6 from './mod.js' with { "0n" :"json...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/import-attributes/quote-props/format.test.js
tests/format/js/import-attributes/quote-props/format.test.js
runFormatTest(import.meta, ["babel", "typescript"]); runFormatTest(import.meta, ["babel", "typescript"], { quoteProps: "consistent", }); runFormatTest(import.meta, ["babel", "typescript"], { quoteProps: "preserve" });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/chain-in-logical-expression.js
tests/format/js/arrows/chain-in-logical-expression.js
const x = a.b ?? ( ( c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" ) => (e) => 0 );
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/array-and-object.js
tests/format/js/arrows/array-and-object.js
const fn12 = (a) => (b) => (c) => (d) => (e) => ({ foo: bar, bar: baz, baz: foo }); map(() => ([ // comment foo ])); map(() => ({ // comment foo }));
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/block_like.js
tests/format/js/arrows/block_like.js
a = () => ({} = this);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/issue-10814.js
tests/format/js/arrows/issue-10814.js
const fastifyLoggerOptions = async ( fastify, { skip2xxHttpLogging = false }, // eslint-disable-next-line require-await ) => { const middleware = getMiddleware(skip2xxHttpLogging); };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/currying.js
tests/format/js/arrows/currying.js
const fn = b => c => d => { return 3; }; const foo = (a, b) => c => d => { return 3; }; const bar = a => b => c => a + b + c const mw = store => next => action => { return next(action) } const middleware = options => (req, res, next) => { // ... };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/currying-4.js
tests/format/js/arrows/currying-4.js
Y(() => a ? b : c); Y(() => () => a ? b : c); Y(() => () => () => a ? b : c); Y(() => longlonglonglonglonglonglonglonglonglongCondition ? 'Prettier is an opinionated code formatter.' : 'Prettier takes your code and reprints it from scratch by taking the line length into account.') Y(() => () => longlonglonglonglong...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/call.js
tests/format/js/arrows/call.js
Seq(typeDef.interface.groups).forEach(group => Seq(group.members).forEach((member, memberName) => markdownDoc( member.doc, { typePath: typePath.concat(memberName.slice(1)), signatures: member.signatures } ) ) ) const promiseFromCallback = fn => new Promise((resolve, reject) => fn((...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/arrow-chain-with-trailing-comments.js
tests/format/js/arrows/arrow-chain-with-trailing-comments.js
x = (bifornCringerMoshedPerplexSawder) => ((askTrovenaBeenaDependsRowans, glimseGlyphsHazardNoopsTieTie) => (f00) => { averredBathersBoxroomBuggyNurl(); } // BOOM ) x2 = (a) => ((askTrovenaBeenaDependsRowans1, askTrovenaBeenaDependsRowans2, askTrovenaBeenaDependsRowans3) => { c(); } /* ! */ // KABOOM )
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/parens.js
tests/format/js/arrows/parens.js
promise.then( (result) => result, (err) => err ) promise.then( (result) => { f(); return result }, (err) => { f(); return err } ) foo(a => b) foo(a => { return b }) foo(c, a => b) foo(c, a => b, d) foo(a => b, d) foo(a => (0, 1)); foo(a => b => (0, 1)); () => ({} ? 1 : 2); () => () => ({} ? 1 : 2);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/currying-3.js
tests/format/js/arrows/currying-3.js
((b) => (c) => (d) => { return 3; })(x); function f( a = (fooLorem) => (bazIpsum) => (barLorem) => { return 3; } ) {} ( (fooLoremIpsumFactory) => (bazLoremIpsumFactory) => (barLoremIpsumServiceFactory) => { return 3; } )(x); ( (b) => (c) => (d) => b + fooLoremIpsumFactory(c) - bazLoremIps...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/currying-2.js
tests/format/js/arrows/currying-2.js
const a = (x) => (y) => (z) => x / 0.123456789 + (y * calculateSomething(z)) / Math.PI; request.get('https://preview-9992--prettier.netlify.app', head => body => { console.log(head, body); }); request.get('https://preview-9992--prettier.netlify.app', head => body => mody => { console.log(head, body); }); r...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/assignment-chain-with-arrow-chain.js
tests/format/js/arrows/assignment-chain-with-arrow-chain.js
bifornCringer = askTrovenaBeenaDepends = glimseGlyphs = ( argumentOne, argumentTwo, ) => restOfTheArguments12345678 => { return "baz"; }; bifornCringer = askTrovenaBeenaDepends = glimseGlyphs = ( argumentOne, argumentTwo, argumentThree ) => restOfTheArguments12345678 => { return "baz"; }; bifornCringer ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/comment.js
tests/format/js/arrows/comment.js
/** * Curried function that ends with a BEM CSS Selector * * @param {String} block - the BEM Block you'd like to select. * @returns {Function} */ export const bem = block => /** * @param {String} [element] - the BEM Element within that block; if undefined, selects the block itself. * @returns {Function} ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/long-contents.js
tests/format/js/arrows/long-contents.js
const foo = () => { expect(arg1, arg2, arg3).toEqual({message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:36'}); };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/curried.js
tests/format/js/arrows/curried.js
const fn1 = a => 3; const fn2 = a => b => 3; const fn3 = a => b => c => 3; const fn4 = a => b => c => d => 3; const fn5 = a => b => c => d => e => 3; const fn6 = a => b => c => d => e => g => 3; const fn7 = a => b => c => d => e => g => f => 3; const fn8 = a => ({ foo: bar, bar: baz, baz: foo }); const fn9 = a => b =>...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/chain-as-arg.js
tests/format/js/arrows/chain-as-arg.js
const w = a.b( ( c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" ) => (e) => 0 ); const x = a.b( ( c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", d = "abcdefghijklmnopqrstuvwxyzabcdefghijkl...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/issue-4166-curry.js
tests/format/js/arrows/issue-4166-curry.js
const myCurriedFn = arg1 => arg2 => arg3 => arg1 + arg2 + arg3;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/arrow_function_expression.js
tests/format/js/arrows/arrow_function_expression.js
(a => {}).length typeof (() => {}); export default (() => {})(); (() => {})()``; (() => {})``; new (() => {}); if ((() => {}) ? 1 : 0) {} let f = () => ({}()) let a = () => ({} instanceof a); a = () => ({} && a); a = () => ({}() && a); a = () => ({} && a && b); a = () => ({} + a); a = () => ({}()() && a); a = () => ({}...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/issue-1389-curry.js
tests/format/js/arrows/issue-1389-curry.js
const foobar = (argumentOne, argumentTwo, argumentThree) => (...restOfTheArguments) => { return "baz"; }; const foobaz = (argumentOne, argumentTwo, argumentThree) => (restOfTheArguments123, j) => { return "baz"; }; const makeSomeFunction = (services = {logger:null}) => (a, b, c) => servic...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/long-call-no-args.js
tests/format/js/arrows/long-call-no-args.js
veryLongCall(VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, () => {})
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/format.test.js
tests/format/js/arrows/format.test.js
runFormatTest(import.meta, ["babel", "typescript"], { arrowParens: "always" }); runFormatTest(import.meta, ["babel", "typescript"], { arrowParens: "avoid" });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/semi/semi.js
tests/format/js/arrows/semi/semi.js
a => {}
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/arrows/semi/format.test.js
tests/format/js/arrows/semi/format.test.js
runFormatTest(import.meta, ["babel", "typescript"], { arrowParens: "always", semi: false, }); runFormatTest(import.meta, ["babel", "typescript"], { arrowParens: "avoid", semi: false, });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/computed-props/classes.js
tests/format/js/computed-props/classes.js
class c { ["i"]() {} }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/computed-props/format.test.js
tests/format/js/computed-props/format.test.js
runFormatTest(import.meta, ["babel", "flow", "typescript"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/classes/class-fields-features.js
tests/format/js/classes/class-fields-features.js
class Foo { static epoch = new CustomDate(0); #xValue = 0; get #x() { return this.#xValue; } set #x(value) { this.#xValue = value; window.requestAnimationFrame(this.#render.bind(this)); } #clicked() { this.#x++; } #render() { this.textContent = this.#x.toString(); } }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/classes/property.js
tests/format/js/classes/property.js
class A { foobar = // comment to break 1 + // comment to break again 2; } class B { someInstanceProperty = this.props.foofoofoofoofoofoo && this.props.barbarbarbar; someInstanceProperty2 = { foo: this.props.foofoofoofoofoofoo && this.props.barbarbarbar }; someInstanceProperty3 =...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/classes/super.js
tests/format/js/classes/super.js
class A extends B { #a() { super.x(); } }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/classes/asi.js
tests/format/js/classes/asi.js
// https://github.com/facebook/flow/commit/78f657e8da014e16ff509ad34f8178b158c47af7 class C { foo () {} }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/classes/member.js
tests/format/js/classes/member.js
(class {})[1]; (class {}).a;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/classes/assignment.js
tests/format/js/classes/assignment.js
aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg2 = class extends ( aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg1 ) { method () { console.log("foo"); } }; foo = class extends bar { method() { console.log("foo"); } }; aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffff...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/classes/call.js
tests/format/js/classes/call.js
(class {})(class {});
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/classes/computed-constructor-property.js
tests/format/js/classes/computed-constructor-property.js
class A { [constructor] } class B { ["constructor"] }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/classes/empty.js
tests/format/js/classes/empty.js
class A4 { m() {} }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/classes/method.js
tests/format/js/classes/method.js
class C { name/*comment*/() { } }; ({ name/*comment*/() { } });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/classes/binary.js
tests/format/js/classes/binary.js
(class {}) + 1; (class a {}) + 1; (class extends b {}) + 1; (class a extends b {}) + 1;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/classes/new.js
tests/format/js/classes/new.js
new class {}; new Ctor(class {});
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false