Detalhes do pacote

@putout/plugin-remove-quotes-from-import-assertions

coderaiser5.1kMIT1.0.2

🐊Putout plugin adds ability to find and remove quotes from import assertions

putout, putout-plugin, plugin, remove

readme (leia-me)

@putout/plugin-remove-quotes-from-import-assertions NPM version

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