Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: prettier/prettier
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.2.4
Choose a base ref
...
head repository: prettier/prettier
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.2.5
Choose a head ref

Commits on Jan 17, 2024

  1. Copy the full SHA
    b77b958 View commit details
  2. Git blame ignore 3.2.4

    fisker committed Jan 17, 2024
    Copy the full SHA
    251bae2 View commit details
  3. Clean changelog_unreleased

    fisker committed Jan 17, 2024
    Copy the full SHA
    ae6578e View commit details
  4. Fix yarn.lock

    fisker committed Jan 17, 2024
    Copy the full SHA
    696070e View commit details

Commits on Jan 18, 2024

  1. chore(deps): update xalvarez/prevent-file-change-action action to v1.…

    …6.0 (#15955)
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 18, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    677f1e9 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ed23dac View commit details

Commits on Jan 19, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6eda34d View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ae6ac79 View commit details
  3. Remove import/extensions (#15961)

    fisker authored Jan 19, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4b1965a View commit details

Commits on Jan 21, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2fe7f41 View commit details
  2. Fix schema (#15962)

    fisker authored Jan 21, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    91a2e25 View commit details

Commits on Jan 23, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    678de02 View commit details

Commits on Jan 26, 2024

  1. chore(deps): update dependency @babel/types to v7.23.9 (#15988)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 26, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7c76a20 View commit details
  2. Add GitHub sponsor info (#15975)

    Co-authored-by: fisker Cheung <lionkay@gmail.com>
    JounQin and fisker authored Jan 26, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4fc53e1 View commit details
  3. chore(deps): update dependency @babel/parser to v7.23.9 (#15987)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 26, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6fa4278 View commit details
  4. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b267831 View commit details

Commits on Jan 28, 2024

  1. chore(deps): update dependency espree to v10 (#15992)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 28, 2024
    Copy the full SHA
    2622683 View commit details
  2. Copy the full SHA
    a9b2e0f View commit details
  3. Copy the full SHA
    09024ba View commit details

Commits on Jan 30, 2024

  1. chore(deps): update dependency browserslist to v4.22.3 (#15997)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 30, 2024
    Copy the full SHA
    5cbc77c View commit details
  2. chore(deps): update dependency esbuild-plugins-node-modules-polyfill …

    …to v1.6.2 (#15995)
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 30, 2024
    Copy the full SHA
    f5e3393 View commit details

Commits on Feb 3, 2024

  1. chore(deps): update dependency esbuild to v0.20.0 (#15996)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 3, 2024
    Copy the full SHA
    a8d7d5b View commit details
  2. Keep using jsonc ourself

    fisker authored Feb 3, 2024
    Copy the full SHA
    7c6661d View commit details
  3. Use "json" parser for tsconfig.json by default (#16012)

    Co-authored-by: fisker Cheung <lionkay@gmail.com>
    sosukesuzuki and fisker authored Feb 3, 2024
    Copy the full SHA
    cc6435c View commit details
  4. chore(deps): update dependency ignore to v5.3.1 (#16016)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 3, 2024
    Copy the full SHA
    41d05ad View commit details
  5. chore(deps): update dependency c8 to v9.1.0 (#16019)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 3, 2024
    Copy the full SHA
    6ee0004 View commit details
  6. chore(deps): update dependency hermes-parser to v0.19.0 (#16014)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: fisker <lionkay@gmail.com>
    renovate[bot] and fisker authored Feb 3, 2024
    Copy the full SHA
    014ee5d View commit details
  7. chore(deps): update dependency npm-run-all2 to v6.1.2 (#16017)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 3, 2024
    Copy the full SHA
    02865f6 View commit details
  8. chore(deps): update typescript-eslint to v6.20.0 (#16015)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 3, 2024
    Copy the full SHA
    e2250ec View commit details
  9. chore(deps): update dependency @angular/compiler to v17.1.2 (#16018)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: fisker <lionkay@gmail.com>
    renovate[bot] and fisker authored Feb 3, 2024
    Copy the full SHA
    c8ba8db View commit details
  10. Copy the full SHA
    6d0b1d2 View commit details
  11. Update install script for husky v9 (#16000)

    Co-authored-by: fisker Cheung <lionkay@gmail.com>
    ohaddahan and fisker authored Feb 3, 2024
    Copy the full SHA
    08f1940 View commit details
  12. Copy the full SHA
    9fb32a1 View commit details
  13. chore(deps): update dependency magic-string to v0.30.6 (#16022)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 3, 2024
    Copy the full SHA
    45baee0 View commit details
  14. chore(deps): update glimmer to v0.88.1 (#15991)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: fisker <lionkay@gmail.com>
    renovate[bot] and fisker authored Feb 3, 2024
    Copy the full SHA
    8cbee2e View commit details

Commits on Feb 4, 2024

  1. Release 3.2.5

    sosukesuzuki committed Feb 4, 2024
    Copy the full SHA
    7142cf3 View commit details
Showing 1,319 changed files with 6,505 additions and 4,578 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@
# See https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt

# Prettier bump after release
# 3.2.4
b77b958aecba1d230bd73ce308bdb70163a1c231
# 3.2.3
4985be553e911fef7d83f3341eb143c443473c58
# 3.2.2
2 changes: 0 additions & 2 deletions .github/FUNDING.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/formatting.md
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ Don't fill the form below manually! Let a program create a report for you:
-->

**Prettier 3.2.4**
**Prettier 3.2.5**
[Playground link](https://prettier.io/playground/#.....)

```sh
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/integration.md
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ BEFORE SUBMITTING AN ISSUE:

**Environments:**

- Prettier Version: 3.2.4
- Prettier Version: 3.2.5
- Running Prettier via: <!-- CLI, Node.js API, Browser API, etc. -->
- Runtime: <!-- Node.js v14, Chrome v83, etc. -->
- Operating System: <!-- Windows, Linux, macOS, etc. -->
2 changes: 1 addition & 1 deletion .github/workflows/prevent-file-change.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Prevent file change
uses: xalvarez/prevent-file-change-action@v1.5.1
uses: xalvarez/prevent-file-change-action@v1.6.0
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
pattern: website/data/users.yml
4 changes: 3 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@ overrides:
- files: "bin/prettier.cjs"
options:
trailingComma: none
- files: ".vscode/*.json"
- files:
- ".vscode/*.json"
- "tsconfig.json"
options:
parser: jsonc
672 changes: 336 additions & 336 deletions .yarn/releases/yarn-4.0.2.cjs → .yarn/releases/yarn-4.1.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -9,4 +9,4 @@ nodeLinker: node-modules
plugins:
- .yarn/plugins/plugin-setup-editor.cjs

yarnPath: .yarn/releases/yarn-4.0.2.cjs
yarnPath: .yarn/releases/yarn-4.1.0.cjs
104 changes: 104 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,107 @@
# 3.2.5

[diff](https://github.com/prettier/prettier/compare/3.2.4...3.2.5)

#### Support Angular inline styles as single template literal ([#15968](https://github.com/prettier/prettier/pull/15968) by [@sosukesuzuki](https://github.com/sosukesuzuki))

[Angular v17](https://blog.angular.io/introducing-angular-v17-4d7033312e4b) supports single string inline styles.

<!-- prettier-ignore -->
```ts
// Input
@Component({
template: `<div>...</div>`,
styles: `h1 { color: blue; }`,
})
export class AppComponent {}

// Prettier 3.2.4
@Component({
template: `<div>...</div>`,
styles: `h1 { color: blue; }`,
})
export class AppComponent {}

// Prettier 3.2.5
@Component({
template: `<div>...</div>`,
styles: `
h1 {
color: blue;
}
`,
})
export class AppComponent {}

```

#### Unexpected embedded formatting for Angular template ([#15969](https://github.com/prettier/prettier/pull/15969) by [@JounQin](https://github.com/JounQin))

Computed template should not be considered as Angular component template

<!-- prettier-ignore -->
```ts
// Input
const template = "foobar";

@Component({
[template]: `<h1>{{ hello }}</h1>`,
})
export class AppComponent {}

// Prettier 3.2.4
const template = "foobar";

@Component({
[template]: `<h1>{{ hello }}</h1>`,
})
export class AppComponent {}

// Prettier 3.2.5
const template = "foobar";

@Component({
[template]: `<h1>{{ hello }}</h1>`,
})
export class AppComponent {}
```

#### Use `"json"` parser for `tsconfig.json` by default ([#16012](https://github.com/prettier/prettier/pull/16012) by [@sosukesuzuki](https://github.com/sosukesuzuki))

In [v2.3.0](https://prettier.io/blog/2024/01/12/3.2.0#new-jsonc-parser-added-15831httpsgithubcomprettierprettierpull15831-by-fiskerhttpsgithubcomfisker), we introduced `"jsonc"` parser which adds trialing comma **by default**.

When adding a new parser we also define how it will be used based on the [`linguist-languages`](https://www.npmjs.com/package/linguist-languages) data.

`tsconfig.json` is a special file used by [TypeScript](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#using-tsconfigjson-or-jsconfigjson), it uses `.json` file extension, but it actually uses the [JSON with Comments](https://code.visualstudio.com/docs/languages/json#_json-with-comments) syntax. However, we found that there are many third-party tools not recognize it correctly because of the confusing `.json` file extension.

We decide to treat it as a JSON file for now to avoid the extra configuration step.

To keep using the `"jsonc"` parser for your `tsconfig.json` files, add the following to your `.pretterrc` file

```json
{
"overrides": [
{
"files": ["tsconfig.json", "jsconfig.json"],
"options": {
"parser": "jsonc"
}
}
]
}
```

<!-- prettier-ignore -->
```
# Prettier 3.2.4
prettier --file-info tsconfig.json
{ "ignored": false, "inferredParser": "jsonc" }

# Prettier 3.2.5
prettier --file-info tsconfig.json
{ "ignored": false, "inferredParser": "json" }
```

# 3.2.4

[diff](https://github.com/prettier/prettier/compare/3.2.3...3.2.4)
74 changes: 0 additions & 74 deletions CODE_OF_CONDUCT.md

This file was deleted.

12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -11,24 +11,24 @@ yarn test

The tests use [Jest snapshots](https://facebook.github.io/jest/docs/en/snapshot-testing.html). You can make changes and run `jest -u` (or `yarn test -u`) to update the snapshots. Then run `git diff` to take a look at what changed. Always update the snapshots when opening a PR.

Each test directory in `tests/format` has a `jsfmt.spec.js` file that controls how exactly the rest of the files in the directory are used for tests. This file must contain one or more calls to the `run_spec` global function. For example, in directories with JavaScript formatting tests, `jsfmt.spec.js` generally looks like this:
Each test directory in `tests/format` has a `jsfmt.spec.js` file that controls how exactly the rest of the files in the directory are used for tests. This file must contain one or more calls to the `runFormatTest` global function. For example, in directories with JavaScript formatting tests, `jsfmt.spec.js` generally looks like this:

```js
run_spec(import.meta, ["babel", "flow", "typescript"]);
runFormatTest(import.meta, ["babel", "flow", "typescript"]);
```
This verifies that for each file in the directory, the output matches the snapshot and is the same for each listed parser.
You can also pass options as the third argument:
```js
run_spec(import.meta, ["babel"], { trailingComma: "es5" });
runFormatTest(import.meta, ["babel"], { trailingComma: "es5" });
```
Signature:
```ts
function run_spec(
function runFormatTest(
fixtures:
| ImportMeta
| {
@@ -47,11 +47,11 @@ function run_spec(

Parameters:

- **`fixtures`**: Must be set to `import.meta` or to an object of the shape `{ importMeta: import.meta, ... }`. The object may have the `snippets` property to specify an array of extra input entries in addition to the files in the current directory. For each input entry (a file or a snippet), `run_spec` configures and runs a number of tests. The main check is that for a given input the output should match the snapshot (for snippets, the expected output can also be specified directly). [Additional checks](#deeper-testing) are controlled by options and environment variables.
- **`fixtures`**: Must be set to `import.meta` or to an object of the shape `{ importMeta: import.meta, ... }`. The object may have the `snippets` property to specify an array of extra input entries in addition to the files in the current directory. For each input entry (a file or a snippet), `runFormatTest` configures and runs a number of tests. The main check is that for a given input the output should match the snapshot (for snippets, the expected output can also be specified directly). [Additional checks](#deeper-testing) are controlled by options and environment variables.
- **`parsers`**: A list of parser names. The tests verify that the parsers in this list produce the same output. If the list includes `typescript`, then `babel-ts` is included implicitly. If the list includes `flow`, then `babel-flow` is included implicitly. If the list includes `babel`, and the current directory is inside `tests/format/js` or `tests/format/jsx`, then `acorn`, `espree`, and `meriyah` are included implicitly.
- **`options`**: In addition to Prettier's formatting options, can contain the `errors` property to specify that it's expected that the formatting shouldn't be successful and an error should be thrown for all (`errors: true`) or some combinations of input entries and parsers.
The implementation of `run_spec` can be found in [`tests/config/format-test.js`](tests/config/format-test.js).
The implementation of `runFormatTest` can be found in [`tests/config/run-format-test.js`](tests/config/run-format-test.js).
`tests/format/flow-repo/` contains the Flow test suite and is not supposed to be edited by hand. To update it, clone the Flow repo next to the Prettier repo and run: `node scripts/sync-flow-tests.cjs ../flow/tests/`.
32 changes: 32 additions & 0 deletions changelog_unreleased/angular/15968.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#### Support Angular inline styles as single template literal (#15968 by @sosukesuzuki)

[Angular v17](https://blog.angular.io/introducing-angular-v17-4d7033312e4b) supports single string inline styles.

<!-- prettier-ignore -->
```ts
// Input
@Component({
template: `<div>...</div>`,
styles: `h1 { color: blue; }`,
})
export class AppComponent {}

// Prettier stable
@Component({
template: `<div>...</div>`,
styles: `h1 { color: blue; }`,
})
export class AppComponent {}

// Prettier main
@Component({
template: `<div>...</div>`,
styles: `
h1 {
color: blue;
}
`,
})
export class AppComponent {}

```
30 changes: 30 additions & 0 deletions changelog_unreleased/angular/15969.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#### Unexpected embedded formatting for Angular template (#15969 by @JounQin)

Computed template should not be considered as Angular component template

<!-- prettier-ignore -->
```ts
// Input
const template = "foobar";

@Component({
[template]: `<h1>{{ hello }}</h1>`,
})
export class AppComponent {}

// Prettier stable
const template = "foobar";

@Component({
[template]: `<h1>{{ hello }}</h1>`,
})
export class AppComponent {}

// Prettier main
const template = "foobar";

@Component({
[template]: `<h1>{{ hello }}</h1>`,
})
export class AppComponent {}
```
35 changes: 35 additions & 0 deletions changelog_unreleased/api/16012.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#### Use `"json"` parser for `tsconfig.json` by default (#16012 by @sosukesuzuki)

In [v2.3.0](https://prettier.io/blog/2024/01/12/3.2.0#new-jsonc-parser-added-15831httpsgithubcomprettierprettierpull15831-by-fiskerhttpsgithubcomfisker), we introduced `"jsonc"` parser which adds trialing comma **by default**.

When adding a new parser we also define how it will be used based on the [`linguist-languages`](https://www.npmjs.com/package/linguist-languages) data.

`tsconfig.json` is a special file used by [TypeScript](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#using-tsconfigjson-or-jsconfigjson), it uses `.json` file extension, but it actually uses the [JSON with Comments](https://code.visualstudio.com/docs/languages/json#_json-with-comments) syntax. However, we found that there are many third-party tools not recognize it correctly because of the confusing `.json` file extension.

We decide to treat it as a JSON file for now to avoid the extra configuration step.

To keep using the `"jsonc"` parser for your `tsconfig.json` files, add the following to your `.pretterrc` file

```json
{
"overrides": [
{
"files": ["tsconfig.json", "jsconfig.json"],
"options": {
"parser": "jsonc"
}
}
]
}
```

<!-- prettier-ignore -->
```
# Prettier stable
prettier --file-info tsconfig.json
{ "ignored": false, "inferredParser": "jsonc" }
# Prettier main
prettier --file-info tsconfig.json
{ "ignored": false, "inferredParser": "json" }
```
14 changes: 0 additions & 14 deletions changelog_unreleased/json/15947.md

This file was deleted.

1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -245,6 +245,7 @@
"precommit",
"preorder",
"preprocess",
"pretterrc",
"prettierx",
"progid",
"proto",
2 changes: 2 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -9,6 +9,8 @@ If you want to run Prettier programmatically, check this page out.
import * as prettier from "prettier";
```

Our public APIs are all asynchronous, if you must use synchronous version for some reason, you can try [`@prettier/sync`](https://github.com/prettier/prettier-synchronized).

## `prettier.format(source, options)`

`format` is used to format text using Prettier. `options.parser` must be set according to the language you are formatting (see the [list of available parsers](options.md#parser)). Alternatively, `options.filepath` can be specified for Prettier to infer the parser from the file extension. Other [options](options.md) may be provided to override the defaults.
32 changes: 16 additions & 16 deletions docs/browser.md
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ Required options:

- **[`parser`](options.md#parser) (or [`filepath`](options.md#file-path))**: One of these options has to be specified for Prettier to know which parser to use.

- **`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource--options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files in <https://unpkg.com/browse/prettier@3.2.4/plugins/>. Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON.
- **`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource--options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files in <https://unpkg.com/browse/prettier@3.2.5/plugins/>. Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON.

You need to load the ones that you’re going to use and pass them to `prettier.format` using the `plugins` option.

@@ -29,8 +29,8 @@ See below for examples.
### Global

```html
<script src="https://unpkg.com/prettier@3.2.4/standalone.js"></script>
<script src="https://unpkg.com/prettier@3.2.4/plugins/graphql.js"></script>
<script src="https://unpkg.com/prettier@3.2.5/standalone.js"></script>
<script src="https://unpkg.com/prettier@3.2.5/plugins/graphql.js"></script>
<script>
(async () => {
const formatted = await prettier.format("type Query { hello: String }", {
@@ -47,8 +47,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack

```html
<script type="module">
import * as prettier from "https://unpkg.com/prettier@3.2.4/standalone.mjs";
import prettierPluginGraphql from "https://unpkg.com/prettier@3.2.4/plugins/graphql.mjs";
import * as prettier from "https://unpkg.com/prettier@3.2.5/standalone.mjs";
import prettierPluginGraphql from "https://unpkg.com/prettier@3.2.5/plugins/graphql.mjs";
const formatted = await prettier.format("type Query { hello: String }", {
parser: "graphql",
@@ -61,8 +61,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack

```js
define([
"https://unpkg.com/prettier@3.2.4/standalone.js",
"https://unpkg.com/prettier@3.2.4/plugins/graphql.js",
"https://unpkg.com/prettier@3.2.5/standalone.js",
"https://unpkg.com/prettier@3.2.5/plugins/graphql.js",
], async (prettier, ...plugins) => {
const formatted = await prettier.format("type Query { hello: String }", {
parser: "graphql",
@@ -90,8 +90,8 @@ This syntax doesn’t necessarily work in the browser, but it can be used when b
### Worker

```js
importScripts("https://unpkg.com/prettier@3.2.4/standalone.js");
importScripts("https://unpkg.com/prettier@3.2.4/plugins/graphql.js");
importScripts("https://unpkg.com/prettier@3.2.5/standalone.js");
importScripts("https://unpkg.com/prettier@3.2.5/plugins/graphql.js");

(async () => {
const formatted = await prettier.format("type Query { hello: String }", {
@@ -107,9 +107,9 @@ If you want to format [embedded code](options.md#embedded-language-formatting),

```html
<script type="module">
import * as prettier from "https://unpkg.com/prettier@3.2.4/standalone.mjs";
import prettierPluginBabel from "https://unpkg.com/prettier@3.2.4/plugins/babel.mjs";
import prettierPluginEstree from "https://unpkg.com/prettier@3.2.4/plugins/estree.mjs";
import * as prettier from "https://unpkg.com/prettier@3.2.5/standalone.mjs";
import prettierPluginBabel from "https://unpkg.com/prettier@3.2.5/plugins/babel.mjs";
import prettierPluginEstree from "https://unpkg.com/prettier@3.2.5/plugins/estree.mjs";
console.log(
await prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
@@ -125,10 +125,10 @@ The HTML code embedded in JavaScript stays unformatted because the `html` parser

```html
<script type="module">
import * as prettier from "https://unpkg.com/prettier@3.2.4/standalone.mjs";
import prettierPluginBabel from "https://unpkg.com/prettier@3.2.4/plugins/babel.mjs";
import prettierPluginEstree from "https://unpkg.com/prettier@3.2.4/plugins/estree.mjs";
import prettierPluginHtml from "https://unpkg.com/prettier@3.2.4/plugins/html.mjs";
import * as prettier from "https://unpkg.com/prettier@3.2.5/standalone.mjs";
import prettierPluginBabel from "https://unpkg.com/prettier@3.2.5/plugins/babel.mjs";
import prettierPluginEstree from "https://unpkg.com/prettier@3.2.5/plugins/estree.mjs";
import prettierPluginHtml from "https://unpkg.com/prettier@3.2.5/plugins/html.mjs";
console.log(
await prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
15 changes: 6 additions & 9 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -121,18 +121,16 @@ For example, you can do the following to have Prettier run before each commit:

```bash
npm install --save-dev husky lint-staged
npx husky install
npm pkg set scripts.prepare="husky install"
npx husky add .husky/pre-commit "npx lint-staged"
npx husky init
node --eval "fs.writeFileSync('.husky/pre-commit','npx lint-staged\n')"
```

<!--yarn-->

```bash
yarn add --dev husky lint-staged
npx husky install
npm pkg set scripts.prepare="husky install"
npx husky add .husky/pre-commit "npx lint-staged"
npx husky init
node --eval "fs.writeFileSync('.husky/pre-commit','npx lint-staged\n')"
```

> If you use Yarn 2, see https://typicode.github.io/husky/#/?id=yarn-2
@@ -141,9 +139,8 @@ For example, you can do the following to have Prettier run before each commit:

```bash
pnpm add --save-dev husky lint-staged
pnpm exec husky install
npm pkg set scripts.prepare="husky install"
pnpm exec husky add .husky/pre-commit "pnpm exec lint-staged"
npx husky init
node --eval "fs.writeFileSync('.husky/pre-commit','pnpm exec lint-staged\n')"
```

<!--END_DOCUSAURUS_CODE_TABS-->
5 changes: 2 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -137,7 +137,6 @@ export default [
],

// eslint-plugin-import
"import/extensions": ["error", "ignorePackages"],
"import/no-extraneous-dependencies": [
"error",
{
@@ -320,7 +319,7 @@ export default [
{
files: ["tests/format/**/*.js"],
rules: {
"prettier-internal-rules/no-legacy-format-test-fixtures": "error",
"prettier-internal-rules/no-legacy-format-test": "error",
},
},
{
@@ -340,8 +339,8 @@ export default [
},
languageOptions: {
globals: {
run_spec: "readonly",
runCli: "readonly",
runFormatTest: "readonly",
},
},
},
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "3.2.4",
"version": "3.2.5",
"description": "Prettier is an opinionated code formatter",
"bin": "./bin/prettier.cjs",
"repository": "prettier/prettier",
@@ -30,16 +30,16 @@
"bin"
],
"dependencies": {
"@angular/compiler": "17.0.2",
"@angular/compiler": "17.1.2",
"@babel/code-frame": "7.23.5",
"@babel/parser": "7.23.6",
"@babel/types": "7.23.6",
"@glimmer/syntax": "0.87.1",
"@babel/parser": "7.23.9",
"@babel/types": "7.23.9",
"@glimmer/syntax": "0.88.1",
"@iarna/toml": "2.2.5",
"@prettier/is-es5-identifier-name": "0.2.0",
"@prettier/parse-srcset": "3.1.0",
"@typescript-eslint/typescript-estree": "6.19.0",
"@typescript-eslint/visitor-keys": "6.19.0",
"@typescript-eslint/typescript-estree": "6.20.0",
"@typescript-eslint/visitor-keys": "6.20.0",
"acorn": "8.11.3",
"acorn-jsx": "5.3.2",
"angular-estree-parser": "9.0.0",
@@ -55,7 +55,7 @@
"editorconfig": "0.15.3",
"emoji-regex": "10.3.0",
"escape-string-regexp": "5.0.0",
"espree": "9.6.1",
"espree": "10.0.0",
"fast-glob": "3.3.2",
"fast-json-stable-stringify": "2.1.0",
"file-entry-cache": "7.0.2",
@@ -64,11 +64,11 @@
"get-east-asian-width": "1.2.0",
"get-stdin": "9.0.0",
"graphql": "16.8.1",
"hermes-parser": "0.18.2",
"hermes-parser": "0.19.0",
"html-element-attributes": "3.3.0",
"html-tag-names": "2.1.0",
"html-ua-styles": "0.0.3",
"ignore": "5.3.0",
"ignore": "5.3.1",
"import-meta-resolve": "4.0.0",
"iterate-directory-up": "1.1.1",
"jest-docblock": "29.7.0",
@@ -109,23 +109,23 @@
"@babel/generator": "7.23.6",
"@eslint/eslintrc": "3.0.0",
"@eslint/js": "8.56.0",
"@glimmer/reference": "0.87.1",
"@glimmer/reference": "0.88.1",
"@stylistic/eslint-plugin-js": "1.5.3",
"@types/eslint__js": "8.42.3",
"@types/estree": "1.0.5",
"@types/file-entry-cache": "5.0.4",
"@types/find-cache-dir": "3.2.1",
"@types/jest": "29.5.8",
"@typescript-eslint/eslint-plugin": "6.19.0",
"@typescript-eslint/eslint-plugin": "6.20.0",
"benchmark": "2.1.4",
"browserslist": "4.22.2",
"browserslist": "4.22.3",
"browserslist-to-esbuild": "2.1.1",
"c8": "9.0.0",
"c8": "9.1.0",
"cross-env": "7.0.3",
"cspell": "8.3.2",
"enquirer": "2.4.1",
"esbuild": "0.19.11",
"esbuild-plugins-node-modules-polyfill": "1.6.1",
"esbuild": "0.20.0",
"esbuild-plugins-node-modules-polyfill": "1.6.2",
"esbuild-visualizer": "0.6.0",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
@@ -145,9 +145,9 @@
"jest-snapshot-serializer-ansi": "2.1.0",
"jest-snapshot-serializer-raw": "2.0.0",
"jest-watch-typeahead": "2.2.2",
"magic-string": "0.30.5",
"npm-run-all2": "6.1.1",
"prettier": "3.2.3",
"magic-string": "0.30.6",
"npm-run-all2": "6.1.2",
"prettier": "3.2.4",
"pretty-bytes": "6.1.1",
"rollup-plugin-license": "3.2.0",
"semver": "7.5.4",
@@ -174,7 +174,7 @@
"lint:typecheck": "tsc",
"lint:eslint": "cross-env EFF_NO_LINK_RULES=true eslint . --format friendly",
"lint:changelog": "node ./scripts/lint-changelog.js",
"lint:prettier": "prettier . \"!test*\" --check --cache",
"lint:prettier": "prettier . --check --cache",
"lint:spellcheck": "cspell --no-progress --relative --dot --gitignore",
"lint:deps": "node ./scripts/check-deps.js",
"lint:blog": "node ./scripts/lint-blog.js",
@@ -212,5 +212,5 @@
"not op_mini all"
],
"preferUnplugged": true,
"packageManager": "yarn@4.0.2"
"packageManager": "yarn@4.1.0"
}
2 changes: 1 addition & 1 deletion scripts/build/config.js
Original file line number Diff line number Diff line change
@@ -353,7 +353,7 @@ const pluginFiles = [
...[
"expression_parser/lexer.mjs",
"expression_parser/parser.mjs",
"ml_parser/interpolation_config.mjs",
"ml_parser/defaults.mjs",
].map((file) => ({
module: getPackageFile(`@angular/compiler/esm2022/src/${file}`),
process: (text) =>
10 changes: 2 additions & 8 deletions scripts/generate-schema.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
#!/usr/bin/env node

import { format } from "../index.js";
import { getSupportInfo } from "../src/main/support.js";
import generateSchema from "./utils/generate-schema.js";
import { generateSchema } from "./utils/generate-schema.js";

console.log(
await format(JSON.stringify(generateSchema(getSupportInfo().options)), {
parser: "json",
}),
);
console.log(await generateSchema());
2 changes: 1 addition & 1 deletion scripts/release/package.json
Original file line number Diff line number Diff line change
@@ -15,5 +15,5 @@
"engines": {
"node": ">=18"
},
"packageManager": "yarn@4.0.2"
"packageManager": "yarn@4.1.0"
}
11 changes: 6 additions & 5 deletions scripts/release/steps/bump-prettier.js
Original file line number Diff line number Diff line change
@@ -45,14 +45,15 @@ export default async function bumpPrettier(params) {
return;
}

/*
This should be done before installing Prettier,
otherwise the yarn.lock will merge `prettier@npm:<version>, prettier@workspace:.`
*/
await logPromise("Bump default branch version", bump(params));
await logPromise(
"Installing Prettier",
// TODO: Remove this if `yarn up ...` works
// runYarn(["add", "--dev", `prettier@${version}`]),
runYarn(["up", `prettier@${version}`]),
runYarn(["add", "--dev", `prettier@${version}`]),
);

await logPromise("Updating files", format());
await logPromise("Bump default branch version", bump(params));
await logPromise("Committing changed files", commit(params));
}
19 changes: 10 additions & 9 deletions scripts/release/steps/post-publish-steps.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import chalk from "chalk";
import { execa } from "execa";
import outdent from "outdent";

import { fetchText, logPromise } from "../utils.js";
import { fetchText, logPromise, writeFile } from "../utils.js";

const SCHEMA_REPO = "SchemaStore/schemastore";
const SCHEMA_PATH = "src/schemas/json/prettierrc.json";
@@ -12,26 +11,28 @@ const EDIT_URL = `https://github.com/${SCHEMA_REPO}/edit/master/${SCHEMA_PATH}`;
// Any optional or manual step can be warned in this script.

async function checkSchema() {
const { stdout: schema } = await execa("node", [
"scripts/generate-schema.js",
]);
const { generateSchema } = await import("../../utils/generate-schema.js");
const schema = await generateSchema();
const remoteSchema = await logPromise(
"Checking current schema in SchemaStore",
fetchText(RAW_URL),
);

if (schema === remoteSchema.trim()) {
if (schema.trim() === remoteSchema.trim()) {
return;
}

writeFile(
new URL("../../../.tmp/schema/prettierrc.json", import.meta.url),
schema,
);

return outdent`
${chalk.bold.underline(
"The schema in {yellow SchemaStore",
)} needs an update.}
- Open ${chalk.cyan.underline(EDIT_URL)}
- Run ${chalk.yellow(
"node scripts/generate-schema.mjs",
)} and copy the new schema
- Open ${chalk.cyan.underline("/.tmp/schema/prettierrc.json")} file and copy the content
- Paste it on GitHub interface
- Open a PR
`;
6 changes: 0 additions & 6 deletions scripts/release/steps/show-instructions-after-npm-publish.js
Original file line number Diff line number Diff line change
@@ -56,12 +56,6 @@ export default async function showInstructionsAfterNpmPublish({
- Go to ${chalk.cyan.underline(releaseUrl)}
- Press ${chalk.bgGreen.black("Publish release ")}
${chalk.bold.underline("Test the new release")}
- In a new session, run ${chalk.yellow(
"npm i prettier@latest",
)} in another directory
- Test the API and CLI
After that, we can proceed to bump this repo's Prettier dependency.
`,
);
19 changes: 17 additions & 2 deletions scripts/release/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import fs from "node:fs";
import path from "node:path";
import readline from "node:readline";
import url from "node:url";

import chalk from "chalk";
import { execa } from "execa";
@@ -98,8 +100,20 @@ function readJson(filename) {
return JSON.parse(fs.readFileSync(filename));
}

function writeJson(filename, content) {
fs.writeFileSync(filename, JSON.stringify(content, null, 2) + "\n");
function writeJson(file, content) {
writeFile(file, JSON.stringify(content, null, 2) + "\n");
}

const toPath = (urlOrPath) =>
urlOrPath instanceof URL ? url.fileURLToPath(urlOrPath) : urlOrPath;
function writeFile(file, content) {
try {
fs.mkdirSync(path.dirname(toPath(file)), { recursive: true });
} catch {
// noop
}

fs.writeFileSync(file, content);
}

function processFile(filename, fn) {
@@ -139,5 +153,6 @@ export {
runGit,
runYarn,
waitForEnter,
writeFile,
writeJson,
};
88 changes: 44 additions & 44 deletions scripts/release/yarn.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/sync-flow-tests.cjs
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ const path = require("path");
const flowParser = require("flow-parser");
const fastGlob = require("fast-glob");

const DEFAULT_SPEC_CONTENT = "run_spec(__dirname);\n";
const DEFAULT_SPEC_CONTENT = "runFormatTest(import.meta);\n";
const SPEC_FILE_NAME = "jsfmt.spec.js";
const FLOW_TESTS_DIR = path.join(__dirname, "../tests/format/flow-repo");

2 changes: 1 addition & 1 deletion scripts/tools/bundle-test/package.json
Original file line number Diff line number Diff line change
@@ -9,5 +9,5 @@
"scripts": {
"test": "node ./index.js"
},
"packageManager": "yarn@4.0.2"
"packageManager": "yarn@4.1.0"
}
156 changes: 78 additions & 78 deletions scripts/tools/bundle-test/yarn.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ module.exports = {
"no-doc-public-import": require("./no-doc-public-import.js"),
"no-empty-flat-contents-for-if-break": require("./no-empty-flat-contents-for-if-break.js"),
"no-identifier-n": require("./no-identifier-n.js"),
"no-legacy-format-test-fixtures": require("./no-legacy-format-test-fixtures.js"),
"no-legacy-format-test": require("./no-legacy-format-test.js"),
"no-node-comments": require("./no-node-comments.js"),
"no-unnecessary-ast-path-call": require("./no-unnecessary-ast-path-call.js"),
"prefer-ast-path-each": require("./prefer-ast-path-each.js"),
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
"use strict";

const dirnameArgumentSelector = [
const legacyRunFormatTestCall = [
"CallExpression",
'[callee.type="Identifier"]',
'[callee.name="run_spec"]',
].join("");

const runFormatTestCall = [
"CallExpression",
'[callee.type="Identifier"]',
'[callee.name="runFormatTest"]',
].join("");

const dirnameArgumentSelector = [
runFormatTestCall,
" > ",
"Identifier.arguments:first-child",
'[name="__dirname"]',
].join("");

const dirnamePropertySelector = [
"CallExpression",
'[callee.type="Identifier"]',
'[callee.name="run_spec"]',
runFormatTestCall,
" > ",
"ObjectExpression.arguments:first-child",
" > ",
@@ -23,16 +31,19 @@ const dirnamePropertySelector = [
'[value.name="__dirname"]',
].join("");

const MESSAGE_ID_LEGACY_FUNCTION_NAME = "legacy-function-name";
const MESSAGE_ID_ARGUMENT = "dirname-argument";
const MESSAGE_ID_PROPERTY = "dirname-property";

module.exports = {
meta: {
type: "suggestion",
docs: {
url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/no-legacy-format-test-fixtures.js",
url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/no-legacy-format-test.js",
},
messages: {
[MESSAGE_ID_LEGACY_FUNCTION_NAME]:
"Use `runFormatTest(…)` instead of `run_spec(…)`.",
[MESSAGE_ID_ARGUMENT]: "Use `import.meta` instead of `__dirname`.",
[MESSAGE_ID_PROPERTY]:
"Use `importMeta: import.meta` instead of `dirname: __dirname`.",
@@ -42,6 +53,14 @@ module.exports = {
},
create(context) {
return {
[legacyRunFormatTestCall](callExpression) {
context.report({
node: callExpression.callee,
messageId: MESSAGE_ID_LEGACY_FUNCTION_NAME,
fix: (fixer) =>
fixer.replaceText(callExpression.callee, "runFormatTest"),
});
},
[dirnameArgumentSelector](node) {
context.report({
node,
Original file line number Diff line number Diff line change
@@ -11,5 +11,5 @@
"test": "node test.js",
"test-coverage": "npx nyc node test.js"
},
"packageManager": "yarn@4.0.2"
"packageManager": "yarn@4.1.0"
}
20 changes: 13 additions & 7 deletions scripts/tools/eslint-plugin-prettier-internal-rules/test.js
Original file line number Diff line number Diff line change
@@ -271,26 +271,32 @@ test("no-identifier-n", {
],
});

test("no-legacy-format-test-fixtures", {
test("no-legacy-format-test", {
valid: [
"run_spec(import.meta, ['babel'])",
"run_spec({importMeta: import.meta}, ['babel'])",
"runFormatTest(import.meta, ['babel'])",
"runFormatTest({importMeta: import.meta}, ['babel'])",
].map((code) => ({ code, parserOptions: { sourceType: "module" } })),
invalid: [
{
code: "run_spec(__dirname, ['babel'])",
code: "run_spec(import.meta, ['babel'])",
errors: [{ message: "Use `runFormatTest(…)` instead of `run_spec(…)`." }],
output: "runFormatTest(import.meta, ['babel'])",
},
{
code: "runFormatTest(__dirname, ['babel'])",
errors: [{ message: "Use `import.meta` instead of `__dirname`." }],
output: "run_spec(import.meta, ['babel'])",
output: "runFormatTest(import.meta, ['babel'])",
},
{
code: "run_spec({snippets: ['x'], dirname: __dirname}, ['babel'])",
code: "runFormatTest({snippets: ['x'], dirname: __dirname}, ['babel'])",
errors: [
{
message:
"Use `importMeta: import.meta` instead of `dirname: __dirname`.",
},
],
output: "run_spec({snippets: ['x'], importMeta: import.meta}, ['babel'])",
output:
"runFormatTest({snippets: ['x'], importMeta: import.meta}, ['babel'])",
},
].map((test) => ({ ...test, parserOptions: { sourceType: "module" } })),
});
24 changes: 18 additions & 6 deletions scripts/utils/generate-schema.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
function generateSchema(options) {
function generateSchemaData(options) {
return {
$schema: "http://json-schema.org/draft-04/schema#",
title: "Schema for .prettierrc",
$schema: "http://json-schema.org/draft-07/schema#",
$id: "https://json.schemastore.org/prettierrc.json",
definitions: {
optionsDefinition: {
type: "object",
properties: Object.fromEntries(
options.map((option) => [option.name, optionToSchema(option)]),
options
.sort(({ name: optionNameA }, { name: optionNameB }) =>
optionNameA.localeCompare(optionNameB),
)
.map((option) => [option.name, optionToSchema(option)]),
),
},
overridesDefinition: {
@@ -35,9 +39,9 @@ function generateSchema(options) {
],
},
options: {
$ref: "#/definitions/optionsDefinition",
type: "object",
description: "The options to apply for this override.",
$ref: "#/definitions/optionsDefinition",
},
},
additionalProperties: false,
@@ -58,6 +62,7 @@ function generateSchema(options) {
type: "string",
},
],
title: "Schema for .prettierrc",
};
}

@@ -113,4 +118,11 @@ function choiceToSchema(choice) {
return { enum: [choice.value], description: choice.description };
}

export default generateSchema;
async function generateSchema() {
const { format, getSupportInfo } = await import("../../src/index.js");
const supportInfo = await getSupportInfo();
const schema = generateSchemaData(supportInfo.options);
return format(JSON.stringify(schema, undefined, 2), { parser: "json" });
}

export { generateSchema, generateSchemaData };
11 changes: 11 additions & 0 deletions src/language-handlebars/clean.js
Original file line number Diff line number Diff line change
@@ -10,6 +10,17 @@ function clean(ast, newNode /*, parent*/) {
newNode.chars = htmlWhitespaceUtils.split(trimmed).join(" ");
}

if (ast.type === "ElementNode") {
delete newNode.startTag;
delete newNode.parts;
delete newNode.endTag;
delete newNode.nameNode;
}

if (ast.type === "Block" || ast.type === "ElementNode") {
delete newNode.blockParamNodes;
}

// `class` is reformatted
if (ast.type === "AttrNode" && ast.name.toLowerCase() === "class") {
delete newNode.value;
19 changes: 18 additions & 1 deletion src/language-handlebars/visitor-keys.evaluate.js
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
export { visitorKeys as default } from "@glimmer/syntax";
import { visitorKeys as glimmerVisitorKeys } from "@glimmer/syntax";

const {
// These node types presents on `ElementNode`, but we don't care about them
// https://github.com/glimmerjs/glimmer-vm/pull/1553
ElementStartNode, // `ElementNode.startTag`
ElementPartNode, // `ElementNode.parts`
ElementEndNode, // `ElementNode.endTag`
ElementNameNode, // `ElementNode.nameNode`

// This presents on `{Block,ElementNode}.blockParamNodes`, but we don't care about them
// https://github.com/glimmerjs/glimmer-vm/pull/1552
BlockParam,

...visitorKeys
} = glimmerVisitorKeys;

export default visitorKeys;
29 changes: 20 additions & 9 deletions src/language-js/embed/utils.js
Original file line number Diff line number Diff line change
@@ -30,22 +30,33 @@ const angularComponentObjectExpressionPredicates = [
* })
*/
function isAngularComponentStyles(path) {
return path.match(
(node) => node.type === "TemplateLiteral",
(node, name) => isArrayOrTupleExpression(node) && name === "elements",
(node, name) =>
isObjectProperty(node) &&
node.key.type === "Identifier" &&
node.key.name === "styles" &&
name === "value",
...angularComponentObjectExpressionPredicates,
const isTemplateLiteral = (node) => node.type === "TemplateLiteral";
const isObjectPropertyNamedStyles = (node, key) =>
isObjectProperty(node) &&
!node.computed &&
node.key.type === "Identifier" &&
node.key.name === "styles" &&
key === "value";
return (
path.match(
isTemplateLiteral,
(node, name) => isArrayOrTupleExpression(node) && name === "elements",
isObjectPropertyNamedStyles,
...angularComponentObjectExpressionPredicates,
) ||
path.match(
isTemplateLiteral,
isObjectPropertyNamedStyles,
...angularComponentObjectExpressionPredicates,
)
);
}
function isAngularComponentTemplate(path) {
return path.match(
(node) => node.type === "TemplateLiteral",
(node, name) =>
isObjectProperty(node) &&
!node.computed &&
node.key.type === "Identifier" &&
node.key.name === "template" &&
name === "value",
9 changes: 6 additions & 3 deletions src/language-js/print/estree.js
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ import {
isCallExpression,
isLiteral,
isMemberExpression,
isMethod,
isNextLineEmpty,
isObjectOrRecordExpression,
needsHardlineAfterDanglingComment,
@@ -252,13 +253,15 @@ function printEstree(path, options, print, args) {
case "ObjectPattern":
case "RecordExpression":
return printObject(path, options, print);
// Babel 6
case "ObjectProperty": // Non-standard AST node type.
case "Property":
if (node.method || node.kind === "get" || node.kind === "set") {
if (isMethod(node)) {
return printMethod(path, options, print);
}
return printProperty(path, options, print);
// Babel
case "ObjectProperty":
return printProperty(path, options, print);
// Babel
case "ObjectMethod":
return printMethod(path, options, print);
case "Decorator":
10 changes: 3 additions & 7 deletions src/language-js/print/flow.js
Original file line number Diff line number Diff line change
@@ -5,11 +5,7 @@ import assert from "node:assert";
import { replaceEndOfLine } from "../../document/utils.js";
import printNumber from "../../utils/print-number.js";
import printString from "../../utils/print-string.js";
import {
isFunctionNotation,
isGetterOrSetter,
rawText,
} from "../utils/index.js";
import { isMethod, rawText } from "../utils/index.js";
import isFlowKeywordType from "../utils/is-flow-keyword-type.js";
import { printArray } from "./array.js";
import { printBinaryCastExpression } from "./cast-expression.js";
@@ -210,11 +206,11 @@ function printFlow(path, options, print) {

return [
modifier,
isGetterOrSetter(node) ? node.kind + " " : "",
node.kind !== "init" ? node.kind + " " : "",
node.variance ? print("variance") : "",
printPropertyKey(path, options, print),
printOptionalToken(path),
isFunctionNotation(node) ? "" : ": ",
isMethod(node) ? "" : ": ",
print("value"),
];
}
4 changes: 2 additions & 2 deletions src/language-js/print/function-parameters.js
Original file line number Diff line number Diff line change
@@ -17,10 +17,10 @@ import {
hasComment,
hasRestParameter,
isArrayOrTupleExpression,
isFlowObjectTypePropertyAFunction,
isNextLineEmpty,
isObjectOrRecordExpression,
isObjectType,
isObjectTypePropertyAFunction,
isSimpleType,
isTestCall,
isTypeAnnotationAFunction,
@@ -120,7 +120,7 @@ function printFunctionParameters(
}

const isFlowShorthandWithOneArg =
(isObjectTypePropertyAFunction(parent) ||
(isFlowObjectTypePropertyAFunction(parent) ||
isTypeAnnotationAFunction(parent) ||
parent.type === "TypeAlias" ||
parent.type === "UnionTypeAnnotation" ||
25 changes: 11 additions & 14 deletions src/language-js/print/function.js
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ import {
isBinaryish,
isCallExpression,
isJsxElement,
isMethod,
} from "../utils/index.js";
import {
printFunctionParameters,
@@ -36,20 +37,16 @@ import { printTypeAnnotationProperty } from "./type-annotation.js";
* @typedef {import("../../document/builders.js").Doc} Doc
*/

const isMethod = (node) =>
node.type === "ObjectMethod" ||
node.type === "ClassMethod" ||
node.type === "ClassPrivateMethod" ||
node.type === "MethodDefinition" ||
node.type === "TSAbstractMethodDefinition" ||
node.type === "TSDeclareMethod" ||
((node.type === "Property" || node.type === "ObjectProperty") &&
(node.method || node.kind === "get" || node.kind === "set"));

const isMethodValue = (path) =>
path.node.type === "FunctionExpression" &&
path.key === "value" &&
isMethod(path.parent);
const isMethodValue = ({ node, key, parent }) =>
key === "value" &&
node.type === "FunctionExpression" &&
(parent.type === "ObjectMethod" ||
parent.type === "ClassMethod" ||
parent.type === "ClassPrivateMethod" ||
parent.type === "MethodDefinition" ||
parent.type === "TSAbstractMethodDefinition" ||
parent.type === "TSDeclareMethod" ||
(parent.type === "Property" && isMethod(parent)));

/*
- "FunctionDeclaration"
4 changes: 2 additions & 2 deletions src/language-js/print/type-annotation.js
Original file line number Diff line number Diff line change
@@ -15,8 +15,8 @@ import {
createTypeCheckFunction,
hasComment,
hasLeadingOwnLineComment,
isFlowObjectTypePropertyAFunction,
isObjectType,
isObjectTypePropertyAFunction,
isSimpleType,
isUnionType,
} from "../utils/index.js";
@@ -256,7 +256,7 @@ function isFlowArrowFunctionTypeAnnotation(path) {
const { node, parent } = path;
return (
node.type === "FunctionTypeAnnotation" &&
(isObjectTypePropertyAFunction(parent) ||
(isFlowObjectTypePropertyAFunction(parent) ||
!(
((parent.type === "ObjectTypeProperty" ||
parent.type === "ObjectTypeInternalSlot") &&
7 changes: 6 additions & 1 deletion src/language-js/traverse/visitor-keys.evaluate.js
Original file line number Diff line number Diff line change
@@ -85,13 +85,18 @@ const visitorKeys = Object.fromEntries(
]),
);

// Unsupported
for (const type of [
// Flow, Not supported yet
"ComponentDeclaration",
"ComponentParameter",
"ComponentTypeAnnotation",
"ComponentTypeParameter",
"DeclareComponent",

// Flow, Not supported yet
"HookDeclaration",
"HookTypeAnnotation",
"DeclareHook",
]) {
delete visitorKeys[type];
}
34 changes: 16 additions & 18 deletions src/language-js/utils/index.js
Original file line number Diff line number Diff line change
@@ -243,30 +243,29 @@ function isAngularTestWrapper(node) {

const isJsxElement = createTypeCheckFunction(["JSXElement", "JSXFragment"]);

function isGetterOrSetter(node) {
return node.kind === "get" || node.kind === "set";
}

// TODO: This is a bad hack and we need a better way to distinguish between
// arrow functions and otherwise
function isFunctionNotation(node) {
return isGetterOrSetter(node) || hasSameLocStart(node, node.value);
function isMethod(node) {
return (
(node.method && node.kind === "init") ||
node.kind === "get" ||
node.kind === "set"
);
}

// Hack to differentiate between the following two which have the same ast
// type T = { method: () => void };
// type T = { method(): void };
/**
* @param {Node} node
* @returns {boolean}
*/
function isObjectTypePropertyAFunction(node) {
function isFlowObjectTypePropertyAFunction(node) {
return (
(node.type === "ObjectTypeProperty" ||
node.type === "ObjectTypeInternalSlot") &&
node.value.type === "FunctionTypeAnnotation" &&
!node.static &&
!isFunctionNotation(node)
!node.method &&
// @ts-expect-error -- exists on `ObjectTypeProperty` but not `ObjectTypeInternalSlot`
node.kind !== "get" &&
// @ts-expect-error -- exists on `ObjectTypeProperty` but not `ObjectTypeInternalSlot`
node.kind !== "set" &&
node.value.type === "FunctionTypeAnnotation"
);
}

@@ -1193,7 +1192,7 @@ function isObjectProperty(node) {
return (
node &&
(node.type === "ObjectProperty" ||
(node.type === "Property" && !node.method && node.kind === "init"))
(node.type === "Property" && !isMethod(node)))
);
}

@@ -1241,10 +1240,9 @@ export {
isCallExpression,
isCallLikeExpression,
isExportDeclaration,
isFlowObjectTypePropertyAFunction,
isFunctionCompositionArgs,
isFunctionNotation,
isFunctionOrArrowExpression,
isGetterOrSetter,
isIntersectionType,
isJsxElement,
isLineComment,
@@ -1253,12 +1251,12 @@ export {
isLongCurriedCallExpression,
isMemberExpression,
isMemberish,
isMethod,
isNextLineEmpty,
isNumericLiteral,
isObjectOrRecordExpression,
isObjectProperty,
isObjectType,
isObjectTypePropertyAFunction,
isPrettierIgnoreComment,
isRegExpLiteral,
isSignedNumericLiteral,
9 changes: 1 addition & 8 deletions src/language-json/languages.evaluate.js
Original file line number Diff line number Diff line change
@@ -26,14 +26,7 @@ const languages = [
createLanguage(linguistLanguages["JSON with Comments"], () => ({
parsers: ["jsonc"],
vscodeLanguageIds: ["jsonc"],
// Too many filenames from `linguist-languages` are not a valid JSONC files.
// https://github.com/prettier/prettier/issues/15945#issuecomment-1895371835
filenames: [
"devcontainer.json",
"jsconfig.json",
"language-configuration.json",
"tsconfig.json",
],
filenames: [],
})),
createLanguage(linguistLanguages.JSON5, () => ({
parsers: ["json5"],
4 changes: 2 additions & 2 deletions tests/config/format-test-setup.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import runSpec from "./format-test.js";
import runFormatTest from "./run-format-test.js";

globalThis.run_spec = runSpec;
globalThis.runFormatTest = runFormatTest;
Original file line number Diff line number Diff line change
@@ -146,7 +146,7 @@ const ensurePromise = (value) => {
return value;
};

function runSpec(fixtures, parsers, options) {
function runFormatTest(fixtures, parsers, options) {
let { importMeta, snippets = [] } = fixtures.importMeta
? fixtures
: { importMeta: fixtures };
@@ -531,4 +531,4 @@ async function format(originalText, originalOptions) {
};
}

export default runSpec;
export default runFormatTest;
12 changes: 7 additions & 5 deletions tests/format/angular/angular/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
run_spec(import.meta, ["angular"], { trailingComma: "none" });
run_spec(import.meta, ["angular"], { trailingComma: "es5" });
run_spec(import.meta, ["angular"], { printWidth: 1 });
run_spec(import.meta, ["angular"], { htmlWhitespaceSensitivity: "ignore" });
run_spec(import.meta, ["angular"], { bracketSpacing: false });
runFormatTest(import.meta, ["angular"], { trailingComma: "none" });
runFormatTest(import.meta, ["angular"], { trailingComma: "es5" });
runFormatTest(import.meta, ["angular"], { printWidth: 1 });
runFormatTest(import.meta, ["angular"], {
htmlWhitespaceSensitivity: "ignore",
});
runFormatTest(import.meta, ["angular"], { bracketSpacing: false });
4 changes: 2 additions & 2 deletions tests/format/angular/bracket-same-line/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
run_spec(import.meta, ["angular"], { bracketSameLine: true });
run_spec(import.meta, ["angular"], { bracketSameLine: false });
runFormatTest(import.meta, ["angular"], { bracketSameLine: true });
runFormatTest(import.meta, ["angular"], { bracketSameLine: false });
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["angular"], { embeddedLanguageFormatting: "off" });
runFormatTest(import.meta, ["angular"], { embeddedLanguageFormatting: "off" });
2 changes: 1 addition & 1 deletion tests/format/angular/control-flow/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["angular"]);
runFormatTest(import.meta, ["angular"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["angular"], { printWidth: 20 });
runFormatTest(import.meta, ["angular"], { printWidth: 20 });
2 changes: 1 addition & 1 deletion tests/format/angular/icu-expression/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["angular"]);
runFormatTest(import.meta, ["angular"]);
2 changes: 1 addition & 1 deletion tests/format/angular/interpolation/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// We always pass {trailingComma: "none"} when printing
run_spec(import.meta, ["__ng_interpolation"], { trailingComma: "none" });
runFormatTest(import.meta, ["__ng_interpolation"], { trailingComma: "none" });
2 changes: 1 addition & 1 deletion tests/format/angular/self-closing/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["angular"]);
runFormatTest(import.meta, ["angular"]);
2 changes: 1 addition & 1 deletion tests/format/angular/shorthand/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["angular"]);
runFormatTest(import.meta, ["angular"]);
2 changes: 1 addition & 1 deletion tests/format/angular/upper-case/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["angular"]);
runFormatTest(import.meta, ["angular"]);
2 changes: 1 addition & 1 deletion tests/format/css/atrule/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
4 changes: 2 additions & 2 deletions tests/format/css/attribute/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
run_spec(import.meta, ["css"]);
run_spec(import.meta, ["css"], { singleQuote: true });
runFormatTest(import.meta, ["css"]);
runFormatTest(import.meta, ["css"], { singleQuote: true });
2 changes: 1 addition & 1 deletion tests/format/css/atword/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/bom/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/case/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/character-escaping/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/colon/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/color/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/combinator/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/comments/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/composes/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/cursor/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/empty/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/fill-value/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/front-matter/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css", "scss", "less"]);
runFormatTest(import.meta, ["css", "scss", "less"]);
2 changes: 1 addition & 1 deletion tests/format/css/grid/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/important/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/indent/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/inline-url/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/long-rule/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/loose/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/modules/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/no-semicolon/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/numbers/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/params/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/parens/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/postcss-8-improment/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/postcss-plugins/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/prefix/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/pseudo-call/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
4 changes: 2 additions & 2 deletions tests/format/css/quotes/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
run_spec(import.meta, ["css"]);
run_spec(import.meta, ["css"], { singleQuote: true });
runFormatTest(import.meta, ["css"]);
runFormatTest(import.meta, ["css"], { singleQuote: true });
2 changes: 1 addition & 1 deletion tests/format/css/range/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/selector-call/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/selector-list/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/selector-string/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/trailing-comma/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/units/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/url/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/variables/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/css/yaml/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["css"]);
runFormatTest(import.meta, ["css"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/abnormal/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/annot/any/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/annot/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/annot2/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/any/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/arith/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/array-filter/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/array_spread/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/arraylib/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/arrays/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/arrows/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/async/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/async_iteration/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/autocomplete/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/auxiliary/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/auxiliary/lib/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/binary/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/binding/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/bom/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/bounded_poly/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/break/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/builtin_uses/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/builtins/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/call_caching1/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/call_caching1/lib/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/call_caching2/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/call_caching2/lib/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/call_properties/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/callable/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/check-contents/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/class_fields/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/class_munging/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/class_statics/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/class_subtyping/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/class_type/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/classes/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/closure/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/commonjs/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/computed_props/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/conditional/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/config_all/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/config_all_false/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/config_all_weak/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/config_ignore/dir/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/config_ignore/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/const_params/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/constructor/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/constructor_annots/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/contents/ignore/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/contents/no_flow/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/core_tests/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/covariance/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/coverage/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/cycle/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/date/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/declare_class/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/declare_class/lib/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/declare_export/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/declare_fun/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/declare_type/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/declare_type/lib/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/def_site_variance/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/demo/1/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/demo/2/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/deps/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/destructuring/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/dictionary/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/disjoint-union-perf/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/docblock_flow/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/dom/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/dump-types/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/duplicate_methods/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/encaps/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/enumerror/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/enums/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"], { errors: { "babel-flow": true } });
runFormatTest(import.meta, ["flow"], { errors: { "babel-flow": true } });
2 changes: 1 addition & 1 deletion tests/format/flow-repo/equals/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/error_messages/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/es6modules/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/es_declare_module/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/export_default/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/export_default/lib/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/export_type/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/extensions/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/facebook_fbt_none/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/facebook_fbt_some/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/facebookisms/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/fetch/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/find-module/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/fixpoint/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/focus-check/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/for/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/forof/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/function/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/funrec/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/generators/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/generics/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/geolocation/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/get-def/helpers/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/get-def/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/get-def2/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/get-def2/lib/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/get-imports/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/haste_cycle/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/haste_cycle/models/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/haste_dupe/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/ignore_package/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/immutable_methods/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/implements/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/import_type/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/import_typeof/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/include/foo/batman/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/include/included/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/include_suppressed/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/incremental/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/incremental_basic/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/incremental_cycle/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/incremental_delete/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/incremental_json/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/incremental_path/dir/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/indexer/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/init/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/instanceof/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/integration/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/interface/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/intersection/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/intersection/lib/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/issues-11/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/iter/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/iterable/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/jsx_intrinsics.custom/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/keys/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/keyvalue/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/lib/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/libconfig/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/libdef_ignored_module/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/liberr/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/liberr/libs/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/libflow-typed/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
2 changes: 1 addition & 1 deletion tests/format/flow-repo/librec/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(import.meta, ["flow"]);
runFormatTest(import.meta, ["flow"]);
Loading