@putout/plugin-remove-quotes-from-import-assertions
v1.0.0
Published
šPutout plugin adds ability to find and remove quotes from import assertions
Downloads
18,420
Maintainers
Readme
@putout/plugin-remove-quotes-from-import-assertions
The new import assertions feature allows module import statements to include additional information alongside the module specifier. An initial use for the feature is to enable JSON documents to be imported as JSON modules:
(c) MDN
šPutout plugin adds ability to find and remove quotes from import assertions. Checkout in šPutout Editor.
Install
npm i @putout/plugin-remove-quotes-from-import-assertions
Rule
{
"rules": {
"remove-quotes-from-import-assertions": "on"
}
}
ā Example of incorrect code
import json from './mod.json' with { 'type': 'json' };
ā Example of correct code
import json from './mod.json' with { type: 'json' };