README
eslint-plugin-knex
Installation
npm install -D eslint-plugin-knex
yarn add -D eslint-plugin-knex
Usage
In your eslint config file:
{
"plugins": ["knex"],
"rules": {
"knex/avoid-injections": "error"
}
}
Settings
You can configure what names you intend to use for the knex client. Make sure to
include the library itself (knex), but also transaction variables (trx,
transaction).
{
"settings": {
"knex": {
"builderName": "^(knex|transaction)