Seegno-flavored JSCS preset.
$ npm install jscs jscs-preset-seegno --save-devCreate an .jscsrc file with the following:
preset: seegnoAdd the following script to your package.json:
{
"scripts": {
"lint": "jscs ."
}
}and run the linter with:
$ npm run lintThe 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: trueconst 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`)