ESLint rule for not allowing JSON.stringify
inside slonik sql tagged template literals
Once you have ESLint installed then install the plugin:
npm install --save-dev eslint-plugin-slonik-safe-json
Add slonik-safe-json
to plugins section of .eslintrc
config file.
{
"plugins": [
"slonik-safe-json"
]
}
Add rule in rules section
"rules": {
"slonik-safe-json/no-json-stringify": "error"
}