Seegno-flavored JSCS preset.
$ npm install jscs jscs-preset-seegno --save-dev
Create an .jscsrc
file with the following:
preset: seegno
Add the following script
to your package.json
:
{
"scripts": {
"lint": "jscs ."
}
}
and run the linter with:
$ npm run lint
The preset includes the following list of custom rules.
Disallows the usage of raw SQL templates with interpolation.
This rule enforces the usage of a library such as sql-tag, which escapes data provided to an SQL query statement via interpolation, helping to avoid, for instance, potential injection attacks.
Requires: sql-tag
Type: Boolean
Value: true
requireSqlTemplate: true
const column = '*';
const query = sql`SELECT ${column} FROM foobar`;
fn(sql`SELECT ${column} FROM foobar`)
const column = '*';
const query = `SELECT ${column} FROM foobar`;
fn(`SELECT ${column} FROM foobar`)