5app / eslint-plugin-sequel

SQL eslint rules to perform: Static analysis to find SQL injection vulnerabilities; Syntax formatting
https://www.npmjs.com/package/eslint-plugin-sequel
1 stars 0 forks source link
eslint eslint-plugin eslint-rules sql

eslint-plugin-sequel

ESLint rules for inline SQL within Template Literals.

Coverage Status CircleCI NPM Version Known Vulnerabilities

Installation

Install eslint-plugin-sequel:

$ npm install eslint-plugin-sequel --save-dev

Usage

Add sequel to the plugins section of your .eslintrc configuration file.

{
    "plugins": ["sequel"]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "sequel/allowed-functions": [
            "error"
            {"disallow": ["GROUP_CONCAT"]}
        ],
        "sequel/function-case": "error",
        "sequel/indent": ["error", "tab"],
        "sequel/max-placeholders": [
            "error",
            {"max": 3}
        ],
        "sequel/no-backticks": "error",
        "sequel/no-eol-command": [
            "error",
            {"allowOnOwnLine": true}
        ],
        "sequel/no-shorthand-all": [
            "error",
            {"allowQualified": true, "allowCountAll": true}
        ],
        "sequel/no-shorthand-offset": "error",
        "sequel/no-unsafe-query": "error",
        "sequel/spacing": "error"
    }
}

Rules