eslint-plugin-slonik-safe-json
v1.0.2
Published
ESLint rule for enforcing sloniks sql.json() function instead of JSON.stringify in sql templated strings
Downloads
21
Maintainers
Readme
eslint-plugin-slonik-safe-json
ESLint rule for not allowing JSON.stringify
inside slonik sql tagged template literals
Installation
Once you have ESLint installed then install the plugin:
npm install --save-dev eslint-plugin-slonik-safe-json
Usage
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"
}