1.9.10 • Published 4 months ago
eslint-plugin-sequel v1.9.10
eslint-plugin-sequel
ESLint rules for inline SQL within Template Literals.
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/function-case": 2,
"sequel/indent": [2, "tab"],
"sequel/max-placeholders": [2, {"max": 3}],
"sequel/no-eol-command": [2, {"allowOnOwnLine": true}],
"sequel/no-shorthand-all": [
2,
{"allowQualified": true, "allowCountAll": true}
],
"sequel/no-unsafe-query": 2,
"sequel/spacing": 2
}
}
Rules
sequel/function-case
: Makes SQL function names uppercase, e.g. 'SELECT' fixablesequel/indent
: Enforces indentation fixable'tab'|Number
: Defines the characters to use, where Number is given it uses spaces (default2
).
sequel/max-placeholders
: Placeholders,?
character, can be hard to read if there are many in the same SQL string.max
: Maximum number of placeholders allowed (default3
)
sequel/no-eol-command
: Avoid ending lines with a SQL command which is always followed by a value.allowOnOwnLine
: Permits the command to appear if it is not preceeded by anything, allowing commands to be easily read.
sequel/no-shorthand-all
: Avoid using the ambiguous shorthand all '*'.allowQualified
(Boolean, default:false
): Permits qualified shorthand all e.g.table.*
to get everything from a table.allowCountAll
(Boolean, default:false
): Permits withinCOUNT()
e.g.COUNT(*)
.
sequel/no-unsafe-query
: Checks whether there are potentially any vulnerable SQL'ish template literals, fix by using SQL placeholders or using SQL templating formattersequel/spacing
: Multiple spaces and tabs should only be used for indentation fixable
1.12.1
4 months ago
1.12.0
4 months ago
1.11.0
4 months ago
1.10.0
5 months ago
1.9.10
1 year ago
1.9.9
2 years ago
1.9.8
3 years ago
1.9.7
3 years ago
1.9.6
3 years ago
1.9.5
3 years ago
1.9.4
3 years ago
1.9.3
3 years ago
1.9.1
4 years ago
1.9.0
4 years ago
1.9.2
4 years ago
1.8.0
4 years ago
1.7.0
5 years ago
1.6.0
5 years ago
1.5.3
5 years ago
1.5.2
5 years ago
1.5.1
5 years ago
1.5.0
5 years ago
1.4.1
5 years ago
1.4.0
5 years ago
1.3.3
5 years ago
1.3.2
5 years ago
1.3.1
5 years ago
1.3.0
5 years ago
1.2.0
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago