What's Changed
Features
This release adds support for experimental import attributes / assertions. There have been a number of styles proposed by TC-39 over the years, but the latest is to use import x from 'x' with { type: 'json' };
, which is called an "import attribute". There is also an older "import assertion" form, which uses assert
instead of with
.
Note: You may need to add "importAttributes"
to your "importOrderParserPlugins"
option in order to support this. And if you are using the older assertion style, you'll need to add it as '[\"importAttributes\", {\"deprecatedAssertSyntax\": true}]'
.
This plugin will also convert the older assertion style to import attributes.
Bugfixes
TypeScript
- Augment Prettier
Options
types with internalPluginConfig
by @jeremy-code in #172
You can now type your prettier config as simply /** @type {import("prettier").Config} */
, and you'll also get the types for the options this plugin adds, automatically.
Docs
New Contributors
- @ADTC made their first contribution in #165
- @jeremy-code made their first contribution in #172
Full Changelog: v4.2.1...v4.3.0