Skip to content

ESLint rule for enforcing sloniks sql.json() function instead of JSON.stringify in sql templated strings

License

Notifications You must be signed in to change notification settings

nagibyro/eslint-plugin-slonik-safe-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"
}

About

ESLint rule for enforcing sloniks sql.json() function instead of JSON.stringify in sql templated strings

Resources

License

Stars

Watchers

Forks

Packages

No packages published