├── .node-version ├── .gitignore ├── crates ├── biome_fmt │ ├── LICENSE │ ├── extra │ │ └── .npmignore │ └── test_data │ │ └── specs │ │ ├── jsx │ │ ├── smoke.jsx │ │ ├── smoke.jsx.snap │ │ ├── fragment.jsx │ │ ├── fragment.jsx.snap │ │ ├── comments.jsx │ │ ├── quote_style │ │ │ ├── quote_style.jsx.snap │ │ │ └── quote_style.jsx │ │ └── comments.jsx.snap │ │ ├── tsx │ │ ├── smoke.tsx │ │ └── smoke.tsx.snap │ │ ├── js │ │ ├── module │ │ │ ├── ident.js │ │ │ ├── ident.js.snap │ │ │ ├── expression │ │ │ │ ├── this_expression.js │ │ │ │ ├── this_expression.js.snap │ │ │ │ ├── computed-member-expression.js │ │ │ │ ├── computed-member-expression.js.snap │ │ │ │ ├── pre_update_expression.js │ │ │ │ ├── post_update_expression.js │ │ │ │ ├── post_update_expression.js.snap │ │ │ │ ├── pre_update_expression.js.snap │ │ │ │ ├── literal_expression.js │ │ │ │ ├── binary_range_expression.js │ │ │ │ ├── binary_range_expression.js.snap │ │ │ │ └── literal_expression.js.snap │ │ │ ├── no-semi │ │ │ │ ├── semicolons-asi.js │ │ │ │ ├── semicolons-asi.js.snap │ │ │ │ ├── private-field.js │ │ │ │ ├── private-field.js.snap │ │ │ │ └── semicolons_range.js │ │ │ ├── statement │ │ │ │ ├── statement.js │ │ │ │ ├── statement.js.snap │ │ │ │ ├── throw.js │ │ │ │ ├── throw.js.snap │ │ │ │ ├── return.js │ │ │ │ └── return.js.snap │ │ │ ├── with.js │ │ │ ├── export │ │ │ │ ├── expression_clause.js │ │ │ │ ├── expression_clause.js.snap │ │ │ │ ├── function_clause.js.snap │ │ │ │ ├── function_clause.js │ │ │ │ └── named_clause.js.snap │ │ │ ├── import │ │ │ │ ├── namespace_import.js │ │ │ │ └── namespace_import.js.snap │ │ │ ├── with.js.snap │ │ │ ├── decorators │ │ │ │ ├── export_default_1.js │ │ │ │ ├── export_default_2.js │ │ │ │ ├── export_default_3.js │ │ │ │ ├── export_default_1.js.snap │ │ │ │ ├── export_default_2.js.snap │ │ │ │ ├── export_default_3.js.snap │ │ │ │ ├── export_default_4.js │ │ │ │ └── export_default_4.js.snap │ │ │ ├── assignment │ │ │ │ ├── array-assignment-holes.js │ │ │ │ └── array-assignment-holes.js.snap │ │ │ ├── interpreter.js │ │ │ ├── interpreter_with_empty_line.js │ │ │ ├── array │ │ │ │ ├── empty_lines.js.snap │ │ │ │ ├── spaces.js │ │ │ │ ├── empty_lines.js │ │ │ │ └── spaces.js.snap │ │ │ ├── interpreter_with_empty_line.js.snap │ │ │ ├── binding │ │ │ │ ├── array-binding-holes.js │ │ │ │ └── array-binding-holes.js.snap │ │ │ ├── interpreter.js.snap │ │ │ ├── number │ │ │ │ ├── number.js │ │ │ │ ├── number.js.snap │ │ │ │ ├── number_with_space.js │ │ │ │ └── number_with_space.js.snap │ │ │ ├── object │ │ │ │ ├── getter_setter.js │ │ │ │ ├── getter_setter.js.snap │ │ │ │ ├── object_comments.js │ │ │ │ ├── object_comments.js.snap │ │ │ │ ├── octal_literals_key.js │ │ │ │ └── octal_literals_key.js.snap │ │ │ ├── script.js │ │ │ ├── string │ │ │ │ ├── parentheses_token.js │ │ │ │ └── parentheses_token.js.snap │ │ │ └── script.js.snap │ │ └── script │ │ │ ├── with.js │ │ │ ├── with.js.snap │ │ │ ├── script.js │ │ │ └── script.js.snap │ │ ├── prettier │ │ ├── js │ │ │ ├── regex │ │ │ │ ├── d-flag.js │ │ │ │ ├── v-flag.js │ │ │ │ ├── d-flag.js.snap │ │ │ │ ├── v-flag.js.snap │ │ │ │ ├── test.js │ │ │ │ ├── test.js.snap │ │ │ │ ├── multiple-flags.js │ │ │ │ ├── multiple-flags.js.snap │ │ │ │ ├── regexp-modifiers.js │ │ │ │ └── regexp-modifiers.js.snap │ │ │ ├── arrows │ │ │ │ ├── semi │ │ │ │ │ ├── semi.js │ │ │ │ │ └── semi.js.snap │ │ │ │ ├── block_like.js │ │ │ │ ├── block_like.js.snap │ │ │ │ ├── newline-before-arrow │ │ │ │ │ ├── newline-before-arrow.js │ │ │ │ │ └── newline-before-arrow.js.snap │ │ │ │ ├── issue-4166-curry.js │ │ │ │ ├── issue-4166-curry.js.snap │ │ │ │ └── long-call-no-args.js │ │ │ ├── directives │ │ │ │ ├── last-line-0.js │ │ │ │ ├── last-line-1.js │ │ │ │ ├── last-line-0.js.snap │ │ │ │ ├── last-line-1.js.snap │ │ │ │ ├── last-line-2.js │ │ │ │ ├── last-line-2.js.snap │ │ │ │ ├── no-newline.js │ │ │ │ ├── no-newline.js.snap │ │ │ │ ├── newline.js │ │ │ │ └── newline.js.snap │ │ │ ├── label │ │ │ │ ├── empty_label.js │ │ │ │ ├── empty_label.js.snap │ │ │ │ ├── block-statement-and-regexp.js │ │ │ │ └── block-statement-and-regexp.js.snap │ │ │ ├── non-strict │ │ │ │ ├── octal-number.js │ │ │ │ ├── octal-number.js.snap │ │ │ │ ├── argument-name-clash.js │ │ │ │ └── argument-name-clash.js.snap │ │ │ ├── objects │ │ │ │ ├── method.js │ │ │ │ ├── method.js.snap │ │ │ │ ├── bigint-key.js │ │ │ │ ├── bigint-key.js.snap │ │ │ │ └── assignment-expression │ │ │ │ │ ├── object-property.js │ │ │ │ │ └── object-property.js.snap │ │ │ ├── babel-plugins │ │ │ │ ├── regex-v-flag.js │ │ │ │ ├── regex-v-flag.js.snap │ │ │ │ ├── record-tuple-tuple.js │ │ │ │ ├── regexp-modifiers.js │ │ │ │ ├── import-reflection.js │ │ │ │ ├── record-tuple-tuple.js.snap │ │ │ │ ├── regexp-modifiers.js.snap │ │ │ │ ├── async-do-expressions.js │ │ │ │ ├── async-do-expressions.js.snap │ │ │ │ ├── import-assertions-dynamic.js │ │ │ │ ├── import-attributes-dynamic.js │ │ │ │ ├── import-attributes-static.js │ │ │ │ ├── import-assertions-dynamic.js.snap │ │ │ │ ├── import-assertions-static.js │ │ │ │ ├── import-attributes-dynamic.js.snap │ │ │ │ ├── import-attributes-static.js.snap │ │ │ │ ├── import-reflection.js.snap │ │ │ │ ├── module-blocks.js │ │ │ │ ├── decorator-auto-accessors.js │ │ │ │ ├── module-blocks.js.snap │ │ │ │ ├── decorator-auto-accessors.js.snap │ │ │ │ ├── typescript.js │ │ │ │ ├── typescript.js.snap │ │ │ │ └── import-assertions-static.js.snap │ │ │ ├── classes │ │ │ │ ├── call.js │ │ │ │ ├── call.js.snap │ │ │ │ ├── top-level-super │ │ │ │ │ ├── example.js │ │ │ │ │ └── example.js.snap │ │ │ │ ├── ternary.js │ │ │ │ ├── member.js │ │ │ │ ├── new.js │ │ │ │ ├── ternary.js.snap │ │ │ │ ├── member.js.snap │ │ │ │ ├── new.js.snap │ │ │ │ ├── super.js.snap │ │ │ │ ├── super.js │ │ │ │ ├── method.js.snap │ │ │ │ ├── binary.js │ │ │ │ └── binary.js.snap │ │ │ ├── cursor │ │ │ │ ├── cursor-10.js.snap │ │ │ │ ├── cursor-2.js.snap │ │ │ │ ├── cursor-8.js │ │ │ │ ├── cursor-emoji.js │ │ │ │ ├── cursor-2.js │ │ │ │ ├── cursor-emoji.js.snap │ │ │ │ ├── cursor-3.js.snap │ │ │ │ ├── cursor-5.js │ │ │ │ ├── cursor-5.js.snap │ │ │ │ ├── cursor-6.js.snap │ │ │ │ ├── cursor-1.js │ │ │ │ ├── cursor-6.js │ │ │ │ ├── cursor-9.js.snap │ │ │ │ ├── cursor-0.js │ │ │ │ ├── cursor-3.js │ │ │ │ ├── cursor-7.js │ │ │ │ ├── cursor-9.js │ │ │ │ ├── file-start-with-comment-1.js │ │ │ │ ├── file-start-with-comment-2.js │ │ │ │ ├── comments-3.js │ │ │ │ ├── cursor-10.js │ │ │ │ ├── cursor-4.js.snap │ │ │ │ ├── cursor-7.js.snap │ │ │ │ ├── cursor-8.js.snap │ │ │ │ ├── file-start-with-comment-2.js.snap │ │ │ │ ├── comments-2.js │ │ │ │ ├── file-start-with-comment-1.js.snap │ │ │ │ ├── comments-2.js.snap │ │ │ │ ├── comments-3.js.snap │ │ │ │ ├── cursor-0.js.snap │ │ │ │ ├── cursor-1.js.snap │ │ │ │ ├── comments-4.js │ │ │ │ ├── cursor-4.js │ │ │ │ ├── comments-1.js │ │ │ │ ├── comments-4.js.snap │ │ │ │ ├── comments-1.js.snap │ │ │ │ ├── range-5.js │ │ │ │ ├── range-5.js.snap │ │ │ │ ├── range-6.js │ │ │ │ ├── range-7.js │ │ │ │ ├── range-6.js.snap │ │ │ │ └── range-7.js.snap │ │ │ ├── for │ │ │ │ ├── var.js │ │ │ │ ├── var.js.snap │ │ │ │ └── for.js │ │ │ ├── tuple │ │ │ │ ├── tuple-trailing-comma.js │ │ │ │ ├── tuple-trailing-comma.js.snap │ │ │ │ ├── syntax.js │ │ │ │ └── syntax.js.snap │ │ │ ├── comments │ │ │ │ ├── first-line.js │ │ │ │ ├── first-line.js.snap │ │ │ │ ├── html-like │ │ │ │ │ ├── comment.js │ │ │ │ │ └── comment.js.snap │ │ │ │ ├── dangling_for.js │ │ │ │ ├── dangling_for.js.snap │ │ │ │ ├── multi-comments-on-same-line-2.js │ │ │ │ ├── multi-comments-on-same-line-2.js.snap │ │ │ │ ├── emoji.js │ │ │ │ └── emoji.js.snap │ │ │ ├── in │ │ │ │ ├── arrow-function-invalid.js │ │ │ │ ├── arrow-function-invalid.js.snap │ │ │ │ └── arrow-function.js │ │ │ ├── newline │ │ │ │ ├── backslash_2028.js │ │ │ │ ├── backslash_2029.js │ │ │ │ ├── backslash_2028.js.snap │ │ │ │ └── backslash_2029.js.snap │ │ │ ├── export │ │ │ │ ├── undefined.js │ │ │ │ ├── empty.js │ │ │ │ ├── undefined.js.snap │ │ │ │ └── empty.js.snap │ │ │ ├── top-level-await │ │ │ │ ├── example.js │ │ │ │ ├── example.js.snap │ │ │ │ ├── in-expression.js.snap │ │ │ │ └── in-expression.js │ │ │ ├── unicode │ │ │ │ ├── keys.js │ │ │ │ └── keys.js.snap │ │ │ ├── with │ │ │ │ ├── indent.js │ │ │ │ └── indent.js.snap │ │ │ ├── arrays │ │ │ │ ├── last.js │ │ │ │ ├── last.js.snap │ │ │ │ ├── holes-in-args.js.snap │ │ │ │ └── holes-in-args.js │ │ │ ├── async │ │ │ │ ├── exponentiation.js │ │ │ │ ├── exponentiation.js.snap │ │ │ │ ├── async-shorthand-method.js │ │ │ │ ├── async-shorthand-method.js.snap │ │ │ │ └── parens.js │ │ │ ├── binary-expressions │ │ │ │ ├── like-regexp.js │ │ │ │ └── like-regexp.js.snap │ │ │ ├── export-star │ │ │ │ ├── export-star.js │ │ │ │ ├── export-star.js.snap │ │ │ │ ├── export-star-as.js │ │ │ │ ├── export-star-as.js.snap │ │ │ │ ├── export-star-as-default.js │ │ │ │ ├── export-star-as-string.js │ │ │ │ ├── export-star-as-string2.js │ │ │ │ ├── export-star-as-default.js.snap │ │ │ │ ├── export-star-as-string.js.snap │ │ │ │ └── export-star-as-string2.js.snap │ │ │ ├── multiparser-markdown │ │ │ │ ├── single-line.js │ │ │ │ └── single-line.js.snap │ │ │ ├── new-target │ │ │ │ ├── outside-functions.js │ │ │ │ └── outside-functions.js.snap │ │ │ ├── array-spread │ │ │ │ ├── multiple.js │ │ │ │ └── multiple.js.snap │ │ │ ├── computed-props │ │ │ │ ├── classes.js │ │ │ │ └── classes.js.snap │ │ │ ├── empty-statement │ │ │ │ ├── no-newline.js.snap │ │ │ │ └── no-newline.js │ │ │ ├── export-default │ │ │ │ ├── body.js │ │ │ │ ├── body.js.snap │ │ │ │ ├── iife.js │ │ │ │ ├── iife.js.snap │ │ │ │ ├── class_instance.js │ │ │ │ ├── binary_and_template.js │ │ │ │ ├── class_instance.js.snap │ │ │ │ ├── function_tostring.js │ │ │ │ ├── binary_and_template.js.snap │ │ │ │ ├── function_in_template.js │ │ │ │ ├── function_tostring.js.snap │ │ │ │ ├── function_in_template.js.snap │ │ │ │ └── escaped │ │ │ │ │ └── default-escaped.js │ │ │ ├── import │ │ │ │ ├── empty-import.js │ │ │ │ ├── multiple_standalones.js │ │ │ │ ├── empty-import.js.snap │ │ │ │ ├── multiple_standalones.js.snap │ │ │ │ └── long-line.js │ │ │ ├── invalid-code │ │ │ │ ├── duplicate_bindings.js │ │ │ │ └── duplicate_bindings.js.snap │ │ │ ├── module-blocks │ │ │ │ ├── non-module-blocks.js │ │ │ │ └── non-module-blocks.js.snap │ │ │ ├── shebang │ │ │ │ ├── shebang.js │ │ │ │ ├── shebang.js.snap │ │ │ │ ├── shebang-newline.js │ │ │ │ └── shebang-newline.js.snap │ │ │ ├── identifier │ │ │ │ └── parentheses │ │ │ │ │ ├── const.js │ │ │ │ │ └── const.js.snap │ │ │ ├── ignore │ │ │ │ ├── semi │ │ │ │ │ ├── asi.js │ │ │ │ │ └── asi.js.snap │ │ │ │ ├── decorator.js │ │ │ │ ├── decorator.js.snap │ │ │ │ ├── issue-9335.js │ │ │ │ ├── issue-9335.js.snap │ │ │ │ ├── class-expression-decorator.js │ │ │ │ ├── class-expression-decorator.js.snap │ │ │ │ └── issue-14404.js.snap │ │ │ ├── sequence-expression │ │ │ │ ├── export-default.js │ │ │ │ ├── export-default.js.snap │ │ │ │ └── ignore.js.snap │ │ │ ├── try │ │ │ │ ├── try.js │ │ │ │ ├── try.js.snap │ │ │ │ ├── empty.js.snap │ │ │ │ └── empty.js │ │ │ ├── es6modules │ │ │ │ ├── export_default_call_expression.js │ │ │ │ ├── export_default_new_expression.js │ │ │ │ ├── export_default_arrow_expression.js │ │ │ │ ├── export_default_call_expression.js.snap │ │ │ │ ├── export_default_class_declaration.js │ │ │ │ ├── export_default_new_expression.js.snap │ │ │ │ ├── export_default_arrow_expression.js.snap │ │ │ │ ├── export_default_class_declaration.js.snap │ │ │ │ ├── export_default_class_expression.js │ │ │ │ ├── export_default_function_declaration.js │ │ │ │ ├── export_default_class_expression.js.snap │ │ │ │ ├── export_default_function_declaration.js.snap │ │ │ │ ├── export_default_function_expression.js │ │ │ │ ├── export_default_function_declaration_named.js │ │ │ │ ├── export_default_function_expression.js.snap │ │ │ │ ├── export_default_function_expression_named.js │ │ │ │ ├── export_default_function_declaration_async.js │ │ │ │ ├── export_default_function_declaration_named.js.snap │ │ │ │ ├── export_default_function_expression_named.js.snap │ │ │ │ └── export_default_function_declaration_async.js.snap │ │ │ ├── import-attributes │ │ │ │ ├── without-from.js │ │ │ │ ├── without-from.js.snap │ │ │ │ ├── bracket-spacing │ │ │ │ │ ├── empty.js │ │ │ │ │ ├── empty.js.snap │ │ │ │ │ ├── dynamic-import.js │ │ │ │ │ ├── static-import.js │ │ │ │ │ ├── dynamic-import.js.snap │ │ │ │ │ ├── static-import.js.snap │ │ │ │ │ ├── re-export.js │ │ │ │ │ └── re-export.js.snap │ │ │ │ ├── non-type.js │ │ │ │ ├── non-type.js.snap │ │ │ │ ├── dynamic-import.js │ │ │ │ ├── static-import.js │ │ │ │ ├── dynamic-import.js.snap │ │ │ │ ├── static-import.js.snap │ │ │ │ ├── multi-types.js │ │ │ │ └── multi-types.js.snap │ │ │ ├── sequence-parentheses │ │ │ │ ├── export-default.js │ │ │ │ └── export-default.js.snap │ │ │ ├── sloppy-mode │ │ │ │ ├── function-declaration-in-if.js │ │ │ │ ├── labeled-function-declaration.js │ │ │ │ ├── function-declaration-in-if.js.snap │ │ │ │ ├── labeled-function-declaration.js.snap │ │ │ │ ├── function-declaration-in-while.js │ │ │ │ ├── function-declaration-in-while.js.snap │ │ │ │ ├── delete-variable.js │ │ │ │ ├── delete-variable.js.snap │ │ │ │ ├── eval-arguments-binding.js │ │ │ │ ├── eval-arguments.js │ │ │ │ ├── eval-arguments-binding.js.snap │ │ │ │ └── eval-arguments.js.snap │ │ │ ├── switch │ │ │ │ ├── empty_switch.js │ │ │ │ └── empty_switch.js.snap │ │ │ ├── comments-closure-typecast │ │ │ │ ├── member.js │ │ │ │ ├── member.js.snap │ │ │ │ ├── binary-expr.js │ │ │ │ ├── binary-expr.js.snap │ │ │ │ ├── superclass.js │ │ │ │ ├── superclass.js.snap │ │ │ │ ├── iife-issue-5850-isolated.js │ │ │ │ └── iife-issue-5850-isolated.js.snap │ │ │ ├── decorator-auto-accessors │ │ │ │ ├── basic.js │ │ │ │ ├── private.js │ │ │ │ ├── basic.js.snap │ │ │ │ ├── computed.js │ │ │ │ ├── private.js.snap │ │ │ │ ├── static.js │ │ │ │ ├── computed.js.snap │ │ │ │ ├── static.js.snap │ │ │ │ ├── not-accessor-method.js │ │ │ │ ├── not-accessor-method.js.snap │ │ │ │ ├── not-accessor-property.js │ │ │ │ ├── static-private.js │ │ │ │ ├── not-accessor-property.js.snap │ │ │ │ ├── static-computed.js │ │ │ │ ├── static-private.js.snap │ │ │ │ ├── static-computed.js.snap │ │ │ │ ├── comments.js │ │ │ │ ├── comments.js.snap │ │ │ │ ├── with-semicolon-1.js │ │ │ │ ├── with-semicolon-1.js.snap │ │ │ │ ├── with-semicolon-2.js │ │ │ │ └── with-semicolon-2.js.snap │ │ │ ├── import-assertions │ │ │ │ ├── without-from.js │ │ │ │ ├── bracket-spacing │ │ │ │ │ ├── empty.js │ │ │ │ │ ├── dynamic-import.js │ │ │ │ │ ├── empty.js.snap │ │ │ │ │ ├── dynamic-import.js.snap │ │ │ │ │ ├── static-import.js │ │ │ │ │ └── re-export.js │ │ │ │ ├── non-type.js │ │ │ │ ├── not-import-assertions.js │ │ │ │ ├── dynamic-import.js │ │ │ │ ├── not-import-assertions.js.snap │ │ │ │ ├── static-import.js │ │ │ │ ├── dynamic-import.js.snap │ │ │ │ ├── without-from.js.snap │ │ │ │ ├── multi-types.js │ │ │ │ ├── non-type.js.snap │ │ │ │ └── static-import.js.snap │ │ │ ├── range │ │ │ │ ├── whitespace.js │ │ │ │ ├── whitespace.js.snap │ │ │ │ ├── directive.js │ │ │ │ ├── directive.js.snap │ │ │ │ ├── try-catch.js │ │ │ │ ├── object-expression.js │ │ │ │ ├── issue-4206-4.js │ │ │ │ ├── object-expression.js.snap │ │ │ │ ├── issue-4206-3.js │ │ │ │ ├── try-catch.js.snap │ │ │ │ ├── issue-4206-1.js │ │ │ │ ├── array.js │ │ │ │ ├── function-body.js │ │ │ │ ├── issue-4206-1.js.snap │ │ │ │ └── issue-4206-2.js │ │ │ ├── template │ │ │ │ ├── arrow.js │ │ │ │ └── arrow.js.snap │ │ │ ├── unary │ │ │ │ ├── object.js │ │ │ │ └── object.js.snap │ │ │ ├── bracket-spacing │ │ │ │ ├── array.js │ │ │ │ ├── array.js.snap │ │ │ │ ├── object.js │ │ │ │ └── object.js.snap │ │ │ ├── decorators │ │ │ │ ├── parens.js │ │ │ │ ├── parens.js.snap │ │ │ │ └── class-expression │ │ │ │ │ ├── arguments.js │ │ │ │ │ └── member-expression.js │ │ │ ├── import-reflection │ │ │ │ ├── import-reflection.js │ │ │ │ ├── valid-module-as-default-binding.mjs │ │ │ │ ├── valid-module-as-default-binding.mjs.snap │ │ │ │ ├── import-reflection.js.snap │ │ │ │ ├── valid-from-as-default-module-binding.mjs │ │ │ │ ├── valid-module-as-default-binding-2.mjs │ │ │ │ ├── comments.js │ │ │ │ ├── valid-from-as-default-module-binding-escaped.mjs │ │ │ │ ├── valid-module-as-default-binding-2.mjs.snap │ │ │ │ ├── valid-default-import.mjs │ │ │ │ └── valid-from-as-default-module-binding.mjs.snap │ │ │ ├── record │ │ │ │ └── syntax.js │ │ │ ├── dynamic-import │ │ │ │ ├── assertions.js │ │ │ │ ├── test.js │ │ │ │ ├── assertions.js.snap │ │ │ │ └── test.js.snap │ │ │ ├── explicit-resource-management │ │ │ │ ├── valid-using-binding-escaped.js │ │ │ │ ├── valid-using-binding-non-bmp.js │ │ │ │ ├── invalid-script-top-level-using-binding.js │ │ │ │ ├── invalid-script-top-level-using-binding.js.snap │ │ │ │ ├── valid-using-as-identifier-in.js │ │ │ │ ├── valid-using-as-identifier-for-await-of.js │ │ │ │ ├── valid-using-as-identifier-in.js.snap │ │ │ │ ├── valid-using-binding-basic.js │ │ │ │ ├── valid-using-binding-escaped.js.snap │ │ │ │ ├── valid-using-binding-non-bmp.js.snap │ │ │ │ ├── valid-using-as-identifier-for-await-of.js.snap │ │ │ │ ├── valid-using-binding-basic.js.snap │ │ │ │ ├── valid-using-as-identifier-expression-statement.js │ │ │ │ ├── valid-await-expr-using-in.js │ │ │ │ ├── valid-module-block-top-level-using-binding.js │ │ │ │ ├── valid-using-as-identifier-for-init.js.snap │ │ │ │ ├── valid-await-expr-using-in.js.snap │ │ │ │ ├── valid-using-as-identifier-computed-member.js │ │ │ │ ├── valid-using-as-identifier-computed-member.js.snap │ │ │ │ ├── valid-using-as-identifier-expression-statement.js.snap │ │ │ │ └── valid-using-as-identifier-for-init.js │ │ │ ├── expression_statement │ │ │ │ ├── no_regression.js │ │ │ │ └── no_regression.js.snap │ │ │ ├── multiparser-comments │ │ │ │ ├── tagged.js │ │ │ │ └── tagged.js.snap │ │ │ ├── quotes │ │ │ │ ├── objects.js │ │ │ │ ├── objects.js.snap │ │ │ │ ├── functions.js │ │ │ │ └── functions.js.snap │ │ │ ├── end-of-line │ │ │ │ ├── example.js │ │ │ │ └── example.js.snap │ │ │ ├── multiparser-css │ │ │ │ ├── url.js │ │ │ │ └── url.js.snap │ │ │ ├── no-semi │ │ │ │ ├── private-field.js │ │ │ │ └── private-field.js.snap │ │ │ ├── assignment-expression │ │ │ │ ├── assignment_expression.js │ │ │ │ └── assignment_expression.js.snap │ │ │ ├── arrows-bind │ │ │ │ ├── arrows-bind.js │ │ │ │ └── arrows-bind.js.snap │ │ │ ├── class-static-block │ │ │ │ ├── with-line-breaks.js.snap │ │ │ │ └── with-line-breaks.js │ │ │ ├── new-expression │ │ │ │ ├── call.js │ │ │ │ └── call.js.snap │ │ │ ├── optional-catch-binding │ │ │ │ └── optional_catch_binding.js.snap │ │ │ ├── v8_intrinsic │ │ │ │ ├── avoid-conflicts-to-pipeline.js │ │ │ │ └── avoid-conflicts-to-pipeline.js.snap │ │ │ ├── class-comment │ │ │ │ ├── misc.js │ │ │ │ └── misc.js.snap │ │ │ ├── destructuring-private-fields │ │ │ │ ├── arrow-params.js │ │ │ │ ├── arrow-params.js.snap │ │ │ │ └── async-arrow-params.js │ │ │ ├── call │ │ │ │ └── first-argument-expansion │ │ │ │ │ └── .jsx.js │ │ │ ├── decorators-export │ │ │ │ ├── after_export.js │ │ │ │ └── before_export.js │ │ │ ├── method-chain │ │ │ │ ├── issue-11298.js │ │ │ │ ├── break-multiple.js │ │ │ │ ├── bracket_0-1.js │ │ │ │ └── break-multiple.js.snap │ │ │ ├── multiparser-html │ │ │ │ └── language-comment │ │ │ │ │ ├── not-language-comment.js │ │ │ │ │ └── not-language-comment.js.snap │ │ │ ├── object-colon-bug │ │ │ │ ├── bug.js │ │ │ │ └── bug.js.snap │ │ │ ├── classes-private-fields │ │ │ │ ├── optional-chaining.js │ │ │ │ └── optional-chaining.js.snap │ │ │ ├── conditional │ │ │ │ └── no-confusing-arrow.js │ │ │ ├── destructuring │ │ │ │ └── issue-5988.js │ │ │ ├── function │ │ │ │ └── issue-10277.js │ │ │ ├── last-argument-expansion │ │ │ │ ├── dangling-comment-in-arrow-function.js │ │ │ │ └── dangling-comment-in-arrow-function.js.snap │ │ │ ├── numeric-separators │ │ │ │ ├── number.js │ │ │ │ └── number.js.snap │ │ │ ├── trailing-comma │ │ │ │ ├── jsx.js.snap │ │ │ │ └── jsx.js │ │ │ ├── yield │ │ │ │ ├── jsx.js │ │ │ │ ├── arrow.js │ │ │ │ └── arrow.js.snap │ │ │ └── assignment │ │ │ │ ├── issue-7091.js │ │ │ │ └── issue-7091.js.snap │ │ ├── jsx │ │ │ ├── escape │ │ │ │ ├── escape.js │ │ │ │ └── escape.js.snap │ │ │ ├── newlines │ │ │ │ ├── windows.js.snap │ │ │ │ └── windows.js │ │ │ ├── jsx │ │ │ │ ├── self-closing.js │ │ │ │ ├── self-closing.js.snap │ │ │ │ ├── ternary.js │ │ │ │ ├── ternary.js.snap │ │ │ │ ├── flow_fix_me.js.snap │ │ │ │ └── regex.js │ │ │ ├── cursor │ │ │ │ ├── in-jsx-text.js │ │ │ │ └── in-jsx-text.js.snap │ │ │ ├── do │ │ │ │ ├── do.js │ │ │ │ └── do.js.snap │ │ │ ├── comments │ │ │ │ ├── like-a-comment-in-jsx-text.js.snap │ │ │ │ └── like-a-comment-in-jsx-text.js │ │ │ ├── tuple │ │ │ │ ├── tuple.js.snap │ │ │ │ └── tuple.js │ │ │ ├── attr-element │ │ │ │ └── attr-element.js │ │ │ └── namespace │ │ │ │ ├── jsx_namespaced_name.js │ │ │ │ └── jsx_namespaced_name.js.snap │ │ └── typescript │ │ │ ├── class │ │ │ ├── dunder.ts │ │ │ ├── dunder.ts.snap │ │ │ ├── quoted-property.ts │ │ │ └── quoted-property.ts.snap │ │ │ ├── compiler │ │ │ ├── downlevelLetConst1.ts │ │ │ ├── downlevelLetConst1.ts.snap │ │ │ ├── ClassDeclaration22.ts.snap │ │ │ ├── ClassDeclaration22.ts │ │ │ ├── errorOnInitializerInInterfaceProperty.ts │ │ │ ├── modifiersOnInterfaceIndexSignature1.ts │ │ │ ├── commentsInterface.ts │ │ │ ├── errorOnInitializerInInterfaceProperty.ts.snap │ │ │ ├── modifiersOnInterfaceIndexSignature1.ts.snap │ │ │ └── commentsInterface.ts.snap │ │ │ ├── arrows │ │ │ ├── type_params.ts │ │ │ ├── type_params.ts.snap │ │ │ ├── arrow_function_expression.ts │ │ │ └── arrow_function_expression.ts.snap │ │ │ ├── as │ │ │ ├── array-pattern.ts │ │ │ ├── array-pattern.ts.snap │ │ │ ├── export_default_as.ts │ │ │ ├── export_default_as.ts.snap │ │ │ ├── return.ts │ │ │ └── return.ts.snap │ │ │ ├── bigint │ │ │ ├── bigint.ts │ │ │ └── bigint.ts.snap │ │ │ ├── cursor │ │ │ ├── identifier-1.ts │ │ │ ├── identifier-2.ts │ │ │ ├── identifier-3.ts │ │ │ ├── identifier-2.ts.snap │ │ │ ├── array-pattern.ts │ │ │ ├── identifier-1.ts.snap │ │ │ ├── identifier-3.ts.snap │ │ │ ├── rest.ts │ │ │ ├── class-property.ts │ │ │ ├── rest.ts.snap │ │ │ ├── array-pattern.ts.snap │ │ │ ├── arrow-function-type.ts │ │ │ ├── class-property.ts.snap │ │ │ ├── function-return-type.ts │ │ │ ├── arrow-function-type.ts.snap │ │ │ ├── method-signature.ts │ │ │ ├── property-signature.ts │ │ │ ├── method-signature.ts.snap │ │ │ ├── property-signature.ts.snap │ │ │ └── function-return-type.ts.snap │ │ │ ├── definite │ │ │ ├── asi.ts │ │ │ └── asi.ts.snap │ │ │ ├── enum │ │ │ ├── multiline.ts.snap │ │ │ └── multiline.ts │ │ │ ├── tsx │ │ │ ├── keyword.tsx │ │ │ ├── keyword.tsx.snap │ │ │ ├── this.tsx │ │ │ └── this.tsx.snap │ │ │ ├── unknown │ │ │ ├── unknown.ts │ │ │ └── unknown.ts.snap │ │ │ ├── module │ │ │ ├── empty.ts │ │ │ ├── empty.ts.snap │ │ │ ├── namespace_function.ts │ │ │ └── namespace_function.ts.snap │ │ │ ├── rest-type │ │ │ ├── simple.ts │ │ │ ├── simple.ts.snap │ │ │ ├── complex.ts │ │ │ └── complex.ts.snap │ │ │ ├── optional-call │ │ │ ├── type-parameters.ts │ │ │ └── type-parameters.ts.snap │ │ │ ├── optional-type │ │ │ ├── simple.ts │ │ │ └── simple.ts.snap │ │ │ ├── rest │ │ │ ├── rest.ts │ │ │ └── rest.ts.snap │ │ │ ├── type-arguments-bit-shift-left-like │ │ │ ├── 1.ts │ │ │ ├── 1.ts.snap │ │ │ ├── 2.ts │ │ │ ├── 2.ts.snap │ │ │ ├── 6.ts │ │ │ ├── 4.ts │ │ │ ├── 6.ts.snap │ │ │ └── 4.ts.snap │ │ │ ├── instantiation-expression │ │ │ ├── new.ts │ │ │ ├── typeof.ts │ │ │ ├── binary-expr.ts │ │ │ ├── new.ts.snap │ │ │ ├── typeof.ts.snap │ │ │ ├── basic.ts │ │ │ ├── binary-expr.ts.snap │ │ │ └── basic.ts.snap │ │ │ ├── interface │ │ │ ├── abstract.ts │ │ │ └── abstract.ts.snap │ │ │ ├── never │ │ │ ├── type-argument.src.ts │ │ │ └── type-argument.src.ts.snap │ │ │ ├── symbol │ │ │ ├── symbol.ts │ │ │ └── symbol.ts.snap │ │ │ ├── method │ │ │ ├── type_literal_optional_method.ts │ │ │ └── type_literal_optional_method.ts.snap │ │ │ ├── conformance │ │ │ ├── types │ │ │ │ ├── constKeyword │ │ │ │ │ ├── constKeyword.ts │ │ │ │ │ └── constKeyword.ts.snap │ │ │ │ ├── enumDeclaration │ │ │ │ │ ├── enumDeclaration.ts │ │ │ │ │ └── enumDeclaration.ts.snap │ │ │ │ ├── never │ │ │ │ │ ├── never.ts │ │ │ │ │ └── never.ts.snap │ │ │ │ ├── abstractKeyword │ │ │ │ │ ├── abstractKeyword.ts │ │ │ │ │ └── abstractKeyword.ts.snap │ │ │ │ ├── nonNullExpression │ │ │ │ │ ├── nonNullExpression.ts │ │ │ │ │ └── nonNullExpression.ts.snap │ │ │ │ ├── symbol │ │ │ │ │ ├── symbol.ts │ │ │ │ │ └── symbol.ts.snap │ │ │ │ ├── tuple │ │ │ │ │ ├── tupleElementTypes3.ts │ │ │ │ │ ├── tupleElementTypes3.ts.snap │ │ │ │ │ ├── tupleElementTypes2.ts │ │ │ │ │ ├── tupleElementTypes4.ts │ │ │ │ │ ├── tupleElementTypes2.ts.snap │ │ │ │ │ ├── tupleElementTypes4.ts.snap │ │ │ │ │ ├── tupleElementTypes1.ts │ │ │ │ │ ├── wideningTuples5.ts │ │ │ │ │ ├── wideningTuples6.ts │ │ │ │ │ ├── tupleElementTypes1.ts.snap │ │ │ │ │ ├── wideningTuples5.ts.snap │ │ │ │ │ └── wideningTuples6.ts.snap │ │ │ │ ├── typeOperator │ │ │ │ │ ├── typeOperator.ts │ │ │ │ │ └── typeOperator.ts.snap │ │ │ │ ├── constructorType │ │ │ │ │ ├── cunstructorType.ts │ │ │ │ │ └── cunstructorType.ts.snap │ │ │ │ ├── moduleDeclaration │ │ │ │ │ ├── kind-detection.ts │ │ │ │ │ └── kind-detection.ts.snap │ │ │ │ ├── undefined │ │ │ │ │ ├── undefined.ts │ │ │ │ │ └── undefined.ts.snap │ │ │ │ ├── variableDeclarator │ │ │ │ │ ├── variableDeclarator.ts │ │ │ │ │ └── variableDeclarator.ts.snap │ │ │ │ ├── lastTypeNode │ │ │ │ │ ├── lastTypeNode.ts │ │ │ │ │ └── lastTypeNode.ts.snap │ │ │ │ ├── functions │ │ │ │ │ ├── functionTypeTypeParameters.ts │ │ │ │ │ ├── TSFunctionTypeNoUnnecessaryParentheses.ts │ │ │ │ │ └── functionTypeTypeParameters.ts.snap │ │ │ │ ├── importEqualsDeclaration │ │ │ │ │ ├── importEqualsDeclaration.ts │ │ │ │ │ └── importEqualsDeclaration.ts.snap │ │ │ │ ├── indexedAccesType │ │ │ │ │ ├── indexedAccesType.ts │ │ │ │ │ └── indexedAccesType.ts.snap │ │ │ │ └── typeReference │ │ │ │ │ ├── typeReference.ts │ │ │ │ │ └── typeReference.ts.snap │ │ │ ├── classes │ │ │ │ ├── classDeclarations │ │ │ │ │ ├── classAbstractKeyword │ │ │ │ │ │ ├── classAbstractWithInterface.ts │ │ │ │ │ │ └── classAbstractWithInterface.ts.snap │ │ │ │ │ ├── classInsideBlock.ts │ │ │ │ │ └── classInsideBlock.ts.snap │ │ │ │ └── abstract.ts │ │ │ ├── internalModules │ │ │ │ └── importDeclarations │ │ │ │ │ ├── exportInterface.ts │ │ │ │ │ └── exportInterface.ts.snap │ │ │ ├── comments │ │ │ │ ├── comments.ts │ │ │ │ └── comments.ts.snap │ │ │ └── parser │ │ │ │ └── ecmascript5 │ │ │ │ └── Statements │ │ │ │ ├── parserForInStatement2.ts │ │ │ │ ├── parserForInStatement2.ts.snap │ │ │ │ ├── parserES5ForOfStatement2.ts │ │ │ │ └── parserES5ForOfStatement21.ts │ │ │ ├── export │ │ │ ├── export-as-ns.ts │ │ │ ├── export-as-ns.ts.snap │ │ │ ├── comment.ts │ │ │ ├── default.ts │ │ │ ├── comment.ts.snap │ │ │ ├── default.ts.snap │ │ │ ├── export-type-star-from.ts │ │ │ └── export-type-star-from.ts.snap │ │ │ ├── intrinsic │ │ │ ├── intrinsic.ts │ │ │ └── intrinsic.ts.snap │ │ │ ├── union │ │ │ └── consistent-with-flow │ │ │ │ ├── comment.ts.snap │ │ │ │ └── comment.ts │ │ │ ├── cast │ │ │ ├── assert-and-assign.ts │ │ │ └── assert-and-assign.ts.snap │ │ │ ├── custom │ │ │ ├── modifiers │ │ │ │ ├── question.ts │ │ │ │ ├── question.ts.snap │ │ │ │ ├── readonly.ts │ │ │ │ └── readonly.ts.snap │ │ │ └── module │ │ │ │ ├── moduleNamespace.ts │ │ │ │ ├── moduleNamespace.ts.snap │ │ │ │ ├── global.ts.snap │ │ │ │ ├── global.ts │ │ │ │ └── nestedNamespace.ts.snap │ │ │ ├── declare │ │ │ ├── declare_enum.ts │ │ │ ├── declare_enum.ts.snap │ │ │ ├── declare-get-set-field.ts │ │ │ ├── declare_module.ts │ │ │ ├── declare_module.ts.snap │ │ │ ├── declare-get-set-field.ts.snap │ │ │ ├── declare_namespace.ts │ │ │ └── declare_namespace.ts.snap │ │ │ ├── namespace │ │ │ ├── invalid-await.ts │ │ │ └── invalid-await.ts.snap │ │ │ ├── readonly │ │ │ ├── readonly.ts │ │ │ ├── readonly.ts.snap │ │ │ └── array.ts │ │ │ ├── chain-expression │ │ │ ├── test.ts.snap │ │ │ └── test.ts │ │ │ ├── decorators-ts │ │ │ ├── multiple.ts │ │ │ └── multiple.ts.snap │ │ │ ├── index-signature │ │ │ ├── static.ts │ │ │ └── static.ts.snap │ │ │ ├── intersection │ │ │ └── consistent-with-flow │ │ │ │ ├── comment.ts.snap │ │ │ │ └── comment.ts │ │ │ ├── export-default │ │ │ ├── function_as.ts │ │ │ └── function_as.ts.snap │ │ │ ├── interface2 │ │ │ ├── module.ts │ │ │ ├── comments-declare.ts │ │ │ └── module.ts.snap │ │ │ ├── unique-symbol │ │ │ ├── unique-symbol.ts │ │ │ └── unique-symbol.ts.snap │ │ │ ├── abstract-class │ │ │ ├── export-default.ts │ │ │ └── export-default.ts.snap │ │ │ ├── abstract-property │ │ │ ├── semicolon.ts │ │ │ └── semicolon.ts.snap │ │ │ ├── mapped-type │ │ │ ├── intersection.ts │ │ │ └── intersection.ts.snap │ │ │ ├── prettier-ignore │ │ │ ├── issue-14238.ts.snap │ │ │ ├── issue-14238.ts │ │ │ └── prettier-ignore-parenthesized-type.ts.snap │ │ │ ├── catch-clause │ │ │ ├── type-annotation.ts │ │ │ └── type-annotation.ts.snap │ │ │ ├── comments │ │ │ ├── jsx.ts.snap │ │ │ ├── jsx.tsx.snap │ │ │ └── types.ts │ │ │ ├── satisfies-operators │ │ │ ├── export-default-as.ts │ │ │ └── export-default-as.ts.snap │ │ │ ├── comments-2 │ │ │ └── dangling.ts │ │ │ ├── destructuring │ │ │ └── destructuring.ts │ │ │ ├── generic │ │ │ └── object-method.ts │ │ │ └── type-alias │ │ │ └── issue-9874.ts │ │ └── ts │ │ ├── module │ │ ├── qualified_module_name.ts │ │ ├── qualified_module_name.ts.snap │ │ ├── module_declaration.ts.snap │ │ ├── module_declaration.ts │ │ └── external_module_reference.ts │ │ ├── statement │ │ ├── empty_block.ts │ │ └── empty_block.ts.snap │ │ ├── type │ │ ├── qualified_name.ts │ │ ├── qualified_name.ts.snap │ │ └── mapped_type.ts │ │ ├── parameters │ │ ├── parameters.ts.snap │ │ └── parameters.ts │ │ ├── binding │ │ ├── definite_variable.ts │ │ └── definite_variable.ts.snap │ │ ├── expression │ │ ├── non_null_expression.ts │ │ ├── non_null_expression.ts.snap │ │ ├── as_expression.ts.snap │ │ └── as_expression.ts │ │ ├── class │ │ ├── accessor.ts │ │ └── accessor.ts.snap │ │ ├── declaration │ │ └── global_declaration.ts.snap │ │ ├── declare.ts.snap │ │ ├── parenthesis.ts │ │ ├── suppressions.ts.snap │ │ ├── declare.ts │ │ ├── suppressions.ts │ │ └── parenthesis.ts.snap ├── json_fmt │ ├── LICENSE │ └── extra │ │ └── .npmignore ├── web_fmt │ ├── LICENSE │ ├── extra │ │ └── .npmignore │ └── test_data │ │ ├── app.tsx │ │ └── app.tsx.snap └── oxc_fmt │ └── extra │ └── .npmignore ├── rust-toolchain.toml ├── .vscode └── settings.json └── .taplo.toml /.node-version: -------------------------------------------------------------------------------- 1 | 24.11.1 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | .DS_Store -------------------------------------------------------------------------------- /crates/biome_fmt/LICENSE: -------------------------------------------------------------------------------- 1 | ../../LICENSE -------------------------------------------------------------------------------- /crates/json_fmt/LICENSE: -------------------------------------------------------------------------------- 1 | ../../LICENSE -------------------------------------------------------------------------------- /crates/web_fmt/LICENSE: -------------------------------------------------------------------------------- 1 | ../../LICENSE -------------------------------------------------------------------------------- /crates/biome_fmt/extra/.npmignore: -------------------------------------------------------------------------------- 1 | *.tgz 2 | jsr.jsonc -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/jsx/smoke.jsx: -------------------------------------------------------------------------------- 1 | "foo"; -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/tsx/smoke.tsx: -------------------------------------------------------------------------------- 1 | "foo" -------------------------------------------------------------------------------- /crates/json_fmt/extra/.npmignore: -------------------------------------------------------------------------------- 1 | *.tgz 2 | jsr.jsonc -------------------------------------------------------------------------------- /crates/web_fmt/extra/.npmignore: -------------------------------------------------------------------------------- 1 | *.tgz 2 | jsr.jsonc -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/ident.js: -------------------------------------------------------------------------------- 1 | x 2 | -------------------------------------------------------------------------------- /crates/oxc_fmt/extra/.npmignore: -------------------------------------------------------------------------------- 1 | *.tgz 2 | jsr.jsonc 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/ident.js.snap: -------------------------------------------------------------------------------- 1 | x; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/jsx/smoke.jsx.snap: -------------------------------------------------------------------------------- 1 | "foo"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/tsx/smoke.tsx.snap: -------------------------------------------------------------------------------- 1 | "foo"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/jsx/fragment.jsx: -------------------------------------------------------------------------------- 1 | <> 2 | <> 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/regex/d-flag.js: -------------------------------------------------------------------------------- 1 | /./d; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/regex/v-flag.js: -------------------------------------------------------------------------------- 1 | /a/v; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrows/semi/semi.js: -------------------------------------------------------------------------------- 1 | a => {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/regex/d-flag.js.snap: -------------------------------------------------------------------------------- 1 | /./d; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/regex/v-flag.js.snap: -------------------------------------------------------------------------------- 1 | /a/v; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/expression/this_expression.js: -------------------------------------------------------------------------------- 1 | this 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/no-semi/semicolons-asi.js: -------------------------------------------------------------------------------- 1 | [1, 2]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/jsx/fragment.jsx.snap: -------------------------------------------------------------------------------- 1 | <> 2 | <> 3 | 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/directives/last-line-0.js: -------------------------------------------------------------------------------- 1 | 'use strict'; -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/label/empty_label.js: -------------------------------------------------------------------------------- 1 | a:; 2 | b 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/non-strict/octal-number.js: -------------------------------------------------------------------------------- 1 | 0777 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/objects/method.js: -------------------------------------------------------------------------------- 1 | a = { f() {} } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/regex/test.js: -------------------------------------------------------------------------------- 1 | /[/]\/\u0aBc/mgi; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/escape/escape.js: -------------------------------------------------------------------------------- 1 |
<
2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/expression/this_expression.js.snap: -------------------------------------------------------------------------------- 1 | this; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/no-semi/semicolons-asi.js.snap: -------------------------------------------------------------------------------- 1 | [1, 2]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/statement/statement.js: -------------------------------------------------------------------------------- 1 | ; 2 | debugger 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/statement/statement.js.snap: -------------------------------------------------------------------------------- 1 | debugger; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrows/semi/semi.js.snap: -------------------------------------------------------------------------------- 1 | (a) => {}; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/regex-v-flag.js: -------------------------------------------------------------------------------- 1 | /a/v; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/call.js: -------------------------------------------------------------------------------- 1 | (class {})(class {}); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-10.js.snap: -------------------------------------------------------------------------------- 1 | const y = 5<>; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-2.js.snap: -------------------------------------------------------------------------------- 1 | foo<>(bar); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-8.js: -------------------------------------------------------------------------------- 1 | func<|>tion banana(){} -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-emoji.js: -------------------------------------------------------------------------------- 1 | "😀😀😀😀<|>" 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/directives/last-line-1.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/for/var.js: -------------------------------------------------------------------------------- 1 | for (a in b) var c = {}; []; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/label/empty_label.js.snap: -------------------------------------------------------------------------------- 1 | a:; 2 | b; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/non-strict/octal-number.js.snap: -------------------------------------------------------------------------------- 1 | 0777; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/objects/method.js.snap: -------------------------------------------------------------------------------- 1 | a = { f() {} }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/regex/test.js.snap: -------------------------------------------------------------------------------- 1 | /[/]\/\u0aBc/gim; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/tuple/tuple-trailing-comma.js: -------------------------------------------------------------------------------- 1 | #[1,] 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/escape/escape.js.snap: -------------------------------------------------------------------------------- 1 |
<
; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/class/dunder.ts: -------------------------------------------------------------------------------- 1 | class F<__T> {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/compiler/downlevelLetConst1.ts: -------------------------------------------------------------------------------- 1 | const -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/with.js: -------------------------------------------------------------------------------- 1 | with ( b) 2 | 3 | { 4 | 5 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrows/block_like.js: -------------------------------------------------------------------------------- 1 | a = () => ({} = this); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/regex-v-flag.js.snap: -------------------------------------------------------------------------------- 1 | /a/v; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/call.js.snap: -------------------------------------------------------------------------------- 1 | (class {})(class {}); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/top-level-super/example.js: -------------------------------------------------------------------------------- 1 | super(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments/first-line.js: -------------------------------------------------------------------------------- 1 | a // comment 2 | b 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-2.js: -------------------------------------------------------------------------------- 1 | 2 | foo <|> (bar); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-emoji.js.snap: -------------------------------------------------------------------------------- 1 | "😀😀😀😀<|>"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/directives/last-line-0.js.snap: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/directives/last-line-1.js.snap: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/directives/last-line-2.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/directives/last-line-2.js.snap: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/directives/no-newline.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | a 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/in/arrow-function-invalid.js: -------------------------------------------------------------------------------- 1 | () => [] in x 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/newline/backslash_2028.js: -------------------------------------------------------------------------------- 1 | 1;/*a*///b
/*c*/2 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/newline/backslash_2029.js: -------------------------------------------------------------------------------- 1 | 1;/*a*///b
/*c*/2 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/regex/multiple-flags.js: -------------------------------------------------------------------------------- 1 | /.*/ms; 2 | /.*/my; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/tuple/tuple-trailing-comma.js.snap: -------------------------------------------------------------------------------- 1 | #[1,] 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/newlines/windows.js.snap: -------------------------------------------------------------------------------- 1 |
Text
; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/arrows/type_params.ts: -------------------------------------------------------------------------------- 1 | (a) => { } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/as/array-pattern.ts: -------------------------------------------------------------------------------- 1 | [x as any] = x; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/bigint/bigint.ts: -------------------------------------------------------------------------------- 1 | type T00 = bigint; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/class/dunder.ts.snap: -------------------------------------------------------------------------------- 1 | class F<__T> {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/identifier-1.ts: -------------------------------------------------------------------------------- 1 | let i<|>: T; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/identifier-2.ts: -------------------------------------------------------------------------------- 1 | let i:<|> T; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/identifier-3.ts: -------------------------------------------------------------------------------- 1 | let i<|> : T; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/module/qualified_module_name.ts: -------------------------------------------------------------------------------- 1 | module a . b . c { } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/module/qualified_module_name.ts.snap: -------------------------------------------------------------------------------- 1 | module a.b.c {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/statement/empty_block.ts: -------------------------------------------------------------------------------- 1 | interface X {} 2 | type X = {}; -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/type/qualified_name.ts: -------------------------------------------------------------------------------- 1 | type QualifiedType = A . B . C -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/export/expression_clause.js: -------------------------------------------------------------------------------- 1 | export default (1 - 43); -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/import/namespace_import.js: -------------------------------------------------------------------------------- 1 | import * as all from "all" -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/with.js.snap: -------------------------------------------------------------------------------- 1 | with ( b) 2 | 3 | { 4 | 5 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrows/block_like.js.snap: -------------------------------------------------------------------------------- 1 | a = () => ({} = this); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/ternary.js: -------------------------------------------------------------------------------- 1 | if (1) (class {}) ? 1 : 2; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/top-level-super/example.js.snap: -------------------------------------------------------------------------------- 1 | super(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments/first-line.js.snap: -------------------------------------------------------------------------------- 1 | a; // comment 2 | b; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-3.js.snap: -------------------------------------------------------------------------------- 1 | <|> 2 | 3 | const y = 5; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-5.js: -------------------------------------------------------------------------------- 1 | const /* h<|>i */ y = 5 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-5.js.snap: -------------------------------------------------------------------------------- 1 | const /* h<|>i */ y = 5; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-6.js.snap: -------------------------------------------------------------------------------- 1 | const y /* h<|>i */ = 5; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export/undefined.js: -------------------------------------------------------------------------------- 1 | export { undefinedExport }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/for/var.js.snap: -------------------------------------------------------------------------------- 1 | for (a in b) var c = {}; 2 | []; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/in/arrow-function-invalid.js.snap: -------------------------------------------------------------------------------- 1 | () => [] in x; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/regex/multiple-flags.js.snap: -------------------------------------------------------------------------------- 1 | /.*/ms; 2 | /.*/my; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/top-level-await/example.js: -------------------------------------------------------------------------------- 1 | await something(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/unicode/keys.js: -------------------------------------------------------------------------------- 1 | ({'この事はつもり素晴らしいことさ': '35jL9V'}) 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/with/indent.js: -------------------------------------------------------------------------------- 1 | with (0) {} 2 | 3 | with (0) 1; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/jsx/self-closing.js: -------------------------------------------------------------------------------- 1 | ; 2 | ; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/newlines/windows.js: -------------------------------------------------------------------------------- 1 |
2 | Text 3 |
4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/arrows/type_params.ts.snap: -------------------------------------------------------------------------------- 1 | (a) => { } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/as/array-pattern.ts.snap: -------------------------------------------------------------------------------- 1 | [x as any] = x; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/bigint/bigint.ts.snap: -------------------------------------------------------------------------------- 1 | type T00 = bigint; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/compiler/downlevelLetConst1.ts.snap: -------------------------------------------------------------------------------- 1 | const 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/identifier-2.ts.snap: -------------------------------------------------------------------------------- 1 | let i: <|> T; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/definite/asi.ts: -------------------------------------------------------------------------------- 1 | let x 2 | !function() {}; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/enum/multiline.ts.snap: -------------------------------------------------------------------------------- 1 | declare enum E {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/tsx/keyword.tsx: -------------------------------------------------------------------------------- 1 | ; 2 | 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/unknown/unknown.ts: -------------------------------------------------------------------------------- 1 | type T00 = unknown; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/parameters/parameters.ts.snap: -------------------------------------------------------------------------------- 1 | function a(this: string) {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/type/qualified_name.ts.snap: -------------------------------------------------------------------------------- 1 | type QualifiedType = A.B.C; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/export/expression_clause.js.snap: -------------------------------------------------------------------------------- 1 | export default 1 - 43; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrays/last.js: -------------------------------------------------------------------------------- 1 | [,]; 2 | [,,]; 3 | [,,1,]; 4 | [,,1,1]; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/async/exponentiation.js: -------------------------------------------------------------------------------- 1 | async () => (await 5) ** 6; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/binary-expressions/like-regexp.js: -------------------------------------------------------------------------------- 1 | 0 ? a : { b : 1 }/2; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/member.js: -------------------------------------------------------------------------------- 1 | (class {})[1]; 2 | (class {}).a; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/new.js: -------------------------------------------------------------------------------- 1 | new class {}; 2 | new Ctor(class {}); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/ternary.js.snap: -------------------------------------------------------------------------------- 1 | if (1) (class {}) ? 1 : 2; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments/html-like/comment.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-1.js: -------------------------------------------------------------------------------- 1 | (function(){return <|>15})() 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-6.js: -------------------------------------------------------------------------------- 1 | const y /* h<|>i */ = 5 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-9.js.snap: -------------------------------------------------------------------------------- 1 | thisWillBeFormatted<>(2, 3); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/directives/no-newline.js.snap: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | a; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-star/export-star.js: -------------------------------------------------------------------------------- 1 | export * from "mod"; 2 | 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-star/export-star.js.snap: -------------------------------------------------------------------------------- 1 | export * from "mod"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export/empty.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | export {} from "."; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export/undefined.js.snap: -------------------------------------------------------------------------------- 1 | export { undefinedExport }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/label/block-statement-and-regexp.js: -------------------------------------------------------------------------------- 1 | a : { b : 1 }/2/; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/multiparser-markdown/single-line.js: -------------------------------------------------------------------------------- 1 | markdown`# hello` 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/new-target/outside-functions.js: -------------------------------------------------------------------------------- 1 | const x = new.target; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/top-level-await/example.js.snap: -------------------------------------------------------------------------------- 1 | await something(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/tuple/syntax.js: -------------------------------------------------------------------------------- 1 | #[] 2 | #[1, 2] 3 | #[1, 2, #{ a: 3 }] 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/unicode/keys.js.snap: -------------------------------------------------------------------------------- 1 | ({ この事はつもり素晴らしいことさ: "35jL9V" }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/with/indent.js.snap: -------------------------------------------------------------------------------- 1 | with (0) {} 2 | 3 | with (0) 1; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/jsx/self-closing.js.snap: -------------------------------------------------------------------------------- 1 | ; 2 | ; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/array-pattern.ts: -------------------------------------------------------------------------------- 1 | let []<|>: T = []; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/enum/multiline.ts: -------------------------------------------------------------------------------- 1 | declare enum 2 | E 3 | {} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/module/empty.ts: -------------------------------------------------------------------------------- 1 | declare module 'autoprefixer'; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/rest-type/simple.ts: -------------------------------------------------------------------------------- 1 | type X = [...number[]]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/tsx/keyword.tsx.snap: -------------------------------------------------------------------------------- 1 | ; 2 | ; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/unknown/unknown.ts.snap: -------------------------------------------------------------------------------- 1 | type T00 = unknown; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/binding/definite_variable.ts: -------------------------------------------------------------------------------- 1 | let definiteVariable!: TypeName; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/expression/non_null_expression.ts: -------------------------------------------------------------------------------- 1 | let a: any; 2 | let b = a !; -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/parameters/parameters.ts: -------------------------------------------------------------------------------- 1 | function a( 2 | this: string 3 | ) {} -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/statement/empty_block.ts.snap: -------------------------------------------------------------------------------- 1 | interface X {} 2 | type X = {}; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/import/namespace_import.js.snap: -------------------------------------------------------------------------------- 1 | import * as all from "all"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/statement/throw.js: -------------------------------------------------------------------------------- 1 | throw "Something"; 2 | 3 | throw false 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/script/with.js: -------------------------------------------------------------------------------- 1 | with ( b) 2 | 3 | { 4 | 5 5 | } 6 | 7 | with({}) {} -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/array-spread/multiple.js: -------------------------------------------------------------------------------- 1 | [...a, ...b,]; 2 | [...a, ...b]; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/async/exponentiation.js.snap: -------------------------------------------------------------------------------- 1 | async () => (await 5) ** 6; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/member.js.snap: -------------------------------------------------------------------------------- 1 | (class {})[1]; 2 | (class {}).a; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/computed-props/classes.js: -------------------------------------------------------------------------------- 1 | class c { 2 | ["i"]() {} 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-0.js: -------------------------------------------------------------------------------- 1 | (function() {return <|> 15})() 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-3.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | <|> 4 | 5 | const y = 5 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-7.js: -------------------------------------------------------------------------------- 1 | const y = 5 2 | <|> 3 | 4 | const z = 9 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-9.js: -------------------------------------------------------------------------------- 1 | thisWillBeFormatted <|> (2 ,3, ) -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/file-start-with-comment-1.js: -------------------------------------------------------------------------------- 1 | // hi<|> lol 2 | haha() 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/file-start-with-comment-2.js: -------------------------------------------------------------------------------- 1 | // hi lol 2 | haha()<|> 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/empty-statement/no-newline.js.snap: -------------------------------------------------------------------------------- 1 | if (a) { 2 | b; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-default/body.js: -------------------------------------------------------------------------------- 1 | export default (class {}[1] = 1); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export/empty.js.snap: -------------------------------------------------------------------------------- 1 | export {}; 2 | export {} from "."; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import/empty-import.js: -------------------------------------------------------------------------------- 1 | import { } from '@types/googlemaps'; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import/multiple_standalones.js: -------------------------------------------------------------------------------- 1 | import a, * as b from 'a'; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/invalid-code/duplicate_bindings.js: -------------------------------------------------------------------------------- 1 | class A{} class A{} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/module-blocks/non-module-blocks.js: -------------------------------------------------------------------------------- 1 | const m = module 2 | {} 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/multiparser-markdown/single-line.js.snap: -------------------------------------------------------------------------------- 1 | markdown`# hello`; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/new-target/outside-functions.js.snap: -------------------------------------------------------------------------------- 1 | const x = new.target; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/newline/backslash_2028.js.snap: -------------------------------------------------------------------------------- 1 | 1; /*a*/ //b 2 | /*c*/ 2; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/newline/backslash_2029.js.snap: -------------------------------------------------------------------------------- 1 | 1; /*a*/ //b 2 | /*c*/ 2; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/non-strict/argument-name-clash.js: -------------------------------------------------------------------------------- 1 | function f(a,a){return a} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/shebang/shebang.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | function a() {} 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/cursor/in-jsx-text.js: -------------------------------------------------------------------------------- 1 | <>a<|> 2 |
hi
3 | 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/do/do.js: -------------------------------------------------------------------------------- 1 |
2 | {do { 3 | 1 4 | }} 5 |
6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/arrows/arrow_function_expression.ts: -------------------------------------------------------------------------------- 1 | a = (b?) => c; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/identifier-1.ts.snap: -------------------------------------------------------------------------------- 1 | let i; 2 | <|> 3 | : T 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/identifier-3.ts.snap: -------------------------------------------------------------------------------- 1 | let i; 2 | <|> 3 | : T 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/rest.ts: -------------------------------------------------------------------------------- 1 | function foo(...args<|>: any) { } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/definite/asi.ts.snap: -------------------------------------------------------------------------------- 1 | let x; 2 | !function () {}; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/module/empty.ts.snap: -------------------------------------------------------------------------------- 1 | declare module "autoprefixer"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/optional-call/type-parameters.ts: -------------------------------------------------------------------------------- 1 | foo?.foo(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/optional-type/simple.ts: -------------------------------------------------------------------------------- 1 | type X = [number, string?]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/rest-type/simple.ts.snap: -------------------------------------------------------------------------------- 1 | type X = [...number[]]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/rest/rest.ts: -------------------------------------------------------------------------------- 1 | function test([first, ...rest]) {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/type-arguments-bit-shift-left-like/1.ts: -------------------------------------------------------------------------------- 1 | f<<(x) 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/binding/definite_variable.ts.snap: -------------------------------------------------------------------------------- 1 | let definiteVariable!: TypeName; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/expression/non_null_expression.ts.snap: -------------------------------------------------------------------------------- 1 | let a: any; 2 | let b = a!; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/decorators/export_default_1.js: -------------------------------------------------------------------------------- 1 | @dec export default class Foo {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/decorators/export_default_2.js: -------------------------------------------------------------------------------- 1 | export default @dec class Foo {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/expression/computed-member-expression.js: -------------------------------------------------------------------------------- 1 | a["test"][5 + 5][call()]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/statement/throw.js.snap: -------------------------------------------------------------------------------- 1 | throw "Something"; 2 | 3 | throw false; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/array-spread/multiple.js.snap: -------------------------------------------------------------------------------- 1 | [...a, ...b]; 2 | [...a, ...b]; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrays/last.js.snap: -------------------------------------------------------------------------------- 1 | [,]; 2 | [, ,]; 3 | [, , 1]; 4 | [, , 1, 1]; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/record-tuple-tuple.js: -------------------------------------------------------------------------------- 1 | const tuple1 = #[1, 2, 3]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/binary-expressions/like-regexp.js.snap: -------------------------------------------------------------------------------- 1 | 0 ? a : { b: 1 } / 2; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/new.js.snap: -------------------------------------------------------------------------------- 1 | new (class {})(); 2 | new Ctor(class {}); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments/html-like/comment.js.snap: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/computed-props/classes.js.snap: -------------------------------------------------------------------------------- 1 | class c { 2 | ["i"]() {} 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/comments-3.js: -------------------------------------------------------------------------------- 1 | /<|>/ howdy 2 | // hi lol 3 | const y = 5 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-10.js: -------------------------------------------------------------------------------- 1 | const y = 5 2 | 3 | 4 | 5 | 6 | <|> 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-4.js.snap: -------------------------------------------------------------------------------- 1 | const y = 5<>; 2 | 3 | const z = 9; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-7.js.snap: -------------------------------------------------------------------------------- 1 | const y = 5<>; 2 | 3 | const z = 9; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-8.js.snap: -------------------------------------------------------------------------------- 1 | func<|>tion 2 | banana(); 3 | { 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/file-start-with-comment-2.js.snap: -------------------------------------------------------------------------------- 1 | // hi lol 2 | haha()<>; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-default/body.js.snap: -------------------------------------------------------------------------------- 1 | export default (class {}[1] = 1); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-default/iife.js: -------------------------------------------------------------------------------- 1 | export default (function foo() {})(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-star/export-star-as.js: -------------------------------------------------------------------------------- 1 | export * as ns from "mod"; 2 | 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-star/export-star-as.js.snap: -------------------------------------------------------------------------------- 1 | export * as ns from "mod"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/identifier/parentheses/const.js: -------------------------------------------------------------------------------- 1 | const [a = ((let)[0] = 1)] = 2; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/ignore/semi/asi.js: -------------------------------------------------------------------------------- 1 | foo; 2 | // prettier-ignore 3 | [1].map(); 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import/empty-import.js.snap: -------------------------------------------------------------------------------- 1 | import {} from "@types/googlemaps"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import/multiple_standalones.js.snap: -------------------------------------------------------------------------------- 1 | import a, * as b from "a"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sequence-expression/export-default.js: -------------------------------------------------------------------------------- 1 | export default (1, 2 | 2); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/shebang/shebang.js.snap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | function a() {} 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/top-level-await/in-expression.js.snap: -------------------------------------------------------------------------------- 1 | call(await something()); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/try/try.js: -------------------------------------------------------------------------------- 1 | try 2 | /* missing comment */ 3 | {;} 4 | finally {} 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/cursor/in-jsx-text.js.snap: -------------------------------------------------------------------------------- 1 | <>a<|> 2 |
hi
3 | 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/do/do.js.snap: -------------------------------------------------------------------------------- 1 |
2 | {do { 3 | 1 4 | }} 5 |
6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/arrows/arrow_function_expression.ts.snap: -------------------------------------------------------------------------------- 1 | a = (b?) => c; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/class-property.ts: -------------------------------------------------------------------------------- 1 | class A { 2 | foo<|>: A 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/rest.ts.snap: -------------------------------------------------------------------------------- 1 | function foo(...args<|>: any) { } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/instantiation-expression/new.ts: -------------------------------------------------------------------------------- 1 | // new 2 | new A; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/instantiation-expression/typeof.ts: -------------------------------------------------------------------------------- 1 | let x: typeof y.z; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/interface/abstract.ts: -------------------------------------------------------------------------------- 1 | abstract interface I { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/interface/abstract.ts.snap: -------------------------------------------------------------------------------- 1 | abstract; 2 | interface I {} 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/never/type-argument.src.ts: -------------------------------------------------------------------------------- 1 | Observable.empty(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/optional-call/type-parameters.ts.snap: -------------------------------------------------------------------------------- 1 | foo?.foo(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/optional-type/simple.ts.snap: -------------------------------------------------------------------------------- 1 | type X = [number, string?]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/rest/rest.ts.snap: -------------------------------------------------------------------------------- 1 | function test([first, ...rest]) {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/type-arguments-bit-shift-left-like/1.ts.snap: -------------------------------------------------------------------------------- 1 | f<<(x) 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/expression/as_expression.ts.snap: -------------------------------------------------------------------------------- 1 | let a: any; 2 | let b = a as string; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/assignment/array-assignment-holes.js: -------------------------------------------------------------------------------- 1 | let a, b; 2 | [a,/*empty*/,] = b; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/decorators/export_default_3.js: -------------------------------------------------------------------------------- 1 | @dec1 export default @dec2 class Foo {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/expression/computed-member-expression.js.snap: -------------------------------------------------------------------------------- 1 | a["test"][5 + 5][call()]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/expression/pre_update_expression.js: -------------------------------------------------------------------------------- 1 | ++y 2 | --y 3 | x = ++y 4 | x = --y 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/script/with.js.snap: -------------------------------------------------------------------------------- 1 | with ( b) 2 | 3 | { 4 | 5 5 | } 6 | 7 | with({}) {} 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrays/holes-in-args.js.snap: -------------------------------------------------------------------------------- 1 | new Test().test().test([, 0]).test(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrows/newline-before-arrow/newline-before-arrow.js: -------------------------------------------------------------------------------- 1 | async x 2 | => x 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/regexp-modifiers.js: -------------------------------------------------------------------------------- 1 | const re = /^(?i:[a-z])[a-z]$/; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/comments-2.js: -------------------------------------------------------------------------------- 1 | <|> 2 | // howdy 3 | // hi lol 4 | const y = 5 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/file-start-with-comment-1.js.snap: -------------------------------------------------------------------------------- 1 | // hi<|> lol 2 | haha(); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_call_expression.js: -------------------------------------------------------------------------------- 1 | export default foo() 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_new_expression.js: -------------------------------------------------------------------------------- 1 | export default new Foo(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-default/iife.js.snap: -------------------------------------------------------------------------------- 1 | export default (function foo() {})(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-star/export-star-as-default.js: -------------------------------------------------------------------------------- 1 | export * as default from 'foo' 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-star/export-star-as-string.js: -------------------------------------------------------------------------------- 1 | export * as 'foo' from 'foo' 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-star/export-star-as-string2.js: -------------------------------------------------------------------------------- 1 | export * as "foo" from 'foo' 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/identifier/parentheses/const.js.snap: -------------------------------------------------------------------------------- 1 | const [a = ((let)[0] = 1)] = 2; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/ignore/decorator.js: -------------------------------------------------------------------------------- 1 | // prettier-ignore 2 | @decorator 3 | class A {} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/ignore/semi/asi.js.snap: -------------------------------------------------------------------------------- 1 | foo; 2 | // prettier-ignore 3 | [1].map(); 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/without-from.js: -------------------------------------------------------------------------------- 1 | import "foo" with { type: "json" } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/invalid-code/duplicate_bindings.js.snap: -------------------------------------------------------------------------------- 1 | class A {} 2 | class A {} 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/module-blocks/non-module-blocks.js.snap: -------------------------------------------------------------------------------- 1 | const m = module; 2 | { 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sequence-expression/export-default.js.snap: -------------------------------------------------------------------------------- 1 | export default (1, 2); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sequence-parentheses/export-default.js: -------------------------------------------------------------------------------- 1 | export default (1, 2 | 2); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sequence-parentheses/export-default.js.snap: -------------------------------------------------------------------------------- 1 | export default (1, 2); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sloppy-mode/function-declaration-in-if.js: -------------------------------------------------------------------------------- 1 | if (false) function foo(){} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sloppy-mode/labeled-function-declaration.js: -------------------------------------------------------------------------------- 1 | foo: function bar() {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/switch/empty_switch.js: -------------------------------------------------------------------------------- 1 | switch (1) { default:; } 2 | switch (1) {} 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/top-level-await/in-expression.js: -------------------------------------------------------------------------------- 1 | call( 2 | await something() 3 | ) 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/jsx/ternary.js: -------------------------------------------------------------------------------- 1 | a == 3 ? (a =

123

) : (a =

abc

); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/array-pattern.ts.snap: -------------------------------------------------------------------------------- 1 | let []; 2 | <|> 3 | : T = [] 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/arrow-function-type.ts: -------------------------------------------------------------------------------- 1 | type foo = () <|>=> boolean; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/class-property.ts.snap: -------------------------------------------------------------------------------- 1 | class A { 2 | foo<|>: A 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/function-return-type.ts: -------------------------------------------------------------------------------- 1 | function a()<|>: boolean {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/instantiation-expression/binary-expr.ts: -------------------------------------------------------------------------------- 1 | new A < B > 2 | C 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/instantiation-expression/new.ts.snap: -------------------------------------------------------------------------------- 1 | // new 2 | new A(); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/instantiation-expression/typeof.ts.snap: -------------------------------------------------------------------------------- 1 | let x: typeof y.z; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/never/type-argument.src.ts.snap: -------------------------------------------------------------------------------- 1 | Observable.empty(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/symbol/symbol.ts: -------------------------------------------------------------------------------- 1 | function test(abc: Map) {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/expression/as_expression.ts: -------------------------------------------------------------------------------- 1 | 2 | let a: any; 3 | let b = 4 | a as string; -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/decorators/export_default_1.js.snap: -------------------------------------------------------------------------------- 1 | @dec 2 | export default class Foo {} 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/decorators/export_default_2.js.snap: -------------------------------------------------------------------------------- 1 | export default 2 | @dec 3 | class Foo {} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/expression/post_update_expression.js: -------------------------------------------------------------------------------- 1 | y++ 2 | y-- 3 | x = y++ 4 | x = y-- 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/interpreter.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | console.log(1) 3 | 4 | console.log(1) -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/interpreter_with_empty_line.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 4 | console.log(1) -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/jsx/comments.jsx: -------------------------------------------------------------------------------- 1 | ; 3 | 4 | ; -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/import-reflection.js: -------------------------------------------------------------------------------- 1 | import module foo from "./module.wasm"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/record-tuple-tuple.js.snap: -------------------------------------------------------------------------------- 1 | const tuple1 = #; 2 | [1, 2, 3]; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/regexp-modifiers.js.snap: -------------------------------------------------------------------------------- 1 | const re = /^(?i:[a-z])[a-z]$/; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments-closure-typecast/member.js: -------------------------------------------------------------------------------- 1 | foo = (/** @type {!Baz} */ (baz).bar); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/comments-2.js.snap: -------------------------------------------------------------------------------- 1 | <|> 2 | // howdy 3 | // hi lol 4 | const y = 5; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/comments-3.js.snap: -------------------------------------------------------------------------------- 1 | /<|>/; 2 | howdy; 3 | // hi lol 4 | const y = 5; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-0.js.snap: -------------------------------------------------------------------------------- 1 | (function () { 2 | return <|> 15 3 | })(); 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-1.js.snap: -------------------------------------------------------------------------------- 1 | (function () { 2 | return <|>15 3 | })(); 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/basic.js: -------------------------------------------------------------------------------- 1 | class Foo { 2 | accessor bar; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/private.js: -------------------------------------------------------------------------------- 1 | class Foo { 2 | accessor #bar; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/empty-statement/no-newline.js: -------------------------------------------------------------------------------- 1 | if (a) { 2 | b; 3 | 4 | 5 | ; 6 | } 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_arrow_expression.js: -------------------------------------------------------------------------------- 1 | export default () => {}; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_call_expression.js.snap: -------------------------------------------------------------------------------- 1 | export default foo(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_class_declaration.js: -------------------------------------------------------------------------------- 1 | export default class Foo {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_new_expression.js.snap: -------------------------------------------------------------------------------- 1 | export default new Foo(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-default/class_instance.js: -------------------------------------------------------------------------------- 1 | export default (class {}.getInstance()); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-star/export-star-as-default.js.snap: -------------------------------------------------------------------------------- 1 | export * as default from "foo"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-star/export-star-as-string.js.snap: -------------------------------------------------------------------------------- 1 | export * as "foo" from "foo"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-star/export-star-as-string2.js.snap: -------------------------------------------------------------------------------- 1 | export * as "foo" from "foo"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/ignore/decorator.js.snap: -------------------------------------------------------------------------------- 1 | // prettier-ignore 2 | @decorator 3 | class A {} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/ignore/issue-9335.js: -------------------------------------------------------------------------------- 1 | class foo extends 2 | // prettier-ignore 3 | f {} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/without-from.js: -------------------------------------------------------------------------------- 1 | import "foo" assert { type: "json" } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/without-from.js.snap: -------------------------------------------------------------------------------- 1 | import "foo" with { type: "json" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/label/block-statement-and-regexp.js.snap: -------------------------------------------------------------------------------- 1 | a: { 2 | b: 1; 3 | } 4 | /2/; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/objects/bigint-key.js: -------------------------------------------------------------------------------- 1 | a = {1n: ""} 2 | a = {1n() {}} 3 | a = {get 1n() {}} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/whitespace.js: -------------------------------------------------------------------------------- 1 | <<>> <<>> 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/shebang/shebang-newline.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | function a() {} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sloppy-mode/function-declaration-in-if.js.snap: -------------------------------------------------------------------------------- 1 | if (false) function foo(){} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sloppy-mode/labeled-function-declaration.js.snap: -------------------------------------------------------------------------------- 1 | foo: function bar() {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/template/arrow.js: -------------------------------------------------------------------------------- 1 | () => a` 2 | a 3 | `; 4 | 5 | () => ` 6 | a 7 | `; 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/try/try.js.snap: -------------------------------------------------------------------------------- 1 | try { 2 | /* missing comment */ 3 | } finally { 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/unary/object.js: -------------------------------------------------------------------------------- 1 | state = { 2 | // students 3 | hoverColumn: -1 4 | }; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/jsx/ternary.js.snap: -------------------------------------------------------------------------------- 1 | a == 3 ? (a =

123

) : (a =

abc

); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/arrow-function-type.ts.snap: -------------------------------------------------------------------------------- 1 | type foo = () <|>=> boolean; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/method-signature.ts: -------------------------------------------------------------------------------- 1 | interface A { 2 | foo()<|>: T; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/property-signature.ts: -------------------------------------------------------------------------------- 1 | interface A { 2 | foo<|>: T; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/instantiation-expression/basic.ts: -------------------------------------------------------------------------------- 1 | // basic 2 | const foo = bar; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/instantiation-expression/binary-expr.ts.snap: -------------------------------------------------------------------------------- 1 | new A(); 2 | C; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/method/type_literal_optional_method.ts: -------------------------------------------------------------------------------- 1 | var v: { e?(): number }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/symbol/symbol.ts.snap: -------------------------------------------------------------------------------- 1 | function test(abc: Map) {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/tsx/this.tsx: -------------------------------------------------------------------------------- 1 | ; 2 | ; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/type-arguments-bit-shift-left-like/2.ts: -------------------------------------------------------------------------------- 1 | f<(v: T) => void>(); 2 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "1.91.1" 3 | profile = "default" 4 | targets = ["wasm32-unknown-unknown"] 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/array/empty_lines.js.snap: -------------------------------------------------------------------------------- 1 | let a = [ 2 | 1, 2, 3 | 4 | 3, 5 | 6 | 4, 7 | ]; 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/assignment/array-assignment-holes.js.snap: -------------------------------------------------------------------------------- 1 | let a, b; 2 | [a, /*empty*/ ,] = b; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/expression/post_update_expression.js.snap: -------------------------------------------------------------------------------- 1 | y++; 2 | y--; 3 | x = y++; 4 | x = y--; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/expression/pre_update_expression.js.snap: -------------------------------------------------------------------------------- 1 | ++y; 2 | --y; 3 | x = ++y; 4 | x = --y; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/interpreter_with_empty_line.js.snap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | console.log(1); 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/jsx/quote_style/quote_style.jsx.snap: -------------------------------------------------------------------------------- 1 |
2 | "123" 3 |
; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrows/newline-before-arrow/newline-before-arrow.js.snap: -------------------------------------------------------------------------------- 1 | async; 2 | x; 3 | => x 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/async-do-expressions.js: -------------------------------------------------------------------------------- 1 | async do { await requestAPI().json() }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/bracket-spacing/array.js: -------------------------------------------------------------------------------- 1 | const arr1 = [1,2,3,4]; 2 | const arr2 = [1, 2, 3, 4]; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments-closure-typecast/member.js.snap: -------------------------------------------------------------------------------- 1 | foo = /** @type {!Baz} */ (baz).bar; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/basic.js.snap: -------------------------------------------------------------------------------- 1 | class Foo { 2 | accessor bar; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/computed.js: -------------------------------------------------------------------------------- 1 | class Foo { 2 | accessor ["bar"]; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/private.js.snap: -------------------------------------------------------------------------------- 1 | class Foo { 2 | accessor #bar; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/static.js: -------------------------------------------------------------------------------- 1 | class Foo { 2 | static accessor bar; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorators/parens.js: -------------------------------------------------------------------------------- 1 | class X { 2 | @(computed().volatile()) 3 | x 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorators/parens.js.snap: -------------------------------------------------------------------------------- 1 | class X { 2 | @(computed().volatile()) 3 | x; 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_arrow_expression.js.snap: -------------------------------------------------------------------------------- 1 | export default () => {}; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_class_declaration.js.snap: -------------------------------------------------------------------------------- 1 | export default class Foo {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_class_expression.js: -------------------------------------------------------------------------------- 1 | export default (class foobar {}) 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_function_declaration.js: -------------------------------------------------------------------------------- 1 | export default function() {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-default/binary_and_template.js: -------------------------------------------------------------------------------- 1 | export default (function() {} + foo)``; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-default/class_instance.js.snap: -------------------------------------------------------------------------------- 1 | export default (class {}.getInstance()); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-default/function_tostring.js: -------------------------------------------------------------------------------- 1 | export default (function() {}).toString(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/ignore/issue-9335.js.snap: -------------------------------------------------------------------------------- 1 | class foo 2 | // prettier-ignore 3 | extends f {} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/bracket-spacing/empty.js: -------------------------------------------------------------------------------- 1 | export * as bar from "bar.json" with { } -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/non-type.js: -------------------------------------------------------------------------------- 1 | import foo from "foo.json" with { lazy: "true" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-reflection/import-reflection.js: -------------------------------------------------------------------------------- 1 | import module foo from "./module.wasm"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/non-strict/argument-name-clash.js.snap: -------------------------------------------------------------------------------- 1 | function f(a, a) { 2 | return a; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/whitespace.js.snap: -------------------------------------------------------------------------------- 1 | <<>> <<>> 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/record/syntax.js: -------------------------------------------------------------------------------- 1 | #{} 2 | #{ a: 1, b: 2 } 3 | #{ a: 1, b: #[2, 3, #{ c: 4 }] } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/shebang/shebang-newline.js.snap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | function a() {} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sloppy-mode/function-declaration-in-while.js: -------------------------------------------------------------------------------- 1 | while (false) function foo(){} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/template/arrow.js.snap: -------------------------------------------------------------------------------- 1 | () => a` 2 | a 3 | `; 4 | 5 | () => ` 6 | a 7 | `; 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/tuple/syntax.js.snap: -------------------------------------------------------------------------------- 1 | #[] 2 | #[1, 2] 3 | #[1, 2, # 4 | { 5 | a: 3; 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/unary/object.js.snap: -------------------------------------------------------------------------------- 1 | state = { 2 | // students 3 | hoverColumn: -1, 4 | }; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/comments/like-a-comment-in-jsx-text.js.snap: -------------------------------------------------------------------------------- 1 | text // comment text; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/class/quoted-property.ts: -------------------------------------------------------------------------------- 1 | class User { 2 | "username": string; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/class/quoted-property.ts.snap: -------------------------------------------------------------------------------- 1 | class User { 2 | username: string; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/constKeyword/constKeyword.ts: -------------------------------------------------------------------------------- 1 | const enum E { A, B, C } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/enumDeclaration/enumDeclaration.ts: -------------------------------------------------------------------------------- 1 | enum E { A, B, C } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/never/never.ts: -------------------------------------------------------------------------------- 1 | var x: never 2 | var x: never | string 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/method-signature.ts.snap: -------------------------------------------------------------------------------- 1 | interface A { 2 | foo()<|>: T; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/property-signature.ts.snap: -------------------------------------------------------------------------------- 1 | interface A { 2 | foo<|>: T; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/export/export-as-ns.ts: -------------------------------------------------------------------------------- 1 | export * as utilities from "./utilities.js"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/instantiation-expression/basic.ts.snap: -------------------------------------------------------------------------------- 1 | // basic 2 | const foo = bar; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/intrinsic/intrinsic.ts: -------------------------------------------------------------------------------- 1 | type Uppercase = intrinsic; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/method/type_literal_optional_method.ts.snap: -------------------------------------------------------------------------------- 1 | var v: { e?(): number }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/tsx/this.tsx.snap: -------------------------------------------------------------------------------- 1 | ; 2 | ; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/type-arguments-bit-shift-left-like/2.ts.snap: -------------------------------------------------------------------------------- 1 | f<(v: T) => void>(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/type-arguments-bit-shift-left-like/6.ts: -------------------------------------------------------------------------------- 1 | new f<(v: T) => void>(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/union/consistent-with-flow/comment.ts.snap: -------------------------------------------------------------------------------- 1 | type A1 = /* 4 */ (A | B)[]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/module/module_declaration.ts.snap: -------------------------------------------------------------------------------- 1 | module singleName {} 2 | 3 | module qualified.name {} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/binding/array-binding-holes.js: -------------------------------------------------------------------------------- 1 | function foo([foo, /* not used */, /* not used */]) { 2 | } -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/decorators/export_default_3.js.snap: -------------------------------------------------------------------------------- 1 | @dec1 2 | @dec2 3 | export default class Foo {} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/decorators/export_default_4.js: -------------------------------------------------------------------------------- 1 | @dec1 @dec2 export default @dec3 @dec4 class Foo {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/interpreter.js.snap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | console.log(1); 3 | 4 | console.log(1); 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/no-semi/private-field.js: -------------------------------------------------------------------------------- 1 | class C { 2 | #field = 'value'; 3 | ["method"]() {} 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrays/holes-in-args.js: -------------------------------------------------------------------------------- 1 | new Test() 2 | .test() 3 | .test([, 0]) 4 | .test(); 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/super.js.snap: -------------------------------------------------------------------------------- 1 | class A extends B { 2 | #a() { 3 | super.x(); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments/dangling_for.js: -------------------------------------------------------------------------------- 1 | for // comment 2 | (;;); 3 | 4 | for /* comment */(;;); 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/comments-4.js: -------------------------------------------------------------------------------- 1 | // howdy 2 | // hi lol 3 | const y = 5 4 | // traling! <|> 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/cursor-4.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | const y = 5 4 | 5 | <|> 6 | 7 | const z = 9 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/computed.js.snap: -------------------------------------------------------------------------------- 1 | class Foo { 2 | accessor ["bar"]; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/static.js.snap: -------------------------------------------------------------------------------- 1 | class Foo { 2 | static accessor bar; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/dynamic-import/assertions.js: -------------------------------------------------------------------------------- 1 | import("./foo.json", { assert: { type: "json" } }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/dynamic-import/test.js: -------------------------------------------------------------------------------- 1 | import("module.js"); 2 | import("module.js").then((a) => a); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_class_expression.js.snap: -------------------------------------------------------------------------------- 1 | export default (class foobar {}); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_function_declaration.js.snap: -------------------------------------------------------------------------------- 1 | export default function () {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_function_expression.js: -------------------------------------------------------------------------------- 1 | export default (function() {}); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-binding-escaped.js: -------------------------------------------------------------------------------- 1 | { using \u0061b = c; } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-binding-non-bmp.js: -------------------------------------------------------------------------------- 1 | { using 𠮷 = foo(); } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-default/binary_and_template.js.snap: -------------------------------------------------------------------------------- 1 | export default (function () {} + foo)``; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-default/function_in_template.js: -------------------------------------------------------------------------------- 1 | export default (function templ() {})`foo`; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-default/function_tostring.js.snap: -------------------------------------------------------------------------------- 1 | export default (function () {}.toString()); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/expression_statement/no_regression.js: -------------------------------------------------------------------------------- 1 | // Ensure no regression. 2 | "use strict"; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/bracket-spacing/empty.js: -------------------------------------------------------------------------------- 1 | export * as bar from "bar.json" assert { } -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/non-type.js: -------------------------------------------------------------------------------- 1 | import foo from "foo.json" assert { lazy: "true" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/not-import-assertions.js: -------------------------------------------------------------------------------- 1 | import "x" 2 | assert ({type: 'json'}); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/bracket-spacing/empty.js.snap: -------------------------------------------------------------------------------- 1 | export * as bar from "bar.json"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/non-type.js.snap: -------------------------------------------------------------------------------- 1 | import foo from "foo.json" with { lazy: "true" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/multiparser-comments/tagged.js: -------------------------------------------------------------------------------- 1 | foo(html // oops 2 | `

bar

foo
`); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/quotes/objects.js: -------------------------------------------------------------------------------- 1 | const obj = { 2 | 'a': true, 3 | b: true, 4 | "𐊧": true, 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sloppy-mode/function-declaration-in-while.js.snap: -------------------------------------------------------------------------------- 1 | while (false) function foo(){} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/switch/empty_switch.js.snap: -------------------------------------------------------------------------------- 1 | switch (1) { 2 | default: 3 | } 4 | switch (1) { 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/tuple/tuple.js.snap: -------------------------------------------------------------------------------- 1 | a = [
,
]; 2 | 3 | a = #; 4 | [
,
]; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cast/assert-and-assign.ts: -------------------------------------------------------------------------------- 1 | (a as number) = 42; 2 | ({ a: (b as any) = 2000 } = x); -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/abstractKeyword/abstractKeyword.ts: -------------------------------------------------------------------------------- 1 | abstract interface I {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/nonNullExpression/nonNullExpression.ts: -------------------------------------------------------------------------------- 1 | var xx = (xx!, xx); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/symbol/symbol.ts: -------------------------------------------------------------------------------- 1 | var x: symbol 2 | var x: symbol | string 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/tuple/tupleElementTypes3.ts: -------------------------------------------------------------------------------- 1 | var [a, b] = [0, undefined]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/custom/modifiers/question.ts: -------------------------------------------------------------------------------- 1 | var x: { 2 | [A in keyof B]?: any; 3 | }; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/custom/modifiers/question.ts.snap: -------------------------------------------------------------------------------- 1 | var x: { 2 | [A in keyof B]?: any; 3 | }; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/declare/declare_enum.ts: -------------------------------------------------------------------------------- 1 | declare const enum Foo {} 2 | declare enum Bar {} 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/export/export-as-ns.ts.snap: -------------------------------------------------------------------------------- 1 | export * as utilities from "./utilities.js"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/intrinsic/intrinsic.ts.snap: -------------------------------------------------------------------------------- 1 | type Uppercase = intrinsic; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/namespace/invalid-await.ts: -------------------------------------------------------------------------------- 1 | namespace N { 2 | const x = await 42; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/namespace/invalid-await.ts.snap: -------------------------------------------------------------------------------- 1 | namespace N { 2 | const x = await 42; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/readonly/readonly.ts: -------------------------------------------------------------------------------- 1 | class Foo { 2 | public readonly foo = 'string'; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/type-arguments-bit-shift-left-like/4.ts: -------------------------------------------------------------------------------- 1 | (@f<(v: T) => void>() class {}); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/type-arguments-bit-shift-left-like/6.ts.snap: -------------------------------------------------------------------------------- 1 | new f<(v: T) => void>(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/class/accessor.ts: -------------------------------------------------------------------------------- 1 | export abstract class C { 2 | protected abstract accessor prop: number 3 | } -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/module/module_declaration.ts: -------------------------------------------------------------------------------- 1 | module singleName { } 2 | 3 | 4 | module qualified.name { } 5 | -------------------------------------------------------------------------------- /crates/web_fmt/test_data/app.tsx: -------------------------------------------------------------------------------- 1 | export function App(): JSX.Element { 2 | return
Hello, world!
; 3 | } -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/binding/array-binding-holes.js.snap: -------------------------------------------------------------------------------- 1 | function foo([foo, /* not used */ /* not used */ ,]) {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/no-semi/private-field.js.snap: -------------------------------------------------------------------------------- 1 | class C { 2 | #field = "value"; 3 | ["method"]() {} 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/number/number.js: -------------------------------------------------------------------------------- 1 | 1.23e4 2 | 1000e3 // FIXME handle number with scientific notation #1294 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/async/async-shorthand-method.js: -------------------------------------------------------------------------------- 1 | ({ 2 | async get() {}, 3 | async set() {} 4 | }); 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/async/async-shorthand-method.js.snap: -------------------------------------------------------------------------------- 1 | ({ 2 | async get() {}, 3 | async set() {}, 4 | }); 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/async-do-expressions.js.snap: -------------------------------------------------------------------------------- 1 | async; 2 | do { await requestAPI().json() }; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/bracket-spacing/array.js.snap: -------------------------------------------------------------------------------- 1 | const arr1 = [1, 2, 3, 4]; 2 | const arr2 = [1, 2, 3, 4]; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments-closure-typecast/binary-expr.js: -------------------------------------------------------------------------------- 1 | var a = b || /** @type {string} */ 2 | (c); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments-closure-typecast/binary-expr.js.snap: -------------------------------------------------------------------------------- 1 | var a = b || /** @type {string} */ (c); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments-closure-typecast/superclass.js: -------------------------------------------------------------------------------- 1 | class Foo extends /** @type {string} */ (Bar) {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/comments-1.js: -------------------------------------------------------------------------------- 1 | // hi l<|>ol 2 | function ehllooo () { 3 | const hi = "hi" 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/comments-4.js.snap: -------------------------------------------------------------------------------- 1 | // howdy 2 | // hi lol 3 | const y = 5; 4 | // traling! <|> 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/not-accessor-method.js: -------------------------------------------------------------------------------- 1 | class Foo { 2 | accessor() {} 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/not-accessor-method.js.snap: -------------------------------------------------------------------------------- 1 | class Foo { 2 | accessor() {} 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/not-accessor-property.js: -------------------------------------------------------------------------------- 1 | class Foo { 2 | accessor = 123; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/static-private.js: -------------------------------------------------------------------------------- 1 | class Foo { 2 | static accessor #bar; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/dynamic-import/assertions.js.snap: -------------------------------------------------------------------------------- 1 | import("./foo.json", { assert: { type: "json" } }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/dynamic-import/test.js.snap: -------------------------------------------------------------------------------- 1 | import("module.js"); 2 | import("module.js").then((a) => a); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/end-of-line/example.js: -------------------------------------------------------------------------------- 1 | function f() { 2 | console.log("testing line endings"); 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_function_declaration_named.js: -------------------------------------------------------------------------------- 1 | export default function f(){} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_function_expression.js.snap: -------------------------------------------------------------------------------- 1 | export default (function () {}); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_function_expression_named.js: -------------------------------------------------------------------------------- 1 | export default (function f(){}) 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/invalid-script-top-level-using-binding.js: -------------------------------------------------------------------------------- 1 | using x = bar(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-default/function_in_template.js.snap: -------------------------------------------------------------------------------- 1 | export default (function templ() {})`foo`; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/expression_statement/no_regression.js.snap: -------------------------------------------------------------------------------- 1 | // Ensure no regression. 2 | "use strict"; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/dynamic-import.js: -------------------------------------------------------------------------------- 1 | import("./foo.json", { assert: { type: "json" } }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/not-import-assertions.js.snap: -------------------------------------------------------------------------------- 1 | import "x"; 2 | assert({ type: "json" }); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/static-import.js: -------------------------------------------------------------------------------- 1 | import json from "./foo.json" assert { type: "json" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/dynamic-import.js: -------------------------------------------------------------------------------- 1 | import("./foo.json", { with: { type: "json" } }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/static-import.js: -------------------------------------------------------------------------------- 1 | import json from "./foo.json" with { type: "json" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-reflection/valid-module-as-default-binding.mjs: -------------------------------------------------------------------------------- 1 | import module from "./module.wasm"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/multiparser-css/url.js: -------------------------------------------------------------------------------- 1 | styled.div`color:red;background: url(http://example.com?q=${foo})` 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/no-semi/private-field.js: -------------------------------------------------------------------------------- 1 | class C { 2 | #field = 'value'; 3 | ["method"]() {} 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/no-semi/private-field.js.snap: -------------------------------------------------------------------------------- 1 | class C { 2 | #field = "value"; 3 | ["method"]() {} 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/objects/bigint-key.js.snap: -------------------------------------------------------------------------------- 1 | a = { 1n: "" }; 2 | a = { 1n() {} }; 3 | a = { get 1n() {} }; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/quotes/objects.js.snap: -------------------------------------------------------------------------------- 1 | const obj = { 2 | a: true, 3 | b: true, 4 | 𐊧: true, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/directive.js: -------------------------------------------------------------------------------- 1 | <<>>'<<>>aaa'; 2 | 'bbb'; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sequence-expression/ignore.js.snap: -------------------------------------------------------------------------------- 1 | +( 2 | // prettier-ignore 3 | (first, last) 4 | ); 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sloppy-mode/delete-variable.js: -------------------------------------------------------------------------------- 1 | function foo() { 2 | var bar = 1; 3 | delete bar;} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/as/export_default_as.ts: -------------------------------------------------------------------------------- 1 | export default (function log() {} as typeof console.log) 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/chain-expression/test.ts.snap: -------------------------------------------------------------------------------- 1 | a?.b!.c; 2 | a?.()!.b; 3 | a?.b!.c; 4 | a?.()!.b; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/compiler/ClassDeclaration22.ts.snap: -------------------------------------------------------------------------------- 1 | class C { 2 | foo(); 3 | bar() {} 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/never/never.ts.snap: -------------------------------------------------------------------------------- 1 | var x: never; 2 | var x: never | string; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/nonNullExpression/nonNullExpression.ts.snap: -------------------------------------------------------------------------------- 1 | var xx = (xx!, xx); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/tuple/tupleElementTypes3.ts.snap: -------------------------------------------------------------------------------- 1 | var [a, b] = [0, undefined]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/typeOperator/typeOperator.ts: -------------------------------------------------------------------------------- 1 | let a: (keyof T)[] = ["a", "b"]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/custom/module/moduleNamespace.ts: -------------------------------------------------------------------------------- 1 | declare module "f" {} 2 | 3 | namespace f {} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/declare/declare_enum.ts.snap: -------------------------------------------------------------------------------- 1 | declare const enum Foo {} 2 | declare enum Bar {} 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/decorators-ts/multiple.ts: -------------------------------------------------------------------------------- 1 | class C { 2 | @f() 3 | @g() 4 | method() {} 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/index-signature/static.ts: -------------------------------------------------------------------------------- 1 | class Foo { 2 | static [value: string]: Type; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/intersection/consistent-with-flow/comment.ts.snap: -------------------------------------------------------------------------------- 1 | type A1 = /* 4 */ (A & B)[]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/module/namespace_function.ts: -------------------------------------------------------------------------------- 1 | namespace X { 2 | declare function f(); 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/module/namespace_function.ts.snap: -------------------------------------------------------------------------------- 1 | namespace X { 2 | declare function f(); 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/readonly/readonly.ts.snap: -------------------------------------------------------------------------------- 1 | class Foo { 2 | public readonly foo = "string"; 3 | } 4 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "deno.enable": true, 3 | "deno.enablePaths": [ 4 | "./crates/biome_fmt/test_deno" 5 | ] 6 | } -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/export/function_clause.js.snap: -------------------------------------------------------------------------------- 1 | export function f() {} 2 | 3 | export default function ff() {} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/expression/literal_expression.js: -------------------------------------------------------------------------------- 1 | "a" 2 | 1 3 | 45n 4 | true 5 | false 6 | null 7 | ;/[/]\/\u0aBc/mgi; -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/number/number.js.snap: -------------------------------------------------------------------------------- 1 | 1.23e4; 2 | 1000e3; // FIXME handle number with scientific notation #1294 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/object/getter_setter.js: -------------------------------------------------------------------------------- 1 | let a = { 2 | get foo() {} 3 | } 4 | let b = { 5 | set foo(a) {} 6 | } 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/jsx/comments.jsx.snap: -------------------------------------------------------------------------------- 1 |
; 3 | 4 | ; 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/assignment-expression/assignment_expression.js: -------------------------------------------------------------------------------- 1 | this.size = this._origin = this._capacity = 0; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/import-assertions-dynamic.js: -------------------------------------------------------------------------------- 1 | import("./foo.json", { assert: { type: "json" } }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/import-attributes-dynamic.js: -------------------------------------------------------------------------------- 1 | import("./foo.json", { with: { type: "json" } }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/import-attributes-static.js: -------------------------------------------------------------------------------- 1 | import json from "./foo.json" with { type: "json" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/bracket-spacing/object.js: -------------------------------------------------------------------------------- 1 | const obj1 = {a:1, b:2, c:3} 2 | const obj2 = { a:1, b:2, c:3 }; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/super.js: -------------------------------------------------------------------------------- 1 | class A extends B { 2 | #a() { 3 | super.x(); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments-closure-typecast/superclass.js.snap: -------------------------------------------------------------------------------- 1 | class Foo extends /** @type {string} */ (Bar) {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments/dangling_for.js.snap: -------------------------------------------------------------------------------- 1 | // comment 2 | for (;;); 3 | 4 | /* comment */ 5 | for (;;); 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/comments-1.js.snap: -------------------------------------------------------------------------------- 1 | // hi l<|>ol 2 | function ehllooo() { 3 | const hi = "hi"; 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/range-5.js: -------------------------------------------------------------------------------- 1 | const myVar = <<>>aFunction<|><<>> 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/not-accessor-property.js.snap: -------------------------------------------------------------------------------- 1 | class Foo { 2 | accessor = 123; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/static-computed.js: -------------------------------------------------------------------------------- 1 | class Foo { 2 | static accessor ["bar"]; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/static-private.js.snap: -------------------------------------------------------------------------------- 1 | class Foo { 2 | static accessor #bar; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/end-of-line/example.js.snap: -------------------------------------------------------------------------------- 1 | function f() { 2 | console.log("testing line endings"); 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_function_declaration_async.js: -------------------------------------------------------------------------------- 1 | export default async function foo() {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_function_declaration_named.js.snap: -------------------------------------------------------------------------------- 1 | export default function f() {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_function_expression_named.js.snap: -------------------------------------------------------------------------------- 1 | export default (function f() {}); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/invalid-script-top-level-using-binding.js.snap: -------------------------------------------------------------------------------- 1 | using x = bar(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-as-identifier-in.js: -------------------------------------------------------------------------------- 1 | using in using instanceof using; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/dynamic-import.js.snap: -------------------------------------------------------------------------------- 1 | import("./foo.json", { assert: { type: "json" } }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/dynamic-import.js.snap: -------------------------------------------------------------------------------- 1 | import("./foo.json", { with: { type: "json" } }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/static-import.js.snap: -------------------------------------------------------------------------------- 1 | import json from "./foo.json" with { type: "json" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-reflection/valid-module-as-default-binding.mjs.snap: -------------------------------------------------------------------------------- 1 | import module from "./module.wasm"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/directive.js.snap: -------------------------------------------------------------------------------- 1 | <<>>'<<>>aaa' 2 | ("bbb"); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/try-catch.js: -------------------------------------------------------------------------------- 1 | try {} 2 | <<>>c<<>>atch (err) {} 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sloppy-mode/delete-variable.js.snap: -------------------------------------------------------------------------------- 1 | function foo() { 2 | var bar = 1; 3 | delete bar; 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/as/export_default_as.ts.snap: -------------------------------------------------------------------------------- 1 | export default (function log() {} as typeof console.log); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cast/assert-and-assign.ts.snap: -------------------------------------------------------------------------------- 1 | (a as number) = 42; 2 | ({ a: (b as any) = 2000 } = x); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/chain-expression/test.ts: -------------------------------------------------------------------------------- 1 | (a?.b!).c; 2 | (a?.()!).b; 3 | (a?.b)!.c; 4 | (a?.())!.b; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/compiler/ClassDeclaration22.ts: -------------------------------------------------------------------------------- 1 | class C { 2 | "foo"(); 3 | "bar"() { } 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractWithInterface.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/internalModules/importDeclarations/exportInterface.ts: -------------------------------------------------------------------------------- 1 | export interface I {} -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/abstractKeyword/abstractKeyword.ts.snap: -------------------------------------------------------------------------------- 1 | abstract; 2 | interface I {} 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/constructorType/cunstructorType.ts: -------------------------------------------------------------------------------- 1 | var d: new(x: number) => void; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/symbol/symbol.ts.snap: -------------------------------------------------------------------------------- 1 | var x: symbol; 2 | var x: symbol | string; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/tuple/tupleElementTypes2.ts: -------------------------------------------------------------------------------- 1 | function f([a, b]: [number, any]) { } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/tuple/tupleElementTypes4.ts: -------------------------------------------------------------------------------- 1 | function f([a, b] = [0, undefined]) { } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/typeOperator/typeOperator.ts.snap: -------------------------------------------------------------------------------- 1 | let a: (keyof T)[] = ["a", "b"]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/cursor/function-return-type.ts.snap: -------------------------------------------------------------------------------- 1 | function a() 2 | <|> 3 | : boolean 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/custom/modifiers/readonly.ts: -------------------------------------------------------------------------------- 1 | var x: { 2 | readonly [A in keyof B]: any; 3 | }; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/custom/modifiers/readonly.ts.snap: -------------------------------------------------------------------------------- 1 | var x: { 2 | readonly [A in keyof B]: any; 3 | }; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/custom/module/moduleNamespace.ts.snap: -------------------------------------------------------------------------------- 1 | declare module "f" {} 2 | 3 | namespace f {} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/decorators-ts/multiple.ts.snap: -------------------------------------------------------------------------------- 1 | class C { 2 | @f() 3 | @g() 4 | method() {} 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/export-default/function_as.ts: -------------------------------------------------------------------------------- 1 | export default (function log(){} as typeof console.log); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/export/comment.ts: -------------------------------------------------------------------------------- 1 | export function match(): string /* the matching pattern */ 2 | a 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/export/default.ts: -------------------------------------------------------------------------------- 1 | export default interface Foo { 2 | readonly bar?: string; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/index-signature/static.ts.snap: -------------------------------------------------------------------------------- 1 | class Foo { 2 | static [value: string]: Type; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/interface2/module.ts: -------------------------------------------------------------------------------- 1 | declare module X { 2 | declare interface Y { x: number; } 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/union/consistent-with-flow/comment.ts: -------------------------------------------------------------------------------- 1 | type A1 = /* 4 */ ( 2 | | A 3 | | B 4 | )[] 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/unique-symbol/unique-symbol.ts: -------------------------------------------------------------------------------- 1 | type A = unique symbol; 2 | type B = keyof something; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/class/accessor.ts.snap: -------------------------------------------------------------------------------- 1 | export abstract class C { 2 | protected abstract accessor prop: number; 3 | } 4 | -------------------------------------------------------------------------------- /crates/web_fmt/test_data/app.tsx.snap: -------------------------------------------------------------------------------- 1 | export function App(): JSX.Element { 2 | return
Hello, world!
; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/expression/binary_range_expression.js: -------------------------------------------------------------------------------- 1 | 1 + 2 + <<>>3 + 4<<>> + 5 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/script.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | "use strict"; 3 | 'use asm' 4 | var express = require("express") 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/string/parentheses_token.js: -------------------------------------------------------------------------------- 1 | ("Jan 1, <<>>2018 – Jan 1, 2019<<>>") 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/script/script.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | "use strict"; 3 | 'use asm' 4 | var express = require("express") 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrows-bind/arrows-bind.js: -------------------------------------------------------------------------------- 1 | a => ({}::b()``[''].c++ && 0 ? 0 : 0); 2 | (a => b)::c; 3 | a::(b => c); 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/assignment-expression/assignment_expression.js.snap: -------------------------------------------------------------------------------- 1 | this.size = this._origin = this._capacity = 0; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/import-assertions-dynamic.js.snap: -------------------------------------------------------------------------------- 1 | import("./foo.json", { assert: { type: "json" } }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/import-assertions-static.js: -------------------------------------------------------------------------------- 1 | import json from "./foo.json" assert { type: "json" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/import-attributes-dynamic.js.snap: -------------------------------------------------------------------------------- 1 | import("./foo.json", { with: { type: "json" } }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/import-attributes-static.js.snap: -------------------------------------------------------------------------------- 1 | import json from "./foo.json" with { type: "json" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/import-reflection.js.snap: -------------------------------------------------------------------------------- 1 | import module 2 | foo; 3 | from; 4 | ("./module.wasm"); 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/class-static-block/with-line-breaks.js.snap: -------------------------------------------------------------------------------- 1 | class Foo { 2 | static { 3 | 1 + 1; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments/multi-comments-on-same-line-2.js: -------------------------------------------------------------------------------- 1 | /* 1 */ /* 2 */ /* 3 */ a; 2 | a; /* 4 */ /* 5 */ /* 6 */ 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/range-5.js.snap: -------------------------------------------------------------------------------- 1 | const myVar = <<>>aFunction<|><<>> 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/range-6.js: -------------------------------------------------------------------------------- 1 | const myVar = <<>>aFunction;<|><<>> 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/range-7.js: -------------------------------------------------------------------------------- 1 | const myVar = <<>>aFunction<|>;<<>> 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/static-computed.js.snap: -------------------------------------------------------------------------------- 1 | class Foo { 2 | static accessor ["bar"]; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/directives/newline.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | "use strict"; 4 | 5 | import a from "a"; 6 | 7 | a(); 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/es6modules/export_default_function_declaration_async.js.snap: -------------------------------------------------------------------------------- 1 | export default async function foo() {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-as-identifier-for-await-of.js: -------------------------------------------------------------------------------- 1 | for await (using of of); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-as-identifier-in.js.snap: -------------------------------------------------------------------------------- 1 | using in using instanceof using; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-binding-basic.js: -------------------------------------------------------------------------------- 1 | { 2 | using basic = getReader(); 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-binding-escaped.js.snap: -------------------------------------------------------------------------------- 1 | { 2 | using \u0061b = c; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-binding-non-bmp.js.snap: -------------------------------------------------------------------------------- 1 | { 2 | using 𠮷 = foo(); 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/without-from.js.snap: -------------------------------------------------------------------------------- 1 | import "foo"; 2 | assert; 3 | { 4 | type: "json"; 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/multi-types.js: -------------------------------------------------------------------------------- 1 | import json from "./foo.json" with { type: "json", type: "bar" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-reflection/import-reflection.js.snap: -------------------------------------------------------------------------------- 1 | import module 2 | foo; 3 | from; 4 | ("./module.wasm"); 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-reflection/valid-from-as-default-module-binding.mjs: -------------------------------------------------------------------------------- 1 | import module from from "./module.wasm"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/multiparser-css/url.js.snap: -------------------------------------------------------------------------------- 1 | styled.div`color:red;background: url(http://example.com?q=${foo})`; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/new-expression/call.js: -------------------------------------------------------------------------------- 1 | new (factory())() 2 | new factory()() 3 | 4 | new (factory())(factory()) 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/objects/assignment-expression/object-property.js: -------------------------------------------------------------------------------- 1 | a = { 2 | [this.resource = resource]: 1, 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/optional-catch-binding/optional_catch_binding.js.snap: -------------------------------------------------------------------------------- 1 | try { 2 | } catch { 3 | } finally { 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/object-expression.js: -------------------------------------------------------------------------------- 1 | const y = {<<>>a:1<<>>, b:2} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sloppy-mode/eval-arguments-binding.js: -------------------------------------------------------------------------------- 1 | function myfunc() { 2 | var eval 3 | var arguments; 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sloppy-mode/eval-arguments.js: -------------------------------------------------------------------------------- 1 | function myfunc() { 2 | eval = 1 3 | arguments = arguments; 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/try/empty.js.snap: -------------------------------------------------------------------------------- 1 | try { 2 | } catch (e) { 3 | } finally { 4 | } 5 | 6 | try { 7 | } catch (e) {} 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/v8_intrinsic/avoid-conflicts-to-pipeline.js: -------------------------------------------------------------------------------- 1 | // |> 2 | const status = %GetOptimizationStatus(fn); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/comments/like-a-comment-in-jsx-text.js: -------------------------------------------------------------------------------- 1 | 3 | text 4 | // comment 5 | text 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/abstract-class/export-default.ts: -------------------------------------------------------------------------------- 1 | export default abstract class C5 { abstract foo(): void; } 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/abstract-property/semicolon.ts: -------------------------------------------------------------------------------- 1 | abstract class C { 2 | abstract get; 3 | x() {} 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/abstract-property/semicolon.ts.snap: -------------------------------------------------------------------------------- 1 | abstract class C { 2 | abstract get; 3 | x() {} 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractWithInterface.ts.snap: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/comments/comments.ts: -------------------------------------------------------------------------------- 1 | /* http://www.site.com or http://www.site.com/page.html */ 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/parser/ecmascript5/Statements/parserForInStatement2.ts: -------------------------------------------------------------------------------- 1 | for (var in X) { 2 | } 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/constructorType/cunstructorType.ts.snap: -------------------------------------------------------------------------------- 1 | var d: new (x: number) => void; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/moduleDeclaration/kind-detection.ts: -------------------------------------------------------------------------------- 1 | declare /* module */ namespace A {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/tuple/tupleElementTypes2.ts.snap: -------------------------------------------------------------------------------- 1 | function f([a, b]: [number, any]) {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/tuple/tupleElementTypes4.ts.snap: -------------------------------------------------------------------------------- 1 | function f([a, b] = [0, undefined]) {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/undefined/undefined.ts: -------------------------------------------------------------------------------- 1 | var x: undefined 2 | var x: undefined | string 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/variableDeclarator/variableDeclarator.ts: -------------------------------------------------------------------------------- 1 | type MyMap = Map; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/export/comment.ts.snap: -------------------------------------------------------------------------------- 1 | export function match(): string; /* the matching pattern */ 2 | a; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/export/default.ts.snap: -------------------------------------------------------------------------------- 1 | export default interface Foo { 2 | readonly bar?: string; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/rest-type/complex.ts: -------------------------------------------------------------------------------- 1 | type TupleWithRest = [number, ...(1 extends 2 ? string[] : number[])]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/unique-symbol/unique-symbol.ts.snap: -------------------------------------------------------------------------------- 1 | type A = unique symbol; 2 | type B = keyof something; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/decorators/export_default_4.js.snap: -------------------------------------------------------------------------------- 1 | @dec1 2 | @dec2 3 | @dec3 4 | @dec4 5 | export default class Foo {} 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/expression/binary_range_expression.js.snap: -------------------------------------------------------------------------------- 1 | 1 + 2 + <<>>3 + 4<<>> + 5 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/object/getter_setter.js.snap: -------------------------------------------------------------------------------- 1 | let a = { 2 | get foo() {}, 3 | }; 4 | let b = { 5 | set foo(a) {}, 6 | }; 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/object/object_comments.js: -------------------------------------------------------------------------------- 1 | let a = { // leading comment 2 | "type": "bar" 3 | // trailing comment 4 | } -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/script.js.snap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | "use strict"; 3 | "use asm"; 4 | var express = require("express"); 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/statement/return.js: -------------------------------------------------------------------------------- 1 | function f1() { 2 | return 1 3 | } 4 | 5 | function f2() { 6 | return 1,3,4 7 | } -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/string/parentheses_token.js.snap: -------------------------------------------------------------------------------- 1 | ("Jan 1, <<>>2018 – Jan 1, 2019<<>>"); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/script/script.js.snap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | "use strict"; 3 | "use asm"; 4 | var express = require("express"); 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/jsx/quote_style/quote_style.jsx: -------------------------------------------------------------------------------- 1 | ( 2 |
6 | "123" 7 |
8 | ) 9 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrows/issue-4166-curry.js: -------------------------------------------------------------------------------- 1 | const myCurriedFn = arg1 => 2 | arg2 => 3 | arg3 => arg1 + arg2 + arg3; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrows/issue-4166-curry.js.snap: -------------------------------------------------------------------------------- 1 | const myCurriedFn = (arg1) => (arg2) => (arg3) => arg1 + arg2 + arg3; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/module-blocks.js: -------------------------------------------------------------------------------- 1 | let m = module { 2 | export let m = 2; 3 | export let n = 3; 4 | }; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/bracket-spacing/object.js.snap: -------------------------------------------------------------------------------- 1 | const obj1 = { a: 1, b: 2, c: 3 }; 2 | const obj2 = { a: 1, b: 2, c: 3 }; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/class-comment/misc.js: -------------------------------------------------------------------------------- 1 | class x { 2 | focus() // comment 1 3 | { 4 | // comment 2 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/class-comment/misc.js.snap: -------------------------------------------------------------------------------- 1 | class x { 2 | focus() { 3 | // comment 1 4 | // comment 2 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/class-static-block/with-line-breaks.js: -------------------------------------------------------------------------------- 1 | class Foo { 2 | static 3 | { 4 | 1 + 1; 5 | } 6 | }; 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments-closure-typecast/iife-issue-5850-isolated.js: -------------------------------------------------------------------------------- 1 | const a = /** @param {*} b */ 2 | ((b) => {})(); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments-closure-typecast/iife-issue-5850-isolated.js.snap: -------------------------------------------------------------------------------- 1 | const a = /** @param {*} b */ ((b) => {})(); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments/multi-comments-on-same-line-2.js.snap: -------------------------------------------------------------------------------- 1 | /* 1 */ /* 2 */ /* 3 */ a; 2 | a; /* 4 */ /* 5 */ /* 6 */ 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/range-6.js.snap: -------------------------------------------------------------------------------- 1 | const myVar = <<>>aFunction;<|><<>> 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/cursor/range-7.js.snap: -------------------------------------------------------------------------------- 1 | const myVar = <<>>aFunction<|>;<<>> 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/comments.js: -------------------------------------------------------------------------------- 1 | class A { 2 | @dec() 3 | // comment 4 | accessor b; 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/comments.js.snap: -------------------------------------------------------------------------------- 1 | class A { 2 | @dec() 3 | // comment 4 | accessor b; 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorators/class-expression/arguments.js: -------------------------------------------------------------------------------- 1 | console.log(@deco class Foo {}) 2 | console.log(@deco class {}) 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorators/class-expression/member-expression.js: -------------------------------------------------------------------------------- 1 | (@deco class Foo {}).name; 2 | (@deco class {}).name; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/destructuring-private-fields/arrow-params.js: -------------------------------------------------------------------------------- 1 | class C { 2 | #x = 1; 3 | #p = ({ #x: x }) => {} 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/directives/newline.js.snap: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | "use strict"; 4 | 5 | import a from "a"; 6 | 7 | a(); 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-as-identifier-for-await-of.js.snap: -------------------------------------------------------------------------------- 1 | for await (using of of); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-binding-basic.js.snap: -------------------------------------------------------------------------------- 1 | { 2 | using basic = getReader(); 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/export-default/escaped/default-escaped.js: -------------------------------------------------------------------------------- 1 | // export asyn\u{63} from "async"; 2 | export n\u{63} from "async"; -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/ignore/class-expression-decorator.js: -------------------------------------------------------------------------------- 1 | ( 2 | // prettier-ignore 3 | @decorator 4 | class {} 5 | ); 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/ignore/class-expression-decorator.js.snap: -------------------------------------------------------------------------------- 1 | // prettier-ignore 2 | ( 3 | @decorator 4 | class {} 5 | ); 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/bracket-spacing/dynamic-import.js: -------------------------------------------------------------------------------- 1 | import("./foo.json", { assert: { type: "json" } }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/bracket-spacing/empty.js.snap: -------------------------------------------------------------------------------- 1 | export * as bar from "bar.json"; 2 | assert; 3 | { 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/multi-types.js: -------------------------------------------------------------------------------- 1 | import json from "./foo.json" assert { type: "json", type: "bar" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/bracket-spacing/dynamic-import.js: -------------------------------------------------------------------------------- 1 | import("./foo.json", { with: { type: "json" } }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/bracket-spacing/static-import.js: -------------------------------------------------------------------------------- 1 | import json from "./foo.json" with { type: "json" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/multi-types.js.snap: -------------------------------------------------------------------------------- 1 | import json from "./foo.json" with { type: "json", type: "bar" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/multiparser-comments/tagged.js.snap: -------------------------------------------------------------------------------- 1 | foo( 2 | html // oops 3 | `

bar

foo
`, 4 | ); 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/new-expression/call.js.snap: -------------------------------------------------------------------------------- 1 | new (factory())(); 2 | new factory()(); 3 | 4 | new (factory())(factory()); 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/objects/assignment-expression/object-property.js.snap: -------------------------------------------------------------------------------- 1 | a = { 2 | [this.resource = resource]: 1, 3 | }; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/issue-4206-4.js: -------------------------------------------------------------------------------- 1 | /* */ class Foo{ 2 | <<>>/**/ 3 | }<<>> 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/object-expression.js.snap: -------------------------------------------------------------------------------- 1 | const y = {<<>>a:1<<>>, b:2} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/regex/regexp-modifiers.js: -------------------------------------------------------------------------------- 1 | /(?ims:^[a-z])/u; 2 | /(?-ims:^[a-z].)(^[a-z].)/uims; 3 | /(?ims:^[a-z].1$)/; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sloppy-mode/eval-arguments-binding.js.snap: -------------------------------------------------------------------------------- 1 | function myfunc() { 2 | var eval; 3 | var arguments; 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/sloppy-mode/eval-arguments.js.snap: -------------------------------------------------------------------------------- 1 | function myfunc() { 2 | eval = 1; 3 | arguments = arguments; 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/v8_intrinsic/avoid-conflicts-to-pipeline.js.snap: -------------------------------------------------------------------------------- 1 | // |> 2 | const status = %GetOptimizationStatus(fn); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/attr-element/attr-element.js: -------------------------------------------------------------------------------- 1 | />; 2 | />; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/compiler/errorOnInitializerInInterfaceProperty.ts: -------------------------------------------------------------------------------- 1 | interface Foo { 2 | bar: number = 5; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/compiler/modifiersOnInterfaceIndexSignature1.ts: -------------------------------------------------------------------------------- 1 | interface I { 2 | [a: string]: number; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/classes/classDeclarations/classInsideBlock.ts: -------------------------------------------------------------------------------- 1 | function foo() { 2 | class C { } 3 | } -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/comments/comments.ts.snap: -------------------------------------------------------------------------------- 1 | /* http://www.site.com or http://www.site.com/page.html */ 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/internalModules/importDeclarations/exportInterface.ts.snap: -------------------------------------------------------------------------------- 1 | export interface I {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/parser/ecmascript5/Statements/parserForInStatement2.ts.snap: -------------------------------------------------------------------------------- 1 | for (var in X) { 2 | } 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/constKeyword/constKeyword.ts.snap: -------------------------------------------------------------------------------- 1 | const enum E { 2 | A, 3 | B, 4 | C, 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/enumDeclaration/enumDeclaration.ts.snap: -------------------------------------------------------------------------------- 1 | enum E { 2 | A, 3 | B, 4 | C, 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/lastTypeNode/lastTypeNode.ts: -------------------------------------------------------------------------------- 1 | function x3(callback: (x?: 'hi') => number) {}; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/moduleDeclaration/kind-detection.ts.snap: -------------------------------------------------------------------------------- 1 | declare namespace /* module */ A {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/undefined/undefined.ts.snap: -------------------------------------------------------------------------------- 1 | var x: undefined; 2 | var x: undefined | string; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/variableDeclarator/variableDeclarator.ts.snap: -------------------------------------------------------------------------------- 1 | type MyMap = Map; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/export-default/function_as.ts.snap: -------------------------------------------------------------------------------- 1 | export default (function log() {} as typeof console.log); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/intersection/consistent-with-flow/comment.ts: -------------------------------------------------------------------------------- 1 | type A1 = /* 4 */ ( 2 | & A 3 | & B 4 | )[] 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/rest-type/complex.ts.snap: -------------------------------------------------------------------------------- 1 | type TupleWithRest = [number, ...(1 extends 2 ? string[] : number[])]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/type-arguments-bit-shift-left-like/4.ts.snap: -------------------------------------------------------------------------------- 1 | ( 2 | @f<(v: T) => void>() 3 | class {} 4 | ); 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/array/spaces.js: -------------------------------------------------------------------------------- 1 | let a = [,]; 2 | let b = [,,]; 3 | let c = [,,1,]; 4 | let d = [,,1,1]; 5 | let e = [2,2,1,3]; 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/expression/literal_expression.js.snap: -------------------------------------------------------------------------------- 1 | "a"; 2 | 1; 3 | 45n; 4 | true; 5 | false; 6 | null; 7 | /[/]\/\u0aBc/gim; 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/async/parens.js: -------------------------------------------------------------------------------- 1 | async function *f(){ await (yield x); } 2 | 3 | async function f2(){ await (() => {}); } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/decorator-auto-accessors.js: -------------------------------------------------------------------------------- 1 | class C extends HTMLElement { 2 | accessor clicked = false; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/module-blocks.js.snap: -------------------------------------------------------------------------------- 1 | let m = module; 2 | { 3 | export let m = 2; 4 | export let n = 3; 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/call/first-argument-expansion/.jsx.js: -------------------------------------------------------------------------------- 1 | content 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments/emoji.js: -------------------------------------------------------------------------------- 1 | /* #2091 */ 2 | 3 | const test = '💖' 4 | // This comment 5 | // should not get collapsed 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorators-export/after_export.js: -------------------------------------------------------------------------------- 1 | export @decorator class Foo {} 2 | 3 | export default @decorator class {} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-as-identifier-expression-statement.js: -------------------------------------------------------------------------------- 1 | using 2 | reader = getReader() 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/bracket-spacing/dynamic-import.js.snap: -------------------------------------------------------------------------------- 1 | import("./foo.json", { assert: { type: "json" } }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/bracket-spacing/static-import.js: -------------------------------------------------------------------------------- 1 | import json from "./foo.json" assert { type: "json" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/non-type.js.snap: -------------------------------------------------------------------------------- 1 | import foo from "foo.json"; 2 | assert; 3 | { 4 | lazy: "true"; 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/bracket-spacing/dynamic-import.js.snap: -------------------------------------------------------------------------------- 1 | import("./foo.json", { with: { type: "json" } }); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/bracket-spacing/static-import.js.snap: -------------------------------------------------------------------------------- 1 | import json from "./foo.json" with { type: "json" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-reflection/valid-module-as-default-binding-2.mjs: -------------------------------------------------------------------------------- 1 | import module, { createRequire } from "node:module"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/method-chain/issue-11298.js: -------------------------------------------------------------------------------- 1 | foo1(/𠮟𠮟𠮟/).foo2(bar).foo3(baz); 2 | 3 | foo1(/叱叱叱/).foo2(bar).foo3(baz); 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/multiparser-html/language-comment/not-language-comment.js: -------------------------------------------------------------------------------- 1 | const html /* HTML */ = `
2 | 3 |
`; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/object-colon-bug/bug.js: -------------------------------------------------------------------------------- 1 | const foo = { 2 | bar: props.bar ? props.bar : noop, 3 | baz: props.baz 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/issue-4206-3.js: -------------------------------------------------------------------------------- 1 | /* */ function F<<>>oo(){ 2 | /**/ 3 | }<<>> 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/try-catch.js.snap: -------------------------------------------------------------------------------- 1 | try {} 2 | <<>>c<<>>atch (err) 3 | { 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/regex/regexp-modifiers.js.snap: -------------------------------------------------------------------------------- 1 | /(?ims:^[a-z])/u; 2 | /(?-ims:^[a-z].)(^[a-z].)/imsu; 3 | /(?ims:^[a-z].1$)/; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/jsx/flow_fix_me.js.snap: -------------------------------------------------------------------------------- 1 | const aDiv = ( 2 | /* $FlowFixMe */ 3 |
Foo bar
4 | ); 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/as/return.ts: -------------------------------------------------------------------------------- 1 | function foo() { 2 | return { 3 | foo: 1, 4 | bar: 2, 5 | } as Foo; 6 | } 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/as/return.ts.snap: -------------------------------------------------------------------------------- 1 | function foo() { 2 | return { 3 | foo: 1, 4 | bar: 2, 5 | } as Foo; 6 | } 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/compiler/commentsInterface.ts: -------------------------------------------------------------------------------- 1 | interface i2 { 2 | foo: (/**param help*/b: number) => string; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/compiler/errorOnInitializerInInterfaceProperty.ts.snap: -------------------------------------------------------------------------------- 1 | interface Foo { 2 | bar: number = 5 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/compiler/modifiersOnInterfaceIndexSignature1.ts.snap: -------------------------------------------------------------------------------- 1 | interface I { 2 | [a: string]: number; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/classes/classDeclarations/classInsideBlock.ts.snap: -------------------------------------------------------------------------------- 1 | function foo() { 2 | class C {} 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/lastTypeNode/lastTypeNode.ts.snap: -------------------------------------------------------------------------------- 1 | function x3(callback: (x?: "hi") => number) {} 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/tuple/tupleElementTypes1.ts: -------------------------------------------------------------------------------- 1 | var [a, b]: [number, any] = [undefined, undefined]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/tuple/wideningTuples5.ts: -------------------------------------------------------------------------------- 1 | //@noImplicitAny: true 2 | var [a, b] = [undefined, null]; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/tuple/wideningTuples6.ts: -------------------------------------------------------------------------------- 1 | var [a, b] = [undefined, null]; 2 | a = ""; 3 | b = ""; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/declare/declare-get-set-field.ts: -------------------------------------------------------------------------------- 1 | class C { 2 | declare get: string 3 | declare set: string; 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/declare/declare_module.ts: -------------------------------------------------------------------------------- 1 | declare module m { 2 | class C { 3 | field = "field"; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/declare/declare_module.ts.snap: -------------------------------------------------------------------------------- 1 | declare module m { 2 | class C { 3 | field = "field"; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/export/export-type-star-from.ts: -------------------------------------------------------------------------------- 1 | export type * from './mod'; 2 | export type * as ns from './mod'; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/interface2/comments-declare.ts: -------------------------------------------------------------------------------- 1 | declare interface a // 1 2 | extends b // 2 3 | { foo: boolean} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/interface2/module.ts.snap: -------------------------------------------------------------------------------- 1 | declare module X { 2 | declare interface Y { 3 | x: number; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/mapped-type/intersection.ts: -------------------------------------------------------------------------------- 1 | type Example = { 2 | [A in B]: T; 3 | } & { 4 | [A in B]: T; 5 | }; 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/prettier-ignore/issue-14238.ts.snap: -------------------------------------------------------------------------------- 1 | export const foo = 2 | // prettier-ignore 3 | (bar as Baz).qux; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/declaration/global_declaration.ts.snap: -------------------------------------------------------------------------------- 1 | declare module "./test" { 2 | global { 3 | let VERSION: string; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/declare.ts.snap: -------------------------------------------------------------------------------- 1 | declare module "remark-html"; 2 | declare module "other"; 3 | 4 | declare module "remark-html" {} 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/parenthesis.ts: -------------------------------------------------------------------------------- 1 | const a = (c && b) as boolean; 2 | const a = (c && b) as boolean; 3 | const a = !(c && b) as boolean; -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/suppressions.ts.snap: -------------------------------------------------------------------------------- 1 | interface Suppressions { 2 | // rome-ignore format: test 3 | a: void; 4 | 5 | b: void; 6 | } 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/number/number_with_space.js: -------------------------------------------------------------------------------- 1 | 123 .toString 2 | 123 3 | /****/.toString 4 | 123/**/.toString 5 | 123 6 | .toString 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/object/object_comments.js.snap: -------------------------------------------------------------------------------- 1 | let a = { 2 | // leading comment 3 | type: "bar", 4 | // trailing comment 5 | }; 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/statement/return.js.snap: -------------------------------------------------------------------------------- 1 | function f1() { 2 | return 1; 3 | } 4 | 5 | function f2() { 6 | return 1, 3, 4; 7 | } 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/decorator-auto-accessors.js.snap: -------------------------------------------------------------------------------- 1 | class C extends HTMLElement { 2 | accessor clicked = false; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/typescript.js: -------------------------------------------------------------------------------- 1 | // https://babeljs.io/docs/en/babel-preset-typescript 2 | 3 | const x: number = 0; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes-private-fields/optional-chaining.js: -------------------------------------------------------------------------------- 1 | // https://github.com/babel/babel/pull/11669 2 | 3 | delete obj?.#x.a 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/method.js.snap: -------------------------------------------------------------------------------- 1 | class C { 2 | name /*comment*/() {} 3 | } 4 | 5 | ({ 6 | name /*comment*/() {}, 7 | }); 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/comments/emoji.js.snap: -------------------------------------------------------------------------------- 1 | /* #2091 */ 2 | 3 | const test = "💖"; 4 | // This comment 5 | // should not get collapsed 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/conditional/no-confusing-arrow.js: -------------------------------------------------------------------------------- 1 | // no-confusing-arrow 2 | var x = a => 1 ? 2 : 3; 3 | var x = a <= 1 ? 2 : 3; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/with-semicolon-1.js: -------------------------------------------------------------------------------- 1 | class C { 2 | accessor clicked = "value"; 3 | [foo]() {} 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/with-semicolon-1.js.snap: -------------------------------------------------------------------------------- 1 | class C { 2 | accessor clicked = "value"; 3 | [foo]() {} 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/with-semicolon-2.js: -------------------------------------------------------------------------------- 1 | class C { 2 | accessor clicked = "value"; 3 | *foo() {} 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorator-auto-accessors/with-semicolon-2.js.snap: -------------------------------------------------------------------------------- 1 | class C { 2 | accessor clicked = "value"; 3 | *foo() {} 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/destructuring/issue-5988.js: -------------------------------------------------------------------------------- 1 | const { foo, bar: bazAndSomething, quxIsLong } = someBigFunctionName("foo")("bar"); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-await-expr-using-in.js: -------------------------------------------------------------------------------- 1 | async function f() { 2 | await using in foo; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-module-block-top-level-using-binding.js: -------------------------------------------------------------------------------- 1 | module { 2 | using foo = bar(); 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-as-identifier-for-init.js.snap: -------------------------------------------------------------------------------- 1 | for (using; (reader = getReader()); ); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/function/issue-10277.js: -------------------------------------------------------------------------------- 1 | (fold => fold)(fmap => algebra => function doFold(v) {return algebra(fmap(doFold)(v))}) 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/bracket-spacing/re-export.js: -------------------------------------------------------------------------------- 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-assertions/static-import.js.snap: -------------------------------------------------------------------------------- 1 | import json from "./foo.json"; 2 | assert; 3 | { 4 | type: "json"; 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/bracket-spacing/re-export.js: -------------------------------------------------------------------------------- 1 | export { default as foo2 } from "foo.json" with { type: "json" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-reflection/comments.js: -------------------------------------------------------------------------------- 1 | /* 0 */import /* 1 */module /* 2 */from /* 3 */from /* 4 */"./module.wasm"/* 5 */; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-reflection/valid-from-as-default-module-binding-escaped.mjs: -------------------------------------------------------------------------------- 1 | import module \u0066rom from "./module.wasm"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-reflection/valid-module-as-default-binding-2.mjs.snap: -------------------------------------------------------------------------------- 1 | import module, { createRequire } from "node:module"; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/last-argument-expansion/dangling-comment-in-arrow-function.js: -------------------------------------------------------------------------------- 1 | foo( 2 | ( 3 | // foo 4 | ) => {} 5 | ); 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/last-argument-expansion/dangling-comment-in-arrow-function.js.snap: -------------------------------------------------------------------------------- 1 | foo( 2 | ( 3 | // foo 4 | ) => {}, 5 | ); 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/method-chain/break-multiple.js: -------------------------------------------------------------------------------- 1 | object.foo().bar().baz(); 2 | 3 | foo().bar().baz(); 4 | 5 | foo().bar.baz(); 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/multiparser-html/language-comment/not-language-comment.js.snap: -------------------------------------------------------------------------------- 1 | const html /* HTML */ = `
2 | 3 |
`; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/numeric-separators/number.js: -------------------------------------------------------------------------------- 1 | // https://github.com/babel/babel/pull/11854 2 | 3 | a = 09e1_1; 4 | a = 09.1_1; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/object-colon-bug/bug.js.snap: -------------------------------------------------------------------------------- 1 | const foo = { 2 | bar: props.bar ? props.bar : noop, 3 | baz: props.baz, 4 | }; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/issue-4206-1.js: -------------------------------------------------------------------------------- 1 | export default c<<>>lass Foo{ 2 | /**/<<>> 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/trailing-comma/jsx.js.snap: -------------------------------------------------------------------------------- 1 |
3 | doSomething({ 4 | foo: bar, 5 | }) 6 | } 7 | />; 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/try/empty.js: -------------------------------------------------------------------------------- 1 | try { 2 | } catch (e) { 3 | } 4 | finally { 5 | } 6 | 7 | try { 8 | } catch (e) { 9 | } 10 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/yield/jsx.js: -------------------------------------------------------------------------------- 1 | function* f() { 2 | yield (
generator
) 3 | yield (

generator

) 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/namespace/jsx_namespaced_name.js: -------------------------------------------------------------------------------- 1 | ; 2 | 3 | 1; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/abstract-class/export-default.ts.snap: -------------------------------------------------------------------------------- 1 | export default abstract class C5 { 2 | abstract foo(): void; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/catch-clause/type-annotation.ts: -------------------------------------------------------------------------------- 1 | try {} catch (e: any) 2 | {} 3 | 4 | try {} 5 | catch (e: unknown) {} 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/comments/jsx.ts.snap: -------------------------------------------------------------------------------- 1 | var example1 =
https://test
; 2 | 3 | var example2 =
/*test*/
; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/comments/jsx.tsx.snap: -------------------------------------------------------------------------------- 1 | var example1 =
https://test
; 2 | 3 | var example2 =
/*test*/
; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/compiler/commentsInterface.ts.snap: -------------------------------------------------------------------------------- 1 | interface i2 { 2 | foo: (/**param help*/ b: number) => string; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/functions/functionTypeTypeParameters.ts: -------------------------------------------------------------------------------- 1 | type FuncWithTypeParameter = () => {}; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/importEqualsDeclaration/importEqualsDeclaration.ts: -------------------------------------------------------------------------------- 1 | import glo_m4 = require("glo_m4"); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/indexedAccesType/indexedAccesType.ts: -------------------------------------------------------------------------------- 1 | const a: Foo['bar'] = { 2 | baz: 'yawp' 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/tuple/tupleElementTypes1.ts.snap: -------------------------------------------------------------------------------- 1 | var [a, b]: [number, any] = [undefined, undefined]; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/tuple/wideningTuples5.ts.snap: -------------------------------------------------------------------------------- 1 | //@noImplicitAny: true 2 | var [a, b] = [undefined, null]; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/tuple/wideningTuples6.ts.snap: -------------------------------------------------------------------------------- 1 | var [a, b] = [undefined, null]; 2 | a = ""; 3 | b = ""; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/typeReference/typeReference.ts: -------------------------------------------------------------------------------- 1 | let n: Promise 2 | let m: Map 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/custom/module/global.ts.snap: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Event { 3 | persist: Function; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/declare/declare-get-set-field.ts.snap: -------------------------------------------------------------------------------- 1 | class C { 2 | declare get: string; 3 | declare set: string; 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/declare/declare_namespace.ts: -------------------------------------------------------------------------------- 1 | declare namespace m { 2 | class C { 3 | field = "field"; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/declare/declare_namespace.ts.snap: -------------------------------------------------------------------------------- 1 | declare namespace m { 2 | class C { 3 | field = "field"; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/export/export-type-star-from.ts.snap: -------------------------------------------------------------------------------- 1 | export type * from "./mod"; 2 | export type * as ns from "./mod"; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/mapped-type/intersection.ts.snap: -------------------------------------------------------------------------------- 1 | type Example = { 2 | [A in B]: T; 3 | } & { 4 | [A in B]: T; 5 | }; 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/prettier-ignore/issue-14238.ts: -------------------------------------------------------------------------------- 1 | export const foo = ( 2 | // prettier-ignore 3 | bar as Baz 4 | ).qux; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/prettier-ignore/prettier-ignore-parenthesized-type.ts.snap: -------------------------------------------------------------------------------- 1 | type Foo = 2 | // prettier-ignore 3 | aa; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/satisfies-operators/export-default-as.ts: -------------------------------------------------------------------------------- 1 | export default (function log() {} satisfies typeof console.log) 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/declare.ts: -------------------------------------------------------------------------------- 1 | declare module 'remark-html' ; 2 | declare module 'other' 3 | 4 | declare module 'remark-html' { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/module/external_module_reference.ts: -------------------------------------------------------------------------------- 1 | import name = require('module_source'); 2 | 3 | import name2 = require('other_source') 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/suppressions.ts: -------------------------------------------------------------------------------- 1 | 2 | interface Suppressions { 3 | // rome-ignore format: test 4 | a: void 5 | 6 | b: void 7 | } -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/type/mapped_type.ts: -------------------------------------------------------------------------------- 1 | type LongNameHereToCauseLineBreak_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ={ [K in "foo"]: string }; -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/export/function_clause.js: -------------------------------------------------------------------------------- 1 | export function f() { 2 | 3 | 4 | } 5 | 6 | 7 | export default function ff() { 8 | 9 | } -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/no-semi/semicolons_range.js: -------------------------------------------------------------------------------- 1 | statement_1() 2 | <<>>statement_2()<<>> 3 | statement_3() 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/number/number_with_space.js.snap: -------------------------------------------------------------------------------- 1 | (123).toString; 2 | /****/ (123).toString; 3 | (123) /**/.toString; 4 | (123).toString; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/object/octal_literals_key.js: -------------------------------------------------------------------------------- 1 | const x = { 2 | 8: 'yay', 3 | 01: 'one', 4 | '0': 'zero', 5 | '010': 'oh no', 6 | }; 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrows-bind/arrows-bind.js.snap: -------------------------------------------------------------------------------- 1 | a => ({} 2 | ::b()``[''].c++ && 0 ? 0 : 0) 3 | (a) => b; 4 | ::c 5 | a: 6 | :(b => c) 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/arrows/long-call-no-args.js: -------------------------------------------------------------------------------- 1 | veryLongCall(VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, () => {}) 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/assignment/issue-7091.js: -------------------------------------------------------------------------------- 1 | const { 2 | imStore, showChat, customerServiceAccount 3 | } = store[config.reduxStoreName] 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/assignment/issue-7091.js.snap: -------------------------------------------------------------------------------- 1 | const { imStore, showChat, customerServiceAccount } = 2 | store[config.reduxStoreName]; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/typescript.js.snap: -------------------------------------------------------------------------------- 1 | // https://babeljs.io/docs/en/babel-preset-typescript 2 | 3 | const x: number = 0; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/binary.js: -------------------------------------------------------------------------------- 1 | (class {}) + 1; 2 | (class a {}) + 1; 3 | (class extends b {}) + 1; 4 | (class a extends b {}) + 1; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/decorators-export/before_export.js: -------------------------------------------------------------------------------- 1 | @decorator 2 | export class Foo {} 3 | 4 | @decorator 5 | export default class {} 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/destructuring-private-fields/arrow-params.js.snap: -------------------------------------------------------------------------------- 1 | class C { 2 | #x = 1; 3 | #p = ({ #x: x }) 4 | => { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/destructuring-private-fields/async-arrow-params.js: -------------------------------------------------------------------------------- 1 | class C { 2 | #x = 1; 3 | #p = async ({ #x: x }) => {} 4 | } 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-await-expr-using-in.js.snap: -------------------------------------------------------------------------------- 1 | async function f() { 2 | (await using) in foo; 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-as-identifier-computed-member.js: -------------------------------------------------------------------------------- 1 | using [x] = 0; 2 | for (using [x] of []); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-as-identifier-computed-member.js.snap: -------------------------------------------------------------------------------- 1 | using[x] = 0; 2 | for (using[x] of []); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-as-identifier-expression-statement.js.snap: -------------------------------------------------------------------------------- 1 | using; 2 | reader = getReader(); 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/explicit-resource-management/valid-using-as-identifier-for-init.js: -------------------------------------------------------------------------------- 1 | for ( 2 | using; 3 | reader = getReader();); 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/for/for.js: -------------------------------------------------------------------------------- 1 | for (;;) {} 2 | for (var i = 0; i < 10; ++i) {} 3 | 4 | for (;;) 0; 5 | for (var i = 0; i < 10; ++i) 0; 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/ignore/issue-14404.js.snap: -------------------------------------------------------------------------------- 1 | async function foo() { 2 | // prettier-ignore 3 | // b 4 | (await thing()).blah; 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-attributes/bracket-spacing/re-export.js.snap: -------------------------------------------------------------------------------- 1 | export { default as foo2 } from "foo.json" with { type: "json" }; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-reflection/valid-default-import.mjs: -------------------------------------------------------------------------------- 1 | import module foo from "./module.wasm"; 2 | import bar from "./module.wasm"; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import-reflection/valid-from-as-default-module-binding.mjs.snap: -------------------------------------------------------------------------------- 1 | import module from 2 | from; 3 | ("./module.wasm"); 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/import/long-line.js: -------------------------------------------------------------------------------- 1 | import someCoolUtilWithARatherLongName from '../../../../utils/someCoolUtilWithARatherLongName'; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/in/arrow-function.js: -------------------------------------------------------------------------------- 1 | const x = () => [].includes(true) || "ontouchend" in document 2 | 3 | const y = () => [] in x 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/method-chain/bracket_0-1.js: -------------------------------------------------------------------------------- 1 | const thingamabobMetaAlias = 2 | path.scope.getProgramParent().path.get("body")[0].node; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/method-chain/break-multiple.js.snap: -------------------------------------------------------------------------------- 1 | object.foo().bar().baz(); 2 | 3 | foo().bar().baz(); 4 | 5 | foo().bar.baz(); 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/numeric-separators/number.js.snap: -------------------------------------------------------------------------------- 1 | // https://github.com/babel/babel/pull/11854 2 | 3 | a = 09e1_1; 4 | a = 09.1_1; 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/quotes/functions.js: -------------------------------------------------------------------------------- 1 | const a = () => "Foo bar"; 2 | 3 | function b(object, key) { 4 | return object['key']; 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/quotes/functions.js.snap: -------------------------------------------------------------------------------- 1 | const a = () => "Foo bar"; 2 | 3 | function b(object, key) { 4 | return object["key"]; 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/array.js: -------------------------------------------------------------------------------- 1 | a = [ 2 | , 3 | <<>>,,,, 4 | 5 | , 6 | <<>> 7 | , 8 | a, 9 | ] -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/function-body.js: -------------------------------------------------------------------------------- 1 | let fn =a((x ) => { 2 | <<>> quux (); //<<>> 3 | }); 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/issue-4206-1.js.snap: -------------------------------------------------------------------------------- 1 | export default c<<>>lass Foo{ 2 | /**/<<>> 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/range/issue-4206-2.js: -------------------------------------------------------------------------------- 1 | export default f<<>>unction Foo(){<<>> 2 | /**/ 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/trailing-comma/jsx.js: -------------------------------------------------------------------------------- 1 |
3 | doSomething({ 4 | foo: bar 5 | }) 6 | } 7 | />; 8 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/yield/arrow.js: -------------------------------------------------------------------------------- 1 | function *f() { 2 | (yield a => a); 3 | (yield async a => a); 4 | (yield async (a) => a); 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/yield/arrow.js.snap: -------------------------------------------------------------------------------- 1 | function* f() { 2 | yield (a) => a; 3 | yield async (a) => a; 4 | yield async (a) => a; 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/jsx/regex.js: -------------------------------------------------------------------------------- 1 | x =
one
,
two
; 2 | x =
{} 3 | x = {1/2} 4 | x = {/w/.test(s)} 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/namespace/jsx_namespaced_name.js.snap: -------------------------------------------------------------------------------- 1 | ; 2 | 3 | 1; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/jsx/tuple/tuple.js: -------------------------------------------------------------------------------- 1 | a = [ 2 |
, 3 |
, 4 | ] 5 | 6 | a = #[ 7 |
, 8 |
, 9 | ] 10 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/catch-clause/type-annotation.ts.snap: -------------------------------------------------------------------------------- 1 | try { 2 | } catch (e: any) {} 3 | 4 | try { 5 | } catch (e: unknown) {} 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/comments-2/dangling.ts: -------------------------------------------------------------------------------- 1 | 2 | Thing?.(/* dangling */); 3 | declare class Foo extends Qux {/* dangling */} 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/comments/types.ts: -------------------------------------------------------------------------------- 1 | (() => { 2 | // swallow error and fallback to using directory as path 3 | }) as string[]; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/classes/abstract.ts: -------------------------------------------------------------------------------- 1 | abstract class AbstractSocket { 2 | createSocket?(): Promise 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts: -------------------------------------------------------------------------------- 1 | //@target: ES5 2 | for (var of X) { 3 | } 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts: -------------------------------------------------------------------------------- 1 | //@target: ES5 2 | for (var of of) { } 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/functions/TSFunctionTypeNoUnnecessaryParentheses.ts: -------------------------------------------------------------------------------- 1 | class Foo { 2 | bar: (() => boolean); 3 | } -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/functions/functionTypeTypeParameters.ts.snap: -------------------------------------------------------------------------------- 1 | type FuncWithTypeParameter = () => {}; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/importEqualsDeclaration/importEqualsDeclaration.ts.snap: -------------------------------------------------------------------------------- 1 | import glo_m4 = require("glo_m4"); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/indexedAccesType/indexedAccesType.ts.snap: -------------------------------------------------------------------------------- 1 | const a: Foo["bar"] = { 2 | baz: "yawp", 3 | }; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/conformance/types/typeReference/typeReference.ts.snap: -------------------------------------------------------------------------------- 1 | let n: Promise; 2 | let m: Map; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/custom/module/global.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Event { 3 | persist: Function 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/custom/module/nestedNamespace.ts.snap: -------------------------------------------------------------------------------- 1 | namespace X { 2 | export namespace Y {} 3 | } 4 | 5 | namespace X.Y {} 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/destructuring/destructuring.ts: -------------------------------------------------------------------------------- 1 | ({ foo = [] } = bar); 2 | 3 | function f({ x }?) {} 4 | function g([ x ]?) {} 5 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/generic/object-method.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | load(k: K, t: T) { 3 | return {k, t}; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/readonly/array.ts: -------------------------------------------------------------------------------- 1 | declare const array: readonly number[]; 2 | declare const tuple: readonly [number, number]; 3 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/satisfies-operators/export-default-as.ts.snap: -------------------------------------------------------------------------------- 1 | export default (function log() {} satisfies typeof console.log); 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/typescript/type-alias/issue-9874.ts: -------------------------------------------------------------------------------- 1 | export type RequestNextDealAction = BaseAction; 2 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/ts/parenthesis.ts.snap: -------------------------------------------------------------------------------- 1 | const a = (c && b) as boolean; 2 | const a = (c && b) as boolean; 3 | const a = !(c && b) as boolean; 4 | -------------------------------------------------------------------------------- /.taplo.toml: -------------------------------------------------------------------------------- 1 | # https://taplo.tamasfe.dev/configuration/formatter-options.html 2 | [formatting] 3 | align_entries = true 4 | indent_tables = true 5 | reorder_keys = true 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/array/empty_lines.js: -------------------------------------------------------------------------------- 1 | let a = [ 2 | 3 | 1, 4 | 2, 5 | 6 | 3, 7 | 8 | 9 | 4, 10 | 11 | 12 | ]; 13 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/array/spaces.js.snap: -------------------------------------------------------------------------------- 1 | let a = [,]; 2 | let b = [, ,]; 3 | let c = [, , 1]; 4 | let d = [, , 1, 1]; 5 | let e = [2, 2, 1, 3]; 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/export/named_clause.js.snap: -------------------------------------------------------------------------------- 1 | export { 2 | // the boo api 3 | boo, 4 | // the buzz api is now bar!! 5 | buzz as bar, 6 | }; 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/js/module/object/octal_literals_key.js.snap: -------------------------------------------------------------------------------- 1 | const x = { 2 | 8: "yay", 3 | 01: "one", 4 | "0": "zero", 5 | "010": "oh no", 6 | }; 7 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/babel-plugins/import-assertions-static.js.snap: -------------------------------------------------------------------------------- 1 | import json from "./foo.json"; 2 | assert; 3 | { 4 | type: "json"; 5 | } 6 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes-private-fields/optional-chaining.js.snap: -------------------------------------------------------------------------------- 1 | // https://github.com/babel/babel/pull/11669 2 | 3 | delete obj?.#x.a; 4 | -------------------------------------------------------------------------------- /crates/biome_fmt/test_data/specs/prettier/js/classes/binary.js.snap: -------------------------------------------------------------------------------- 1 | (class {}) + 1; 2 | (class a {}) + 1; 3 | (class extends b {}) + 1; 4 | (class a extends b {}) + 1; 5 | --------------------------------------------------------------------------------