@putout/plugin-remove-quotes-from-import-assertions
v1.0.3
Published
šPutout plugin adds ability to find and remove quotes from import assertions
Downloads
15,377
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. Merged to @putout/plugin-esm
.
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' };
License
MIT