1.0.0 β€’ Published 1 year ago

@putout/plugin-remove-quotes-from-import-assertions v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@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.

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' };