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/deferred-import-evaluation/format.test.js
tests/format/js/deferred-import-evaluation/format.test.js
const importDeferTests = [ "import-defer.js", "import-defer-attributes-declaration.js", "dynamic-import.js", "dynamic-import-attributes-expression.js", ]; const invalidSyntaxTests = ["no-default.js", "no-named.js"]; runFormatTest(import.meta, ["babel"], { errors: { acorn: [...importDeferTests, ...invalid...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/comments-pipeline-own-line/pipeline_own_line.js
tests/format/js/comments-pipeline-own-line/pipeline_own_line.js
function pipeline() { 0 // Comment |> x } bifornCringerMoshedPerplexSawder( askTrovenaBeenaDependsRowans, glimseGlyphsHazardNoopsTieTie, averredBathersBoxroomBuggyNurl ) // comment |> kochabCooieGameOnOboleUnweave |> glimseGlyphsHazardNoopsTieTie; bifornCringerMoshedPerplexSawder( askTrovenaBeenaDependsRow...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/comments-pipeline-own-line/format.test.js
tests/format/js/comments-pipeline-own-line/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/binary-expressions/return.js
tests/format/js/binary-expressions/return.js
function foo() { return this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right; } function foo2() { return this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right ? true : false; } function foo3() { return this.calculate().compute().first.numberOfThings...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/array-and-object.js
tests/format/js/binary-expressions/array-and-object.js
foo = foo || [ // comment a, ] foo = foo || { // comment a, }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/if.js
tests/format/js/binary-expressions/if.js
if (this.hasPlugin("dynamicImports") && this.lookahead().type) {} if (this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft) {} if (this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right) {} if (VeryVeryVeryVeryVeryVeryVeryVeryLong === VeryVeryVeryVeryVeryVeryVeryVeryLo...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/exp.js
tests/format/js/binary-expressions/exp.js
a ** b ** c; (a ** b) ** c; a.b ** c; (-a) ** b; a ** -b; -(a**b); (a * b) ** c; 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/binary-expressions/inline-jsx.js
tests/format/js/binary-expressions/inline-jsx.js
const user = renderedUser || <div><User name={this.state.user.name} age={this.state.user.age} /></div>; const user2 = renderedUser || shouldRenderUser && <div><User name={this.state.user.name} age={this.state.user.age} /></div>; const avatar = hasAvatar && <Gravatar user={author} size={size} />; const avatar2 = (has...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/call.js
tests/format/js/binary-expressions/call.js
( aaaaaaaaaaaaaaaaaaaaaaaaa && bbbbbbbbbbbbbbbbbbbbbbbbb && ccccccccccccccccccccccccc && ddddddddddddddddddddddddd && eeeeeeeeeeeeeeeeeeeeeeeee )(); ( aa && bb && cc && dd && ee )(); ( aaaaaaaaaaaaaaaaaaaaaaaaa + bbbbbbbbbbbbbbbbbbbbbbbbb + ccccccccccccccccccccccccc + ddddddddddddddddddddd...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/equality.js
tests/format/js/binary-expressions/equality.js
x == y == z; x != y == z; x == y != z; x != y != z; x === y === z; x !== y === z; x === y !== z; x !== y !== z;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/math.js
tests/format/js/binary-expressions/math.js
x + y / z; x / y + z; x * y % z; x / y % z; x % y * z; x % y / z; x % y % z; x << y >> z; x >>> y << z; x >>> y >>> z; x + y >> z; x | y & z; x & y | z; x ^ y ^ z; x & y & z; x | y | z; x & y >> z; x << y | z;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/test.js
tests/format/js/binary-expressions/test.js
// It should always break the highest precedence operators first, and // break them all at the same time. const x = longVariable + longVariable + longVariable; const x1 = longVariable + longVariable + longVariable + longVariable - longVariable + longVariable; const x2 = longVariable + longVariable * longVariable + lon...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/unary.js
tests/format/js/binary-expressions/unary.js
const anyTestFailures = !( aggregatedResults.numFailedTests === 0 && aggregatedResults.numRuntimeErrorTestSuites === 0 );
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/jsx_parent.js
tests/format/js/binary-expressions/jsx_parent.js
<div src={ !isJellyfishEnabled && diffUpdateMessageInput != null && this.state.isUpdateMessageEmpty } />; <div> {!isJellyfishEnabled && diffUpdateMessageInput != null && this.state.isUpdateMessageEmpty} </div>; <div style={ !isJellyfishEnabled && diffUpdateMessageInput && { f...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/in_instanceof.js
tests/format/js/binary-expressions/in_instanceof.js
!foo in bar; (!foo in bar); !(foo in bar); (!foo) in bar; !foo instanceof Bar; (!foo instanceof Bar); !(foo instanceof Bar); (!foo) instanceof Bar; ~foo in bar; (~foo in bar); ~(foo in bar); (~foo) in bar; ~foo instanceof Bar; (~foo instanceof Bar); ~(foo instanceof Bar); (~foo) instanceof Bar; +foo in bar; (+foo...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/bitwise-flags.js
tests/format/js/binary-expressions/bitwise-flags.js
const FLAG_A = 1 << 0; const FLAG_B = 1 << 1; const FLAG_C = 1 << 2; const all = FLAG_A | FLAG_B | FLAG_C;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/arrow.js
tests/format/js/binary-expressions/arrow.js
function f() { const appEntities = getAppEntities(loadObject).filter( entity => entity && entity.isInstallAvailable() && !entity.isQueue() && entity.isDisabled() ) } function f2() { const appEntities = getAppEntities(loadObject).map( entity => entity && entity.isInstallAvailable() && !entity.isQueue() &&...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/short-right.js
tests/format/js/binary-expressions/short-right.js
this._cumulativeHeights && Math.abs( this._cachedItemHeight(this._firstVisibleIndex + i) - this._provider.fastHeight(i + this._firstVisibleIndex), ) > 1 foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo( aaaaaaaaaaaaaaaaaaa ) + a; const isPartOfPackageJSON = dependenciesArray.indexOf( dep...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/chain-expression.js
tests/format/js/binary-expressions/chain-expression.js
if ( true // This is a really complicated part of the condition, so we need a big ol' // comment here to explain it. && flibble.blibble.blobble?.bloo ) { doThings(); }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/comment.js
tests/format/js/binary-expressions/comment.js
a = ( // Comment 1 (Math.random() * (yRange * (1 - minVerticalFraction))) + (minVerticalFraction * yRange) ) - offset; a + a + a + // comment a + a; a && longLongLongLongLongLongLongLongLong && longLongLongLongLongLongLongLongLong && // comment longLongLongLongLongLongLongLongLong && longLongLongLo...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/inline-object-array.js
tests/format/js/binary-expressions/inline-object-array.js
prevState = prevState || { catalogs: [], loadState: LOADED, opened: false, searchQuery: '', selectedCatalog: null, }; prevState = prevState || defaultState || { catalogs: [], loadState: LOADED, opened: false, searchQuery: '', selectedCatalog: null, }; prevState = prevState || defau...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/like-regexp.js
tests/format/js/binary-expressions/like-regexp.js
0 ? a : { b : 1 }/2;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/format.test.js
tests/format/js/binary-expressions/format.test.js
runFormatTest(import.meta, ["babel", "flow", "typescript"]); runFormatTest(import.meta, ["babel", "flow", "typescript"], { experimentalOperatorPosition: "start", });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/mutiple-comments/17192.js
tests/format/js/binary-expressions/mutiple-comments/17192.js
ErrorLike = SerializedProps & // cause is a new addition to Error that is not yet available in all runtimes. We have added // it to try and pinpoint additional reasoning for failures such as Node's fetch. // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause { cause: ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/mutiple-comments/format.test.js
tests/format/js/binary-expressions/mutiple-comments/format.test.js
runFormatTest(import.meta, ["babel", "flow", "typescript"]); runFormatTest(import.meta, ["babel", "flow", "typescript"], { experimentalOperatorPosition: "start", });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/parentheses/bitwise.js
tests/format/js/binary-expressions/parentheses/bitwise.js
// https://github.com/prettier/prettier/issues/18145 1 << bit % 8; 1 >> bit - 8; 1 | bit % 8; 1 & bit % 8; 1 ^ bit % 8; 1 >>> bit % 8; (a + b) % c; a % (b + c); 1 << bit * 8; 1 >> bit / 8; 1 << bit + 8; 1 >> bit - 8;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/binary-expressions/parentheses/format.test.js
tests/format/js/binary-expressions/parentheses/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/pipeline-operator/fsharp_style_pipeline_operator.js
tests/format/js/pipeline-operator/fsharp_style_pipeline_operator.js
promise |> await |> x => doubleSay(x, ', ') |> capitalize |> x => x + '!' |> x => new User.Message(x) |> x => stream.write(x) |> await |> console.log; const result = "hello" |> doubleSay |> capitalize |> exclaim; const newScore = person.score |> double |> n => add(7, n) |> n => boundScore(...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/pipeline-operator/hack_pipeline_operator.js
tests/format/js/pipeline-operator/hack_pipeline_operator.js
a |> await % |> % * 3; foo |> await % |> % || throw new Error(`foo ${bar1}`) |> bar2(%, ", ") |> bar3(%) |> % + "!" |> new Bar.Foo(%) |> await bar.bar(%) |> console.log(%); const result = "hello" |> doubleSay(%) |> capitalize(%, "foo") |> exclaim(%); function createPerson (attrs) { attrs ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/pipeline-operator/minimal_pipeline_operator.js
tests/format/js/pipeline-operator/minimal_pipeline_operator.js
a |> b |> c; a |> (b |> c); (a |> b) || c; a |> (b || c); let result = "hello" |> doubleSay |> capitalize |> exclaim; let newScore = person.score |> double |> (_ => add(7, _)) |> (_ => subtract(2, _)) |> (_ => boundScore(0, 100, _)); function createPerson (attrs) { attrs |> bounded('age', 1, 10...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/pipeline-operator/block-comments.js
tests/format/js/pipeline-operator/block-comments.js
bifornCringerMoshedPerplexSawder |> foo1 |> foo2 /* comment1 */ |> foo3 /* comment2 */ |> kochabCooieGameOnOboleUnweave |> glimseGlyphsHazardNoopsTieTie;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/pipeline-operator/format.test.js
tests/format/js/pipeline-operator/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/bracket-spacing/object.js
tests/format/js/bracket-spacing/object.js
const obj1 = {a:1, b:2, c:3} const obj2 = { a:1, b:2, c:3 };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/bracket-spacing/array.js
tests/format/js/bracket-spacing/array.js
const arr1 = [1,2,3,4]; const arr2 = [1, 2, 3, 4];
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/bracket-spacing/format.test.js
tests/format/js/bracket-spacing/format.test.js
runFormatTest(import.meta, ["babel", "flow", "typescript"]); runFormatTest(import.meta, ["babel", "flow", "typescript"], { bracketSpacing: false, });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/switch/switch.js
tests/format/js/switch/switch.js
switch (a) { case 3: alert( '3' ); break; case 4: alert( '4' ); break; case 5: alert( '5' ); break; default: alert( 'default' ); } switch (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong) { case 3: alert( '3' ); break; default: alert( 'de...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/switch/comments.js
tests/format/js/switch/comments.js
switch (true) { case true: // Good luck getting here case false: } switch (true) { case true: // Good luck getting here case false: } switch(x) { case x: { } // other case y: { } } switch(x) { default: // comment break; } switch(x) { default: // comment {break;} } switch(x) { ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/switch/empty_switch.js
tests/format/js/switch/empty_switch.js
switch (1) { default:; } switch (1) {}
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/switch/empty_lines.js
tests/format/js/switch/empty_lines.js
switch (foo) { case "bar": doSomething(); case "baz": doOtherThing(); } switch (foo) { case "bar": doSomething(); case "baz": doOtherThing(); } switch (foo) { case "bar": doSomething(); case "baz": doOtherThing(); } switch (foo) { case "bar": doSomething(); case "b...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/switch/comments2.js
tests/format/js/switch/comments2.js
switch(1){default: // comment1 } switch(2){default: // comment2 //comment2a } switch(3){default: // comment3 break;// comment3a } switch(4){default: // comment4 // comment4a break;// comment4b } switch(5){default: // comment5 // comment5a foo();bar();//comment5b break;// comment5c }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/switch/format.test.js
tests/format/js/switch/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/switch/empty_statement.js
tests/format/js/switch/empty_statement.js
switch (error.code) { case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: { nls.localize('errorInvalidConfiguration', "Unable to write into settings. Correct errors/warnings in the file and try again."); }; }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/return/binaryish.js
tests/format/js/return/binaryish.js
function f() { return ( property.isIdentifier() && FUNCTIONS[property.node.name] && (object.isIdentifier(JEST_GLOBAL) || (callee.isMemberExpression() && shouldHoistExpression(object))) && FUNCTIONS[property.node.name](expr.get('arguments')) ); return ( chalk.bold( 'No tests fou...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/return/comment.js
tests/format/js/return/comment.js
function f() { return /* a */; } function f() { return // a ; } function f() { return // a /* b */; } function f() { return /* a */ // b ; } function x() { return func2 //comment .bar(); } function f() { return ( foo // comment .bar() ); } fn(function f() { retu...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/return/format.test.js
tests/format/js/return/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/while/indent.js
tests/format/js/while/indent.js
if (someVeryLongStringA && someVeryLongStringB && someVeryLongStringC && someVeryLongStringD) {} while (someVeryLongStringA && someVeryLongStringB && someVeryLongStringC && someVeryLongStringD) {} do {} while (someVeryLongStringA && someVeryLongStringB && someVeryLongStringC && someVeryLongStringD); if (someVeryLongFu...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/while/format.test.js
tests/format/js/while/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/conditional/no-confusing-arrow.js
tests/format/js/conditional/no-confusing-arrow.js
// no-confusing-arrow var x = a => 1 ? 2 : 3; var x = a <= 1 ? 2 : 3;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/conditional/new-ternary-spec.js
tests/format/js/conditional/new-ternary-spec.js
// from https://gist.github.com/rattrayalex/dacbf5838571a47f22d0ae1f8b960268 // Input and output should match (for 2-space indent formatting). // TypeScript is here: prettier/tests/format/typescript/conditional-types/new-ternary-spec.ts // remain on one line if possible: const short = isLoud() ? makeNoise() : silent()...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/conditional/new-expression.js
tests/format/js/conditional/new-expression.js
const testConsole = new TestConsole( config.useStderr ? process.stderr : process.stdout );
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/conditional/comments.js
tests/format/js/conditional/comments.js
var inspect = 4 === util.inspect.length ? // node <= 0.8.x (function(v, colors) { return util.inspect(v, void 0, void 0, colors); }) : // node > 0.8.x (function(v, colors) { return util.inspect(v, { colors: colors }); }); var inspect = 4 === util.inspect.length ? // node <= 0.8.x ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/conditional/postfix-ternary-regressions.js
tests/format/js/conditional/postfix-ternary-regressions.js
// concatened string in consequent should be visually distinguishable from alternate // … or maybe this is okay, because the colon is enough? const avatar = has_ordered ? 'https://marmelab.com/posters/avatar/longer-word-that-breaks-consequent-' + numberOfCustomers + '.jpeg' : undefined; // Similarly, in...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/conditional/new-ternary-examples.js
tests/format/js/conditional/new-ternary-examples.js
// from https://gist.github.com/rattrayalex/dacbf5838571a47f22d0ae1f8b960268 // Input and output should match (for 2-space indent formatting). // TypeScript is here: prettier/tests/format/typescript/conditional-types/new-ternary-spec.ts // EXAMPLES // mostly taken from https://github.com/prettier/prettier/issues/9561 ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/conditional/format.test.js
tests/format/js/conditional/format.test.js
runFormatTest(import.meta, ["babel", "flow", "typescript"]); runFormatTest(import.meta, ["babel", "flow", "typescript"], { experimentalTernaries: true, });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/test-declarations/angular_fakeAsync.js
tests/format/js/test-declarations/angular_fakeAsync.js
beforeEach(fakeAsync(() => { // code })); afterAll(fakeAsync(() => { console.log('Hello'); })); it('should create the app', fakeAsync(() => { //code })); it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => { // code })); it("does something really...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/test-declarations/angular_async.js
tests/format/js/test-declarations/angular_async.js
beforeEach(async(() => { // code })); beforeEach(done => foo() .bar() .bar(), ); afterAll(async(() => { console.log('Hello'); })); afterAll(done => foo() .bar() .bar(), ); it('should create the app', async(() => { //code })); it("does something really long and complicated so I have to wri...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/test-declarations/angular_waitForAsync.js
tests/format/js/test-declarations/angular_waitForAsync.js
beforeEach(waitForAsync(() => { // code })); afterAll(waitForAsync(() => { console.log('Hello'); })); it('should create the app', waitForAsync(() => { //code })); it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => { // code })); it("does some...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/test-declarations/jest-each.js
tests/format/js/test-declarations/jest-each.js
describe.each` a|b|expected ${11 } | ${ 1 }|${222} ${1-1}|${2+2}|${ 3333} ${2+1+2}|${1111}|${3} `('$a + $b', ({a, b, expected}) => { test(`returns ${expected}`, () => { expect(a + b).toBe(expected); }); test(`returned value not be greater than ${expected}`, () => { expect(a + b).not.toBeGreaterThan(e...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/test-declarations/jest-each-template-string.js
tests/format/js/test-declarations/jest-each-template-string.js
test.each` a | b | c ${1} | ${[{ start: 5, end: 15 }]} | ${[1,2,3,4,5,6,7,8]} ${1}| ${[{ start: 5, end: 15 }]} | ${["test", "string", "for", "prettier"]} ${3} | ${[{ start: 5, end: 15 }]} | ${[]} ${4} | ${[{ start: 1, end: 3 },{ start: 15, end: 20 },]} | ${[]} `("example test", ({a, b, c}) => {}) te...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/test-declarations/angularjs_inject.js
tests/format/js/test-declarations/angularjs_inject.js
beforeEach(inject(($fooService, $barService) => { // code })); afterAll(inject(($fooService, $barService) => { console.log('Hello'); })); it('should create the app', inject(($fooService, $barService) => { //code })); it("does something really long and complicated so I have to write a very long name for the tes...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/test-declarations/test_declarations.js
tests/format/js/test-declarations/test_declarations.js
// Shouldn't break it("does something really long and complicated so I have to write a very long name for the test", () => { console.log("hello!"); }); it("does something really long and complicated so I have to write a very long name for the test", function() { console.log("hello!"); }); it("does something real...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/test-declarations/optional.js
tests/format/js/test-declarations/optional.js
describe?.("some string some string some string some string some string some string some string some string", (done) => {})
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/test-declarations/format.test.js
tests/format/js/test-declarations/format.test.js
runFormatTest(import.meta, ["babel", "flow", "typescript"]); runFormatTest(import.meta, ["babel", "flow", "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/no-semi/private-field.js
tests/format/js/no-semi/private-field.js
class C { #field = 'value'; ["method"]() {} }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/no-semi/comments.js
tests/format/js/no-semi/comments.js
let error = new Error(response.statusText); // comment [].response = response x; /* comment */ [].response = response x; [].response = response; /* comment */
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/no-semi/no-semi.js
tests/format/js/no-semi/no-semi.js
// with preexisting semi x; [1, 2, 3].forEach(fn) x; [a, b, ...c] = [1, 2] x; /r/i.test('r') x; +1 x; - 1 x; ('h' + 'i').repeat(10) x; (1, 2) x; (() => {})() x; ({ a: 1 }).entries() x; ({ a: 1 }).entries() x; <Hello /> x; `string` x; (x, y) => x // doesn't have to be preceded by a semicolon class X {} [1, 2, 3].for...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/no-semi/issue2006.js
tests/format/js/no-semi/issue2006.js
switch (n) { case 11: var c = a.e; (i.a += Ga(c.e)), F(i, c.i, 0); } var c = a.e; (i.a += Ga(c.e)), F(i, c.i, 0);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/no-semi/class.js
tests/format/js/no-semi/class.js
// TODO: upgrade parser // class A { // async; // The semicolon is *not* necessary // x(){} // } // class B { // static; // The semicolon *is* necessary // x(){} // } class C1 { get; // The semicolon *is* necessary x(){} } class C2 { get = () => {}; // The semicolon is *not* necessary x(){} } class C3 ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/no-semi/format.test.js
tests/format/js/no-semi/format.test.js
runFormatTest(import.meta, ["babel", "flow"], {}); runFormatTest(import.meta, ["babel", "flow"], { semi: false });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/unicode/keys.js
tests/format/js/unicode/keys.js
({'この事はつもり素晴らしいことさ': '35jL9V'})
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/unicode/combining-characters.js
tests/format/js/unicode/combining-characters.js
const x = ["ÁÀĀÉÈĒẸE̩Ẹ́É̩Ẹ̀È̩Ẹ̄Ē̩ÍÌĪÓÒŌỌO̩Ọ́Ó̩Ọ̀Ò̩Ọ̄Ō̩ÚÙŪṢS̩áàāéèēẹe̩ẹ́é̩ẹ̀è̩ẹ̄ē̩íìīóòōọo̩ọ́ó̩ọ̀ò̩ọ̄ō̩úùū"]; //345678901234567890123456789012345678901234567890123456789012345678901234567890 // 1 2 3 4 5 6 7 8
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/unicode/format.test.js
tests/format/js/unicode/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/unicode/nbsp-jsx.js
tests/format/js/unicode/nbsp-jsx.js
// Note: there are non breaking spaces in the JSX text x = <p> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa </p>;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/generator/anonymous.js
tests/format/js/generator/anonymous.js
const f1 = function* () { yield 0; }; const f2 = function * () { yield 0; }; const f3 = function* () { }; (function* () { yield 0; }); (function * () { yield 0; }); (function* () { });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/generator/async.js
tests/format/js/generator/async.js
// https://github.com/meriyah/meriyah/commit/f21882c312284572ac6d7e7630c4a677d6caed92 const f = async function * (source, block, opts) { for await (const entry of source) { yield async function () { const cid = await persist(entry.content.serialize(), block, opts) return { cid, path: ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/generator/function-name-starts-with-get.js
tests/format/js/generator/function-name-starts-with-get.js
// https://github.com/meriyah/meriyah/issues/164 function get() {} function* getData() { return yield get(); }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/generator/format.test.js
tests/format/js/generator/format.test.js
runFormatTest(import.meta, ["babel", "typescript", "flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/quote-props/classes.js
tests/format/js/quote-props/classes.js
class A { a = "a" }; class B { 'b' = "b" }; class C { c1 = "c1" 'c2' = "c2" }; class D { d1 = "d1" 'd-2' = "d2" };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/quote-props/with_numbers.js
tests/format/js/quote-props/with_numbers.js
obj = { foo: "", 1: "" }; obj = { "bar": "", 1: "" }; obj = { "foo-bar": "", 1: "" };
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/quote-props/with_member_expressions.js
tests/format/js/quote-props/with_member_expressions.js
const obj = { foo: "", [foo.bar]: "" }; class Foo { foo() {} [foo.bar]() {} }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/quote-props/numeric-separator.js
tests/format/js/quote-props/numeric-separator.js
a = { 0xb_b: '0xb_b', // 187 0xb_b_bn: '0xb_b_bn', // 3003 0b100000000000_000000000000000011n: '0b100000000000_000000000000000011n' // 536870915 }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/quote-props/objects.js
tests/format/js/quote-props/objects.js
a = { a: "a" }; a = { 'b': "b" }; a = { // Escapes should stay as escapes and not be unquoted. '\u0062': "b", '\u0031': "1" }; a = { c1: "c1", 'c2': "c2" }; a = { d1: "d1", 'd-2': "d2" }; // None of these should become quoted, regardless of the quoteProps value. a = { NaN: null, 1: null, 1....
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/quote-props/format.test.js
tests/format/js/quote-props/format.test.js
runFormatTest(import.meta, ["babel"], { quoteProps: "as-needed" }); runFormatTest(import.meta, ["babel"], { quoteProps: "preserve" }); runFormatTest(import.meta, ["babel"], { quoteProps: "consistent" }); runFormatTest(import.meta, ["babel"], { quoteProps: "consistent", singleQuote: true, });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/multiparser-markdown/codeblock.js
tests/format/js/multiparser-markdown/codeblock.js
md` \`\`\`js markdown\` \\\`\\\`\\\`js console.log('hi'); \\\`\\\`\\\` \` \`\`\` `;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/multiparser-markdown/issue-5021.js
tests/format/js/multiparser-markdown/issue-5021.js
if (true) { md` text1 - 123 - 456 text2 - 123 - 456 text3 - 123 - 456 `; } if (true) { md` text1 - 123 - 456 text2 - 123 - 456 text3 - 123 - 456 `; }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/multiparser-markdown/single-line.js
tests/format/js/multiparser-markdown/single-line.js
markdown`# hello`
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/multiparser-markdown/escape.js
tests/format/js/multiparser-markdown/escape.js
markdown` const cssString = css\` background-color: \$\{color('base')\} \`; ` markdown` - \` - \\\` - \\ a - \\\\ - \$ - \u1234 `
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/multiparser-markdown/markdown.js
tests/format/js/multiparser-markdown/markdown.js
export default function ReadMe() { return md` ## Why Prettier? ### Building and enforcing a style guide By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles. It is generally accepted that having a common style guide is valuable for...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/multiparser-markdown/0-indent.js
tests/format/js/multiparser-markdown/0-indent.js
md` This line shouldn't be indented at all in the resulting output. ` if (true) { md` text1 - 123 - 456 text2 - 123 - 456 text3 - 123 - 456 `; }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/multiparser-markdown/format.test.js
tests/format/js/multiparser-markdown/format.test.js
runFormatTest(import.meta, ["babel"], { proseWrap: "always" });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/v8_intrinsic/intrinsic_call.js
tests/format/js/v8_intrinsic/intrinsic_call.js
function doSmth() { %DebugPrint ( foo ) } function printFunc ( f ) { if(% IsAsmWasmCode(f)) console.log("asm.js"); if( % IsWasmCode( f)) console.log ( "wasm" ); console.log ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/v8_intrinsic/avoid-conflicts-to-pipeline.js
tests/format/js/v8_intrinsic/avoid-conflicts-to-pipeline.js
// |> const status = %GetOptimizationStatus(fn);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/v8_intrinsic/format.test.js
tests/format/js/v8_intrinsic/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/range/object-expression2.js
tests/format/js/range/object-expression2.js
const y = [ { a: 1, },<<<PRETTIER_RANGE_START>>> { a: 1, b:2 },<<<PRETTIER_RANGE_END>>> ]
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/range/nested-print-width.js
tests/format/js/range/nested-print-width.js
function f() { if (true) {<<<PRETTIER_RANGE_START>>> call("this line is 79 chars", "long", "it should", "stay as single line"); <<<PRETTIER_RANGE_END>>>} }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/range/issue-4206-4.js
tests/format/js/range/issue-4206-4.js
/* */ class Foo{ <<<PRETTIER_RANGE_START>>>/**/ }<<<PRETTIER_RANGE_END>>>
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/range/class-declaration.js
tests/format/js/range/class-declaration.js
class <<<PRETTIER_RANGE_START>>> a { b( ) {}<<<PRETTIER_RANGE_END>>> } let x
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/range/function-declaration.js
tests/format/js/range/function-declaration.js
function ugly ( <<<PRETTIER_RANGE_START>>>{a=1, b = 2 }<<<PRETTIER_RANGE_END>>> ) {}
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/range/ignore-indentation.js
tests/format/js/range/ignore-indentation.js
function ugly ( {a=1, b = 2 } ) { function ugly ( {a=1, b = 2 } ) { function ugly ( {a=1, b = 2 } ) { `multiline template string with <<<PRETTIER_RANGE_START>>>too<<<PRETTIER_RANGE_END>>> much indentation` } } }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/js/range/try-catch.js
tests/format/js/range/try-catch.js
try {} <<<PRETTIER_RANGE_START>>>c<<<PRETTIER_RANGE_END>>>atch (err) {}
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false