1.0.0 β’ Published 1 year ago
@putout/plugin-remove-quotes-from-import-assertions v1.0.0
@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' };
1.0.0
1 year ago