0.2.2 • Published 2 months ago

eslint-plugin-knex v0.2.2

Weekly downloads
62
License
MIT
Repository
-
Last release
2 months ago

eslint-plugin-knex

npm version

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

Rules

knex/avoid-injections

Avoid some issues related to SQL injection by disallowing plain strings as the query argument to the raw queries. Check out the tests to get a sense for what is valid and not.

0.2.2

2 months ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago