diff --git a/.eslintrc.cjs b/.eslintrc.cjs index ccfac8d7d..b8ab17800 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -146,6 +146,12 @@ module.exports = { ], "unicorn/prefer-array-flat-map": "error", "unicorn/prefer-array-some": "error", + "unicorn/prefer-export-from": [ + "error", + { + ignoreUsedVariables: true, + }, + ], "unicorn/prefer-includes": "error", "unicorn/prefer-json-parse-buffer": "error", "unicorn/prefer-module": "error", diff --git a/changelog_unreleased/api/12740.md b/changelog_unreleased/api/12740.md new file mode 100644 index 000000000..47f57bb2b --- /dev/null +++ b/changelog_unreleased/api/12740.md @@ -0,0 +1,13 @@ +#### [Breaking] standalone version export style changed (#12740 by @fisker) + +The `esm/standalone.mjs` entry has changed export style from default export to named export. + +```diff +- import prettier from "https://unpkg.com/prettier@2.6.2/esm/standalone.mjs"; ++ import * as prettier from "https://unpkg.com/prettier@3.0.0/esm/standalone.mjs"; +``` + +```diff +- import prettier from "https://unpkg.com/prettier@2.6.2/esm/standalone.mjs"; ++ import { format } from "https://unpkg.com/prettier@3.0.0/esm/standalone.mjs"; +``` diff --git a/docs/browser.md b/docs/browser.md index 5e0852d23..1fbfc0156 100644 --- a/docs/browser.md +++ b/docs/browser.md @@ -48,7 +48,7 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack ```html