- eol-last
- key-spacing
- padding-line-between-statements
- comma-dangle
- max-len
- eol-last
- no-multiple-empty-lines
- no-this-before-super
- refer-destructuring
- prefer-object-spread
- jsx-quotes
- prefer-const
...
Code Block |
---|
/*eslint comma-dangle: ["error", "always-multiline"]*/ var foo = { bar: "baz", qux: "quux", }; var foo = {bar: "baz", qux: "quux"}; var arr = [1,2]; var arr = [1, 2]; var arr = [ 1, 2, ]; foo({ bar: "baz", qux: "quux", }); |
max-len
currently: "max-len": "off"
...
Code Block |
---|
/*eslint max-len: ["error", { "code": 80 }]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
}; |
eol-last
Examples of incorrect code for this rule:
Code Block |
---|
/*eslint eol-last: ["error", "always"]*/
function doSmth() {
var foo = 2;
} |
Examples of correct code for this rule:
Code Block |
---|
/*eslint eol-last: ["error", "always"]*/
function doSmth() {
var foo = 2;
}\n |
no-multiple-empty-lines
Examples of incorrect code for this rule:
Code Block |
---|
/*eslint no-multiple-empty-lines: ["error", { "max": 1, "maxBOF": 0, "maxBOF": 0}]*/
var foo = 5;
var bar = 3; |
Examples of correct code for this rule:
Code Block |
---|
/*eslint no-multiple-empty-lines: ["error", { "max": 1, "maxBOF": 0, "maxBOF": 0}]*/
var foo = 5;
н
var bar = 3; |
no-this-before-super
Examples of incorrect code for this rule:
...