eslint 4.12.1 → 4.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/README.md +3 -3
- package/lib/cli-engine.js +4 -0
- package/lib/linter.js +78 -35
- package/lib/options.js +47 -41
- package/lib/report-translator.js +34 -13
- package/lib/rules/.eslintrc.yml +1 -0
- package/lib/rules/accessor-pairs.js +2 -1
- package/lib/rules/array-bracket-newline.js +2 -1
- package/lib/rules/array-bracket-spacing.js +2 -1
- package/lib/rules/array-callback-return.js +18 -3
- package/lib/rules/array-element-newline.js +2 -1
- package/lib/rules/arrow-body-style.js +15 -2
- package/lib/rules/arrow-parens.js +2 -1
- package/lib/rules/arrow-spacing.js +2 -1
- package/lib/rules/block-scoped-var.js +2 -1
- package/lib/rules/block-spacing.js +2 -1
- package/lib/rules/brace-style.js +2 -1
- package/lib/rules/callback-return.js +2 -1
- package/lib/rules/camelcase.js +29 -17
- package/lib/rules/capitalized-comments.js +2 -1
- package/lib/rules/class-methods-use-this.js +2 -1
- package/lib/rules/comma-dangle.js +2 -1
- package/lib/rules/comma-spacing.js +2 -1
- package/lib/rules/comma-style.js +2 -1
- package/lib/rules/complexity.js +3 -16
- package/lib/rules/computed-property-spacing.js +2 -1
- package/lib/rules/consistent-return.js +2 -1
- package/lib/rules/consistent-this.js +2 -1
- package/lib/rules/constructor-super.js +2 -1
- package/lib/rules/curly.js +2 -1
- package/lib/rules/default-case.js +2 -1
- package/lib/rules/dot-location.js +2 -1
- package/lib/rules/dot-notation.js +2 -1
- package/lib/rules/eol-last.js +10 -1
- package/lib/rules/eqeqeq.js +2 -1
- package/lib/rules/for-direction.js +2 -1
- package/lib/rules/func-call-spacing.js +2 -1
- package/lib/rules/func-name-matching.js +2 -1
- package/lib/rules/func-names.js +2 -1
- package/lib/rules/func-style.js +2 -1
- package/lib/rules/function-paren-newline.js +2 -1
- package/lib/rules/generator-star-spacing.js +2 -1
- package/lib/rules/getter-return.js +2 -1
- package/lib/rules/global-require.js +2 -1
- package/lib/rules/guard-for-in.js +2 -1
- package/lib/rules/handle-callback-err.js +2 -1
- package/lib/rules/id-blacklist.js +2 -1
- package/lib/rules/id-length.js +2 -1
- package/lib/rules/id-match.js +2 -1
- package/lib/rules/implicit-arrow-linebreak.js +2 -1
- package/lib/rules/indent-legacy.js +2 -1
- package/lib/rules/indent.js +13 -2
- package/lib/rules/init-declarations.js +2 -1
- package/lib/rules/jsx-quotes.js +2 -1
- package/lib/rules/key-spacing.js +2 -1
- package/lib/rules/keyword-spacing.js +2 -1
- package/lib/rules/line-comment-position.js +2 -1
- package/lib/rules/linebreak-style.js +2 -1
- package/lib/rules/lines-around-comment.js +2 -1
- package/lib/rules/lines-around-directive.js +2 -1
- package/lib/rules/lines-between-class-members.js +53 -4
- package/lib/rules/max-depth.js +2 -1
- package/lib/rules/max-len.js +2 -1
- package/lib/rules/max-lines.js +2 -1
- package/lib/rules/max-nested-callbacks.js +2 -1
- package/lib/rules/max-params.js +2 -1
- package/lib/rules/max-statements-per-line.js +2 -1
- package/lib/rules/max-statements.js +2 -1
- package/lib/rules/multiline-comment-style.js +2 -1
- package/lib/rules/multiline-ternary.js +2 -1
- package/lib/rules/new-cap.js +2 -1
- package/lib/rules/new-parens.js +2 -1
- package/lib/rules/newline-after-var.js +2 -1
- package/lib/rules/newline-before-return.js +2 -1
- package/lib/rules/newline-per-chained-call.js +2 -1
- package/lib/rules/no-alert.js +2 -1
- package/lib/rules/no-array-constructor.js +2 -1
- package/lib/rules/no-await-in-loop.js +2 -1
- package/lib/rules/no-bitwise.js +2 -1
- package/lib/rules/no-buffer-constructor.js +2 -1
- package/lib/rules/no-caller.js +2 -1
- package/lib/rules/no-case-declarations.js +2 -1
- package/lib/rules/no-catch-shadow.js +2 -1
- package/lib/rules/no-class-assign.js +2 -1
- package/lib/rules/no-compare-neg-zero.js +2 -1
- package/lib/rules/no-cond-assign.js +2 -1
- package/lib/rules/no-confusing-arrow.js +2 -1
- package/lib/rules/no-console.js +2 -1
- package/lib/rules/no-const-assign.js +2 -1
- package/lib/rules/no-constant-condition.js +2 -1
- package/lib/rules/no-continue.js +2 -1
- package/lib/rules/no-control-regex.js +2 -1
- package/lib/rules/no-debugger.js +2 -1
- package/lib/rules/no-delete-var.js +2 -1
- package/lib/rules/no-div-regex.js +2 -1
- package/lib/rules/no-dupe-args.js +2 -1
- package/lib/rules/no-dupe-class-members.js +2 -1
- package/lib/rules/no-dupe-keys.js +2 -1
- package/lib/rules/no-duplicate-case.js +2 -1
- package/lib/rules/no-duplicate-imports.js +2 -1
- package/lib/rules/no-else-return.js +2 -1
- package/lib/rules/no-empty-character-class.js +2 -1
- package/lib/rules/no-empty-function.js +2 -1
- package/lib/rules/no-empty-pattern.js +2 -1
- package/lib/rules/no-empty.js +2 -1
- package/lib/rules/no-eq-null.js +2 -1
- package/lib/rules/no-eval.js +2 -1
- package/lib/rules/no-ex-assign.js +2 -1
- package/lib/rules/no-extend-native.js +2 -1
- package/lib/rules/no-extra-bind.js +2 -1
- package/lib/rules/no-extra-boolean-cast.js +2 -1
- package/lib/rules/no-extra-label.js +2 -1
- package/lib/rules/no-extra-parens.js +3 -2
- package/lib/rules/no-extra-semi.js +2 -1
- package/lib/rules/no-fallthrough.js +2 -1
- package/lib/rules/no-floating-decimal.js +2 -1
- package/lib/rules/no-func-assign.js +2 -1
- package/lib/rules/no-global-assign.js +2 -1
- package/lib/rules/no-implicit-coercion.js +2 -1
- package/lib/rules/no-implicit-globals.js +2 -1
- package/lib/rules/no-implied-eval.js +2 -1
- package/lib/rules/no-inline-comments.js +2 -1
- package/lib/rules/no-inner-declarations.js +2 -1
- package/lib/rules/no-invalid-regexp.js +2 -1
- package/lib/rules/no-invalid-this.js +2 -1
- package/lib/rules/no-irregular-whitespace.js +2 -1
- package/lib/rules/no-iterator.js +2 -1
- package/lib/rules/no-label-var.js +2 -1
- package/lib/rules/no-labels.js +2 -1
- package/lib/rules/no-lone-blocks.js +2 -1
- package/lib/rules/no-lonely-if.js +2 -1
- package/lib/rules/no-loop-func.js +2 -1
- package/lib/rules/no-magic-numbers.js +2 -1
- package/lib/rules/no-mixed-operators.js +2 -1
- package/lib/rules/no-mixed-requires.js +2 -1
- package/lib/rules/no-mixed-spaces-and-tabs.js +2 -1
- package/lib/rules/no-multi-assign.js +2 -1
- package/lib/rules/no-multi-spaces.js +2 -1
- package/lib/rules/no-multi-str.js +2 -1
- package/lib/rules/no-multiple-empty-lines.js +2 -1
- package/lib/rules/no-native-reassign.js +2 -1
- package/lib/rules/no-negated-condition.js +2 -1
- package/lib/rules/no-negated-in-lhs.js +2 -1
- package/lib/rules/no-nested-ternary.js +2 -1
- package/lib/rules/no-new-func.js +2 -1
- package/lib/rules/no-new-object.js +2 -1
- package/lib/rules/no-new-require.js +2 -1
- package/lib/rules/no-new-symbol.js +2 -1
- package/lib/rules/no-new-wrappers.js +2 -1
- package/lib/rules/no-new.js +2 -1
- package/lib/rules/no-obj-calls.js +2 -1
- package/lib/rules/no-octal-escape.js +2 -1
- package/lib/rules/no-octal.js +2 -1
- package/lib/rules/no-param-reassign.js +2 -1
- package/lib/rules/no-path-concat.js +2 -1
- package/lib/rules/no-plusplus.js +2 -1
- package/lib/rules/no-process-env.js +2 -1
- package/lib/rules/no-process-exit.js +2 -1
- package/lib/rules/no-proto.js +2 -1
- package/lib/rules/no-prototype-builtins.js +2 -1
- package/lib/rules/no-redeclare.js +2 -1
- package/lib/rules/no-regex-spaces.js +2 -1
- package/lib/rules/no-restricted-globals.js +2 -1
- package/lib/rules/no-restricted-imports.js +2 -1
- package/lib/rules/no-restricted-modules.js +2 -1
- package/lib/rules/no-restricted-properties.js +2 -1
- package/lib/rules/no-restricted-syntax.js +2 -1
- package/lib/rules/no-return-assign.js +2 -1
- package/lib/rules/no-return-await.js +5 -1
- package/lib/rules/no-script-url.js +2 -1
- package/lib/rules/no-self-assign.js +2 -1
- package/lib/rules/no-self-compare.js +2 -1
- package/lib/rules/no-sequences.js +2 -1
- package/lib/rules/no-shadow-restricted-names.js +2 -1
- package/lib/rules/no-shadow.js +2 -1
- package/lib/rules/no-spaced-func.js +2 -1
- package/lib/rules/no-sparse-arrays.js +2 -1
- package/lib/rules/no-sync.js +2 -1
- package/lib/rules/no-tabs.js +2 -1
- package/lib/rules/no-template-curly-in-string.js +2 -1
- package/lib/rules/no-ternary.js +2 -1
- package/lib/rules/no-this-before-super.js +2 -1
- package/lib/rules/no-throw-literal.js +2 -1
- package/lib/rules/no-trailing-spaces.js +2 -1
- package/lib/rules/no-undef-init.js +2 -1
- package/lib/rules/no-undef.js +2 -1
- package/lib/rules/no-undefined.js +2 -1
- package/lib/rules/no-underscore-dangle.js +2 -1
- package/lib/rules/no-unexpected-multiline.js +2 -1
- package/lib/rules/no-unmodified-loop-condition.js +81 -79
- package/lib/rules/no-unneeded-ternary.js +2 -1
- package/lib/rules/no-unreachable.js +2 -1
- package/lib/rules/no-unsafe-finally.js +2 -1
- package/lib/rules/no-unsafe-negation.js +2 -1
- package/lib/rules/no-unused-expressions.js +2 -1
- package/lib/rules/no-unused-labels.js +2 -1
- package/lib/rules/no-unused-vars.js +10 -14
- package/lib/rules/no-use-before-define.js +2 -1
- package/lib/rules/no-useless-call.js +2 -1
- package/lib/rules/no-useless-computed-key.js +2 -1
- package/lib/rules/no-useless-concat.js +2 -1
- package/lib/rules/no-useless-constructor.js +2 -1
- package/lib/rules/no-useless-escape.js +2 -1
- package/lib/rules/no-useless-rename.js +2 -1
- package/lib/rules/no-useless-return.js +2 -1
- package/lib/rules/no-var.js +2 -1
- package/lib/rules/no-void.js +2 -1
- package/lib/rules/no-warning-comments.js +2 -1
- package/lib/rules/no-whitespace-before-property.js +2 -1
- package/lib/rules/no-with.js +2 -1
- package/lib/rules/nonblock-statement-body-position.js +2 -1
- package/lib/rules/object-curly-newline.js +2 -1
- package/lib/rules/object-curly-spacing.js +2 -1
- package/lib/rules/object-property-newline.js +2 -1
- package/lib/rules/object-shorthand.js +2 -1
- package/lib/rules/one-var-declaration-per-line.js +2 -1
- package/lib/rules/one-var.js +42 -8
- package/lib/rules/operator-assignment.js +2 -1
- package/lib/rules/operator-linebreak.js +2 -1
- package/lib/rules/padded-blocks.js +2 -1
- package/lib/rules/padding-line-between-statements.js +2 -1
- package/lib/rules/prefer-arrow-callback.js +2 -1
- package/lib/rules/prefer-const.js +2 -1
- package/lib/rules/prefer-destructuring.js +2 -1
- package/lib/rules/prefer-numeric-literals.js +2 -1
- package/lib/rules/prefer-promise-reject-errors.js +2 -1
- package/lib/rules/prefer-reflect.js +2 -1
- package/lib/rules/prefer-rest-params.js +2 -1
- package/lib/rules/prefer-spread.js +2 -1
- package/lib/rules/prefer-template.js +2 -1
- package/lib/rules/quote-props.js +2 -1
- package/lib/rules/quotes.js +2 -1
- package/lib/rules/radix.js +2 -1
- package/lib/rules/require-await.js +2 -1
- package/lib/rules/require-jsdoc.js +2 -1
- package/lib/rules/require-yield.js +2 -1
- package/lib/rules/rest-spread-spacing.js +2 -1
- package/lib/rules/semi-spacing.js +2 -1
- package/lib/rules/semi-style.js +2 -1
- package/lib/rules/semi.js +2 -1
- package/lib/rules/sort-imports.js +2 -1
- package/lib/rules/sort-keys.js +2 -1
- package/lib/rules/sort-vars.js +2 -1
- package/lib/rules/space-before-blocks.js +2 -1
- package/lib/rules/space-before-function-paren.js +2 -1
- package/lib/rules/space-in-parens.js +2 -1
- package/lib/rules/space-infix-ops.js +2 -1
- package/lib/rules/space-unary-ops.js +2 -1
- package/lib/rules/spaced-comment.js +2 -1
- package/lib/rules/strict.js +2 -1
- package/lib/rules/switch-colon-spacing.js +2 -1
- package/lib/rules/symbol-description.js +2 -1
- package/lib/rules/template-curly-spacing.js +2 -1
- package/lib/rules/template-tag-spacing.js +2 -1
- package/lib/rules/unicode-bom.js +2 -1
- package/lib/rules/use-isnan.js +2 -1
- package/lib/rules/valid-jsdoc.js +2 -1
- package/lib/rules/valid-typeof.js +2 -1
- package/lib/rules/vars-on-top.js +2 -1
- package/lib/rules/wrap-iife.js +2 -1
- package/lib/rules/wrap-regex.js +2 -1
- package/lib/rules/yield-star-spacing.js +2 -1
- package/lib/rules/yoda.js +2 -1
- package/lib/testers/rule-tester.js +63 -30
- package/lib/util/interpolate.js +24 -0
- package/lib/util/source-code.js +41 -6
- package/lib/util/traverser.js +163 -15
- package/package.json +3 -3
@@ -55,7 +55,8 @@ module.exports = {
|
|
55
55
|
docs: {
|
56
56
|
description: "require empty lines around comments",
|
57
57
|
category: "Stylistic Issues",
|
58
|
-
recommended: false
|
58
|
+
recommended: false,
|
59
|
+
url: "https://eslint.org/docs/rules/lines-around-comment"
|
59
60
|
},
|
60
61
|
|
61
62
|
fixable: "whitespace",
|
@@ -18,7 +18,8 @@ module.exports = {
|
|
18
18
|
description: "require or disallow newlines around directives",
|
19
19
|
category: "Stylistic Issues",
|
20
20
|
recommended: false,
|
21
|
-
replacedBy: ["padding-line-between-statements"]
|
21
|
+
replacedBy: ["padding-line-between-statements"],
|
22
|
+
url: "https://eslint.org/docs/rules/lines-around-directive"
|
22
23
|
},
|
23
24
|
schema: [{
|
24
25
|
oneOf: [
|
@@ -15,7 +15,8 @@ module.exports = {
|
|
15
15
|
docs: {
|
16
16
|
description: "require or disallow an empty line between class members",
|
17
17
|
category: "Stylistic Issues",
|
18
|
-
recommended: false
|
18
|
+
recommended: false,
|
19
|
+
url: "https://eslint.org/docs/rules/lines-between-class-members"
|
19
20
|
},
|
20
21
|
|
21
22
|
fixable: "whitespace",
|
@@ -55,7 +56,56 @@ module.exports = {
|
|
55
56
|
* @returns {boolean} True if there is at least a line between the tokens
|
56
57
|
*/
|
57
58
|
function isPaddingBetweenTokens(first, second) {
|
58
|
-
|
59
|
+
const comments = sourceCode.getCommentsBefore(second);
|
60
|
+
const len = comments.length;
|
61
|
+
|
62
|
+
// If there is no comments
|
63
|
+
if (len === 0) {
|
64
|
+
const linesBetweenFstAndSnd = second.loc.start.line - first.loc.end.line - 1;
|
65
|
+
|
66
|
+
return linesBetweenFstAndSnd >= 1;
|
67
|
+
}
|
68
|
+
|
69
|
+
|
70
|
+
// If there are comments
|
71
|
+
let sumOfCommentLines = 0; // the numbers of lines of comments
|
72
|
+
let prevCommentLineNum = -1; // line number of the end of the previous comment
|
73
|
+
|
74
|
+
for (let i = 0; i < len; i++) {
|
75
|
+
const commentLinesOfThisComment = comments[i].loc.end.line - comments[i].loc.start.line + 1;
|
76
|
+
|
77
|
+
sumOfCommentLines += commentLinesOfThisComment;
|
78
|
+
|
79
|
+
/*
|
80
|
+
* If this comment and the previous comment are in the same line,
|
81
|
+
* the count of comment lines is duplicated. So decrement sumOfCommentLines.
|
82
|
+
*/
|
83
|
+
if (prevCommentLineNum === comments[i].loc.start.line) {
|
84
|
+
sumOfCommentLines -= 1;
|
85
|
+
}
|
86
|
+
|
87
|
+
prevCommentLineNum = comments[i].loc.end.line;
|
88
|
+
}
|
89
|
+
|
90
|
+
/*
|
91
|
+
* If the first block and the first comment are in the same line,
|
92
|
+
* the count of comment lines is duplicated. So decrement sumOfCommentLines.
|
93
|
+
*/
|
94
|
+
if (first.loc.end.line === comments[0].loc.start.line) {
|
95
|
+
sumOfCommentLines -= 1;
|
96
|
+
}
|
97
|
+
|
98
|
+
/*
|
99
|
+
* If the last comment and the second block are in the same line,
|
100
|
+
* the count of comment lines is duplicated. So decrement sumOfCommentLines.
|
101
|
+
*/
|
102
|
+
if (comments[len - 1].loc.end.line === second.loc.start.line) {
|
103
|
+
sumOfCommentLines -= 1;
|
104
|
+
}
|
105
|
+
|
106
|
+
const linesBetweenFstAndSnd = second.loc.start.line - first.loc.end.line - 1;
|
107
|
+
|
108
|
+
return linesBetweenFstAndSnd - sumOfCommentLines >= 1;
|
59
109
|
}
|
60
110
|
|
61
111
|
return {
|
@@ -65,8 +115,7 @@ module.exports = {
|
|
65
115
|
for (let i = 0; i < body.length - 1; i++) {
|
66
116
|
const curFirst = sourceCode.getFirstToken(body[i]);
|
67
117
|
const curLast = sourceCode.getLastToken(body[i]);
|
68
|
-
const
|
69
|
-
const nextFirst = comments.length ? comments[0] : sourceCode.getFirstToken(body[i + 1]);
|
118
|
+
const nextFirst = sourceCode.getFirstToken(body[i + 1]);
|
70
119
|
const isPadded = isPaddingBetweenTokens(curLast, nextFirst);
|
71
120
|
const isMulti = !astUtils.isTokenOnSameLine(curFirst, curLast);
|
72
121
|
const skip = !isMulti && options[1].exceptAfterSingleLine;
|
package/lib/rules/max-depth.js
CHANGED
package/lib/rules/max-len.js
CHANGED
package/lib/rules/max-lines.js
CHANGED
@@ -14,7 +14,8 @@ module.exports = {
|
|
14
14
|
docs: {
|
15
15
|
description: "enforce a maximum depth that callbacks can be nested",
|
16
16
|
category: "Stylistic Issues",
|
17
|
-
recommended: false
|
17
|
+
recommended: false,
|
18
|
+
url: "https://eslint.org/docs/rules/max-nested-callbacks"
|
18
19
|
},
|
19
20
|
|
20
21
|
schema: [
|
package/lib/rules/max-params.js
CHANGED
@@ -22,7 +22,8 @@ module.exports = {
|
|
22
22
|
docs: {
|
23
23
|
description: "enforce a maximum number of parameters in function definitions",
|
24
24
|
category: "Stylistic Issues",
|
25
|
-
recommended: false
|
25
|
+
recommended: false,
|
26
|
+
url: "https://eslint.org/docs/rules/max-params"
|
26
27
|
},
|
27
28
|
|
28
29
|
schema: [
|
@@ -19,7 +19,8 @@ module.exports = {
|
|
19
19
|
docs: {
|
20
20
|
description: "enforce a maximum number of statements allowed per line",
|
21
21
|
category: "Stylistic Issues",
|
22
|
-
recommended: false
|
22
|
+
recommended: false,
|
23
|
+
url: "https://eslint.org/docs/rules/max-statements-per-line"
|
23
24
|
},
|
24
25
|
|
25
26
|
schema: [
|
@@ -22,7 +22,8 @@ module.exports = {
|
|
22
22
|
docs: {
|
23
23
|
description: "enforce a maximum number of statements allowed in function blocks",
|
24
24
|
category: "Stylistic Issues",
|
25
|
-
recommended: false
|
25
|
+
recommended: false,
|
26
|
+
url: "https://eslint.org/docs/rules/max-statements"
|
26
27
|
},
|
27
28
|
|
28
29
|
schema: [
|
@@ -15,7 +15,8 @@ module.exports = {
|
|
15
15
|
docs: {
|
16
16
|
description: "enforce a particular style for multiline comments",
|
17
17
|
category: "Stylistic Issues",
|
18
|
-
recommended: false
|
18
|
+
recommended: false,
|
19
|
+
url: "https://eslint.org/docs/rules/multiline-comment-style"
|
19
20
|
},
|
20
21
|
fixable: "whitespace",
|
21
22
|
schema: [{ enum: ["starred-block", "separate-lines", "bare-block"] }]
|
@@ -16,7 +16,8 @@ module.exports = {
|
|
16
16
|
docs: {
|
17
17
|
description: "enforce newlines between operands of ternary expressions",
|
18
18
|
category: "Stylistic Issues",
|
19
|
-
recommended: false
|
19
|
+
recommended: false,
|
20
|
+
url: "https://eslint.org/docs/rules/multiline-ternary"
|
20
21
|
},
|
21
22
|
schema: [
|
22
23
|
{
|
package/lib/rules/new-cap.js
CHANGED
package/lib/rules/new-parens.js
CHANGED
@@ -24,7 +24,8 @@ module.exports = {
|
|
24
24
|
docs: {
|
25
25
|
description: "require parentheses when invoking a constructor with no arguments",
|
26
26
|
category: "Stylistic Issues",
|
27
|
-
recommended: false
|
27
|
+
recommended: false,
|
28
|
+
url: "https://eslint.org/docs/rules/new-parens"
|
28
29
|
},
|
29
30
|
|
30
31
|
schema: [],
|
@@ -22,7 +22,8 @@ module.exports = {
|
|
22
22
|
description: "require or disallow an empty line after variable declarations",
|
23
23
|
category: "Stylistic Issues",
|
24
24
|
recommended: false,
|
25
|
-
replacedBy: ["padding-line-between-statements"]
|
25
|
+
replacedBy: ["padding-line-between-statements"],
|
26
|
+
url: "https://eslint.org/docs/rules/newline-after-var"
|
26
27
|
},
|
27
28
|
|
28
29
|
schema: [
|
@@ -15,7 +15,8 @@ module.exports = {
|
|
15
15
|
description: "require an empty line before `return` statements",
|
16
16
|
category: "Stylistic Issues",
|
17
17
|
recommended: false,
|
18
|
-
replacedBy: ["padding-line-between-statements"]
|
18
|
+
replacedBy: ["padding-line-between-statements"],
|
19
|
+
url: "https://eslint.org/docs/rules/newline-before-return"
|
19
20
|
},
|
20
21
|
fixable: "whitespace",
|
21
22
|
schema: [],
|
@@ -17,7 +17,8 @@ module.exports = {
|
|
17
17
|
docs: {
|
18
18
|
description: "require a newline after each call in a method chain",
|
19
19
|
category: "Stylistic Issues",
|
20
|
-
recommended: false
|
20
|
+
recommended: false,
|
21
|
+
url: "https://eslint.org/docs/rules/newline-per-chained-call"
|
21
22
|
},
|
22
23
|
fixable: "whitespace",
|
23
24
|
schema: [{
|
package/lib/rules/no-alert.js
CHANGED
package/lib/rules/no-bitwise.js
CHANGED
@@ -13,7 +13,8 @@ module.exports = {
|
|
13
13
|
docs: {
|
14
14
|
description: "disallow use of the Buffer() constructor",
|
15
15
|
category: "Node.js and CommonJS",
|
16
|
-
recommended: false
|
16
|
+
recommended: false,
|
17
|
+
url: "https://eslint.org/docs/rules/no-buffer-constructor"
|
17
18
|
},
|
18
19
|
schema: []
|
19
20
|
},
|
package/lib/rules/no-caller.js
CHANGED
@@ -14,7 +14,8 @@ module.exports = {
|
|
14
14
|
docs: {
|
15
15
|
description: "disallow the use of `arguments.caller` or `arguments.callee`",
|
16
16
|
category: "Best Practices",
|
17
|
-
recommended: false
|
17
|
+
recommended: false,
|
18
|
+
url: "https://eslint.org/docs/rules/no-caller"
|
18
19
|
},
|
19
20
|
|
20
21
|
schema: []
|
@@ -20,7 +20,8 @@ module.exports = {
|
|
20
20
|
docs: {
|
21
21
|
description: "disallow `catch` clause parameters from shadowing variables in the outer scope",
|
22
22
|
category: "Variables",
|
23
|
-
recommended: false
|
23
|
+
recommended: false,
|
24
|
+
url: "https://eslint.org/docs/rules/no-catch-shadow"
|
24
25
|
},
|
25
26
|
|
26
27
|
schema: []
|
@@ -30,7 +30,8 @@ module.exports = {
|
|
30
30
|
docs: {
|
31
31
|
description: "disallow arrow functions where they could be confused with comparisons",
|
32
32
|
category: "ECMAScript 6",
|
33
|
-
recommended: false
|
33
|
+
recommended: false,
|
34
|
+
url: "https://eslint.org/docs/rules/no-confusing-arrow"
|
34
35
|
},
|
35
36
|
|
36
37
|
fixable: "code",
|
package/lib/rules/no-console.js
CHANGED
package/lib/rules/no-continue.js
CHANGED
package/lib/rules/no-debugger.js
CHANGED
@@ -14,7 +14,8 @@ module.exports = {
|
|
14
14
|
docs: {
|
15
15
|
description: "disallow division operators explicitly at the beginning of regular expressions",
|
16
16
|
category: "Best Practices",
|
17
|
-
recommended: false
|
17
|
+
recommended: false,
|
18
|
+
url: "https://eslint.org/docs/rules/no-div-regex"
|
18
19
|
},
|
19
20
|
|
20
21
|
schema: []
|
@@ -21,7 +21,8 @@ module.exports = {
|
|
21
21
|
docs: {
|
22
22
|
description: "disallow `else` blocks after `return` statements in `if` statements",
|
23
23
|
category: "Best Practices",
|
24
|
-
recommended: false
|
24
|
+
recommended: false,
|
25
|
+
url: "https://eslint.org/docs/rules/no-else-return"
|
25
26
|
},
|
26
27
|
|
27
28
|
schema: [{
|
@@ -32,7 +32,8 @@ module.exports = {
|
|
32
32
|
docs: {
|
33
33
|
description: "disallow empty character classes in regular expressions",
|
34
34
|
category: "Possible Errors",
|
35
|
-
recommended: true
|
35
|
+
recommended: true,
|
36
|
+
url: "https://eslint.org/docs/rules/no-empty-character-class"
|
36
37
|
},
|
37
38
|
|
38
39
|
schema: []
|
package/lib/rules/no-empty.js
CHANGED
package/lib/rules/no-eq-null.js
CHANGED
@@ -15,7 +15,8 @@ module.exports = {
|
|
15
15
|
docs: {
|
16
16
|
description: "disallow `null` comparisons without type-checking operators",
|
17
17
|
category: "Best Practices",
|
18
|
-
recommended: false
|
18
|
+
recommended: false,
|
19
|
+
url: "https://eslint.org/docs/rules/no-eq-null"
|
19
20
|
},
|
20
21
|
|
21
22
|
schema: []
|
package/lib/rules/no-eval.js
CHANGED