@putout/plugin-convert-assert-to-with

2.0.0 • Public • Published

@putout/plugin-convert-assert-to-with NPM version

This feature would ideally use the with keyword to denote attributes, but there are existing implementations based on a previous version of the proposal using the assert keyword. Due to potential web compatibility risks, the proposal still includes assert marked as deprecated. Usage of the old syntax is discouraged, and its removal is being investigated.

(c) tc39

🐊Putout plugin adds ability to convert assert to with. Check out in 🐊Putout Editor.

Install

npm i @putout/plugin-convert-assert-to-with -D

Rule

{
    "rules": {
        "convert-assert-to-with": "on"
    }
}

❌ Example of incorrect code

import json from './foo.json' with { type: 'json' };

import('foo.json');

✅ Example of correct code

import json from './foo.json' with { type: 'json' };

import('foo.json');

License

MIT

Package Sidebar

Install

npm i @putout/plugin-convert-assert-to-with

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

4.43 kB

Total Files

4

Last publish

Collaborators

  • coderaiser