2.0.1 β’ Published 1 year ago
@putout/plugin-convert-assert-to-with v2.0.1
@putout/plugin-convert-assert-to-with 
This feature would ideally use the
withkeyword to denote attributes, but there are existing implementations based on a previous version of the proposal using theassertkeyword. Due to potential web compatibility risks, the proposal still includesassertmarked 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. Merted with @putout/plugin-esm.
Install
npm i @putout/plugin-convert-assert-to-with -DRule
{
"rules": {
"convert-assert-to-with": "on"
}
}β Example of incorrect code
import json from './foo.json' assert { type: 'json' };
import('foo.json');β Example of correct code
import json from './foo.json' with { type: 'json' };
import('foo.json');License
MIT