eslint 4.14.0 → 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 +15 -0
- package/README.md +1 -1
- package/lib/cli-engine.js +4 -0
- package/lib/linter.js +2 -1
- 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 +2 -1
- package/lib/rules/array-element-newline.js +2 -1
- package/lib/rules/arrow-body-style.js +2 -1
- 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 +2 -1
- 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 +2 -1
- 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 +2 -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 +2 -1
- 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 +2 -1
- 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 +2 -1
- 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/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
v4.15.0 - January 6, 2018
|
2
|
+
|
3
|
+
* 6ab04b5 New: Add context.report({ messageId }) (fixes #6740) (#9165) (Jed Fox)
|
4
|
+
* fc7f404 Docs: add url to each of the rules (refs #6582) (#9788) (Patrick McElhaney)
|
5
|
+
* fc44da9 Docs: fix sort-imports rule block language (#9805) (ferhat elmas)
|
6
|
+
* 65f0176 New: CLIEngine#getRules() (refs #6582) (#9782) (Patrick McElhaney)
|
7
|
+
* c64195f Update: More detailed assert message for rule-tester (#9769) (Weijia Wang)
|
8
|
+
* 9fcfabf Fix: no-extra-parens false positive (fixes: #9755) (#9795) (Erin)
|
9
|
+
* 61e5fa0 Docs: Add table of contents to Node.js API docs (#9785) (Patrick McElhaney)
|
10
|
+
* 4c87f42 Fix: incorrect error messages of no-unused-vars (fixes #9774) (#9791) (akouryy)
|
11
|
+
* bbabf34 Update: add `ignoreComments` option to `indent` rule (fixes #9018) (#9752) (Kevin Partington)
|
12
|
+
* db431cb Docs: HTTP -> HTTPS (fixes #9768) (#9768) (Ronald Eddy Jr)
|
13
|
+
* cbf0fb9 Docs: describe how to feature-detect scopeManager/visitorKeys support (#9764) (Teddy Katz)
|
14
|
+
* f7dcb70 Docs: Add note about "patch release pending" label to maintainer guide (#9763) (Teddy Katz)
|
15
|
+
|
1
16
|
v4.14.0 - December 23, 2017
|
2
17
|
|
3
18
|
* be2f57e Update: support separate requires in one-var. (fixes #6175) (#9441) (薛定谔的猫)
|
package/README.md
CHANGED
@@ -156,7 +156,7 @@ Before filing an issue, please be sure to read the guidelines for what you're re
|
|
156
156
|
|
157
157
|
## Semantic Versioning Policy
|
158
158
|
|
159
|
-
ESLint follows [semantic versioning](
|
159
|
+
ESLint follows [semantic versioning](https://semver.org). However, due to the nature of ESLint as a code quality tool, it's not always clear when a minor or major version bump occurs. To help clarify this for everyone, we've defined the following semantic versioning policy for ESLint:
|
160
160
|
|
161
161
|
* Patch release (intended to not break your lint build)
|
162
162
|
* A bug fix in a rule that results in ESLint reporting fewer errors.
|
package/lib/cli-engine.js
CHANGED
@@ -420,6 +420,10 @@ class CLIEngine {
|
|
420
420
|
this.config = new Config(this.options, this.linter);
|
421
421
|
}
|
422
422
|
|
423
|
+
getRules() {
|
424
|
+
return this.linter.getRules();
|
425
|
+
}
|
426
|
+
|
423
427
|
/**
|
424
428
|
* Returns results that only contains errors.
|
425
429
|
* @param {LintResult[]} results The results to filter.
|
package/lib/linter.js
CHANGED
@@ -911,6 +911,7 @@ module.exports = class Linter {
|
|
911
911
|
}
|
912
912
|
|
913
913
|
const rule = this.rules.get(ruleId);
|
914
|
+
const messageIds = rule && rule.meta && rule.meta.messages;
|
914
915
|
let reportTranslator = null;
|
915
916
|
const ruleContext = Object.freeze(
|
916
917
|
Object.assign(
|
@@ -931,7 +932,7 @@ module.exports = class Linter {
|
|
931
932
|
* with Node 8.4.0.
|
932
933
|
*/
|
933
934
|
if (reportTranslator === null) {
|
934
|
-
reportTranslator = createReportTranslator({ ruleId, severity, sourceCode });
|
935
|
+
reportTranslator = createReportTranslator({ ruleId, severity, sourceCode, messageIds });
|
935
936
|
}
|
936
937
|
const problem = reportTranslator.apply(null, arguments);
|
937
938
|
|
package/lib/report-translator.js
CHANGED
@@ -11,6 +11,7 @@
|
|
11
11
|
|
12
12
|
const assert = require("assert");
|
13
13
|
const ruleFixer = require("./util/rule-fixer");
|
14
|
+
const interpolate = require("./util/interpolate");
|
14
15
|
|
15
16
|
//------------------------------------------------------------------------------
|
16
17
|
// Typedefs
|
@@ -41,7 +42,9 @@ function normalizeMultiArgReportCall() {
|
|
41
42
|
|
42
43
|
// If there is one argument, it is considered to be a new-style call already.
|
43
44
|
if (arguments.length === 1) {
|
44
|
-
|
45
|
+
|
46
|
+
// Shallow clone the object to avoid surprises if reusing the descriptor
|
47
|
+
return Object.assign({}, arguments[0]);
|
45
48
|
}
|
46
49
|
|
47
50
|
// If the second argument is a string, the arguments are interpreted as [node, message, data, fix].
|
@@ -100,16 +103,7 @@ function normalizeReportLoc(descriptor) {
|
|
100
103
|
* @returns {string} The interpolated message for the descriptor
|
101
104
|
*/
|
102
105
|
function normalizeMessagePlaceholders(descriptor) {
|
103
|
-
|
104
|
-
return descriptor.message;
|
105
|
-
}
|
106
|
-
return descriptor.message.replace(/\{\{\s*([^{}]+?)\s*\}\}/g, (fullMatch, term) => {
|
107
|
-
if (term in descriptor.data) {
|
108
|
-
return descriptor.data[term];
|
109
|
-
}
|
110
|
-
|
111
|
-
return fullMatch;
|
112
|
-
});
|
106
|
+
return interpolate(descriptor.message, descriptor.data);
|
113
107
|
}
|
114
108
|
|
115
109
|
/**
|
@@ -216,6 +210,14 @@ function createProblem(options) {
|
|
216
210
|
source: options.sourceLines[options.loc.start.line - 1] || ""
|
217
211
|
};
|
218
212
|
|
213
|
+
/*
|
214
|
+
* If this isn’t in the conditional, some of the tests fail
|
215
|
+
* because `messageId` is present in the problem object
|
216
|
+
*/
|
217
|
+
if (options.messageId) {
|
218
|
+
problem.messageId = options.messageId;
|
219
|
+
}
|
220
|
+
|
219
221
|
if (options.loc.end) {
|
220
222
|
problem.endLine = options.loc.end.line;
|
221
223
|
problem.endColumn = options.loc.end.column + 1;
|
@@ -231,12 +233,13 @@ function createProblem(options) {
|
|
231
233
|
/**
|
232
234
|
* Returns a function that converts the arguments of a `context.report` call from a rule into a reported
|
233
235
|
* problem for the Node.js API.
|
234
|
-
* @param {{ruleId: string, severity: number, sourceCode: SourceCode}} metadata Metadata for the reported problem
|
236
|
+
* @param {{ruleId: string, severity: number, sourceCode: SourceCode, messageIds: Object}} metadata Metadata for the reported problem
|
235
237
|
* @param {SourceCode} sourceCode The `SourceCode` instance for the text being linted
|
236
238
|
* @returns {function(...args): {
|
237
239
|
* ruleId: string,
|
238
240
|
* severity: (0|1|2),
|
239
|
-
* message: string,
|
241
|
+
* message: (string|undefined),
|
242
|
+
* messageId: (string|undefined),
|
240
243
|
* line: number,
|
241
244
|
* column: number,
|
242
245
|
* endLine: (number|undefined),
|
@@ -261,11 +264,29 @@ module.exports = function createReportTranslator(metadata) {
|
|
261
264
|
|
262
265
|
assertValidNodeInfo(descriptor);
|
263
266
|
|
267
|
+
if (descriptor.messageId) {
|
268
|
+
if (!metadata.messageIds) {
|
269
|
+
throw new TypeError("context.report() called with a messageId, but no messages were present in the rule metadata.");
|
270
|
+
}
|
271
|
+
const id = descriptor.messageId;
|
272
|
+
const messages = metadata.messageIds;
|
273
|
+
|
274
|
+
if (descriptor.message) {
|
275
|
+
throw new TypeError("context.report() called with a message and a messageId. Please only pass one.");
|
276
|
+
}
|
277
|
+
if (!messages || !Object.prototype.hasOwnProperty.call(messages, id)) {
|
278
|
+
throw new TypeError(`context.report() called with a messageId of '${id}' which is not present in the 'messages' config: ${JSON.stringify(messages, null, 2)}`);
|
279
|
+
}
|
280
|
+
descriptor.message = messages[id];
|
281
|
+
}
|
282
|
+
|
283
|
+
|
264
284
|
return createProblem({
|
265
285
|
ruleId: metadata.ruleId,
|
266
286
|
severity: metadata.severity,
|
267
287
|
node: descriptor.node,
|
268
288
|
message: normalizeMessagePlaceholders(descriptor),
|
289
|
+
messageId: descriptor.messageId,
|
269
290
|
loc: normalizeReportLoc(descriptor),
|
270
291
|
fix: normalizeFixes(descriptor, metadata.sourceCode),
|
271
292
|
sourceLines: metadata.sourceCode.lines
|
package/lib/rules/.eslintrc.yml
CHANGED
@@ -75,7 +75,8 @@ module.exports = {
|
|
75
75
|
docs: {
|
76
76
|
description: "enforce getter and setter pairs in objects",
|
77
77
|
category: "Best Practices",
|
78
|
-
recommended: false
|
78
|
+
recommended: false,
|
79
|
+
url: "https://eslint.org/docs/rules/accessor-pairs"
|
79
80
|
},
|
80
81
|
schema: [{
|
81
82
|
type: "object",
|
@@ -16,7 +16,8 @@ module.exports = {
|
|
16
16
|
docs: {
|
17
17
|
description: "enforce linebreaks after opening and before closing array brackets",
|
18
18
|
category: "Stylistic Issues",
|
19
|
-
recommended: false
|
19
|
+
recommended: false,
|
20
|
+
url: "https://eslint.org/docs/rules/array-bracket-newline"
|
20
21
|
},
|
21
22
|
fixable: "whitespace",
|
22
23
|
schema: [
|
@@ -15,7 +15,8 @@ module.exports = {
|
|
15
15
|
docs: {
|
16
16
|
description: "enforce consistent spacing inside array brackets",
|
17
17
|
category: "Stylistic Issues",
|
18
|
-
recommended: false
|
18
|
+
recommended: false,
|
19
|
+
url: "https://eslint.org/docs/rules/array-bracket-spacing"
|
19
20
|
},
|
20
21
|
fixable: "whitespace",
|
21
22
|
schema: [
|
@@ -142,7 +142,8 @@ module.exports = {
|
|
142
142
|
docs: {
|
143
143
|
description: "enforce `return` statements in callbacks of array methods",
|
144
144
|
category: "Best Practices",
|
145
|
-
recommended: false
|
145
|
+
recommended: false,
|
146
|
+
url: "https://eslint.org/docs/rules/array-callback-return"
|
146
147
|
},
|
147
148
|
|
148
149
|
schema: [
|
@@ -16,7 +16,8 @@ module.exports = {
|
|
16
16
|
docs: {
|
17
17
|
description: "enforce line breaks after each array element",
|
18
18
|
category: "Stylistic Issues",
|
19
|
-
recommended: false
|
19
|
+
recommended: false,
|
20
|
+
url: "https://eslint.org/docs/rules/array-element-newline"
|
20
21
|
},
|
21
22
|
fixable: "whitespace",
|
22
23
|
schema: [
|
@@ -19,7 +19,8 @@ module.exports = {
|
|
19
19
|
docs: {
|
20
20
|
description: "enforce consistent spacing before and after the arrow in arrow functions",
|
21
21
|
category: "ECMAScript 6",
|
22
|
-
recommended: false
|
22
|
+
recommended: false,
|
23
|
+
url: "https://eslint.org/docs/rules/arrow-spacing"
|
23
24
|
},
|
24
25
|
|
25
26
|
fixable: "whitespace",
|
@@ -13,7 +13,8 @@ module.exports = {
|
|
13
13
|
docs: {
|
14
14
|
description: "enforce the use of variables within the scope they are defined",
|
15
15
|
category: "Best Practices",
|
16
|
-
recommended: false
|
16
|
+
recommended: false,
|
17
|
+
url: "https://eslint.org/docs/rules/block-scoped-var"
|
17
18
|
},
|
18
19
|
|
19
20
|
schema: []
|
@@ -16,7 +16,8 @@ module.exports = {
|
|
16
16
|
docs: {
|
17
17
|
description: "disallow or enforce spaces inside of blocks after opening block and before closing block",
|
18
18
|
category: "Stylistic Issues",
|
19
|
-
recommended: false
|
19
|
+
recommended: false,
|
20
|
+
url: "https://eslint.org/docs/rules/block-spacing"
|
20
21
|
},
|
21
22
|
|
22
23
|
fixable: "whitespace",
|
package/lib/rules/brace-style.js
CHANGED
package/lib/rules/camelcase.js
CHANGED
@@ -113,7 +113,8 @@ module.exports = {
|
|
113
113
|
docs: {
|
114
114
|
description: "enforce or disallow capitalization of the first letter of a comment",
|
115
115
|
category: "Stylistic Issues",
|
116
|
-
recommended: false
|
116
|
+
recommended: false,
|
117
|
+
url: "https://eslint.org/docs/rules/capitalized-comments"
|
117
118
|
},
|
118
119
|
fixable: "code",
|
119
120
|
schema: [
|
@@ -14,7 +14,8 @@ module.exports = {
|
|
14
14
|
docs: {
|
15
15
|
description: "enforce that class methods utilize `this`",
|
16
16
|
category: "Best Practices",
|
17
|
-
recommended: false
|
17
|
+
recommended: false,
|
18
|
+
url: "https://eslint.org/docs/rules/class-methods-use-this"
|
18
19
|
},
|
19
20
|
schema: [{
|
20
21
|
type: "object",
|
@@ -15,7 +15,8 @@ module.exports = {
|
|
15
15
|
docs: {
|
16
16
|
description: "enforce consistent spacing before and after commas",
|
17
17
|
category: "Stylistic Issues",
|
18
|
-
recommended: false
|
18
|
+
recommended: false,
|
19
|
+
url: "https://eslint.org/docs/rules/comma-spacing"
|
19
20
|
},
|
20
21
|
|
21
22
|
fixable: "whitespace",
|
package/lib/rules/comma-style.js
CHANGED
package/lib/rules/complexity.js
CHANGED
@@ -23,7 +23,8 @@ module.exports = {
|
|
23
23
|
docs: {
|
24
24
|
description: "enforce a maximum cyclomatic complexity allowed in a program",
|
25
25
|
category: "Best Practices",
|
26
|
-
recommended: false
|
26
|
+
recommended: false,
|
27
|
+
url: "https://eslint.org/docs/rules/complexity"
|
27
28
|
},
|
28
29
|
|
29
30
|
schema: [
|
@@ -15,7 +15,8 @@ module.exports = {
|
|
15
15
|
docs: {
|
16
16
|
description: "enforce consistent spacing inside computed property brackets",
|
17
17
|
category: "Stylistic Issues",
|
18
|
-
recommended: false
|
18
|
+
recommended: false,
|
19
|
+
url: "https://eslint.org/docs/rules/computed-property-spacing"
|
19
20
|
},
|
20
21
|
|
21
22
|
fixable: "whitespace",
|
@@ -56,7 +56,8 @@ module.exports = {
|
|
56
56
|
docs: {
|
57
57
|
description: "require `return` statements to either always or never specify values",
|
58
58
|
category: "Best Practices",
|
59
|
-
recommended: false
|
59
|
+
recommended: false,
|
60
|
+
url: "https://eslint.org/docs/rules/consistent-return"
|
60
61
|
},
|
61
62
|
|
62
63
|
schema: [{
|
@@ -13,7 +13,8 @@ module.exports = {
|
|
13
13
|
docs: {
|
14
14
|
description: "enforce consistent naming when capturing the current execution context",
|
15
15
|
category: "Stylistic Issues",
|
16
|
-
recommended: false
|
16
|
+
recommended: false,
|
17
|
+
url: "https://eslint.org/docs/rules/consistent-this"
|
17
18
|
},
|
18
19
|
|
19
20
|
schema: {
|
package/lib/rules/curly.js
CHANGED
package/lib/rules/eol-last.js
CHANGED
@@ -19,7 +19,8 @@ module.exports = {
|
|
19
19
|
docs: {
|
20
20
|
description: "require or disallow newline at the end of files",
|
21
21
|
category: "Stylistic Issues",
|
22
|
-
recommended: false
|
22
|
+
recommended: false,
|
23
|
+
url: "https://eslint.org/docs/rules/eol-last"
|
23
24
|
},
|
24
25
|
fixable: "whitespace",
|
25
26
|
schema: [
|
package/lib/rules/eqeqeq.js
CHANGED
@@ -14,7 +14,8 @@ module.exports = {
|
|
14
14
|
docs: {
|
15
15
|
description: "enforce \"for\" loop update clause moving the counter in the right direction.",
|
16
16
|
category: "Possible Errors",
|
17
|
-
recommended: false
|
17
|
+
recommended: false,
|
18
|
+
url: "https://eslint.org/docs/rules/for-direction"
|
18
19
|
},
|
19
20
|
fixable: null,
|
20
21
|
schema: []
|
@@ -20,7 +20,8 @@ module.exports = {
|
|
20
20
|
docs: {
|
21
21
|
description: "require or disallow spacing between function identifiers and their invocations",
|
22
22
|
category: "Stylistic Issues",
|
23
|
-
recommended: false
|
23
|
+
recommended: false,
|
24
|
+
url: "https://eslint.org/docs/rules/func-call-spacing"
|
24
25
|
},
|
25
26
|
|
26
27
|
fixable: "whitespace",
|
@@ -70,7 +70,8 @@ module.exports = {
|
|
70
70
|
docs: {
|
71
71
|
description: "require function names to match the name of the variable or property to which they are assigned",
|
72
72
|
category: "Stylistic Issues",
|
73
|
-
recommended: false
|
73
|
+
recommended: false,
|
74
|
+
url: "https://eslint.org/docs/rules/func-name-matching"
|
74
75
|
},
|
75
76
|
|
76
77
|
schema: {
|
package/lib/rules/func-names.js
CHANGED
package/lib/rules/func-style.js
CHANGED
@@ -13,7 +13,8 @@ module.exports = {
|
|
13
13
|
docs: {
|
14
14
|
description: "enforce the consistent use of either `function` declarations or expressions",
|
15
15
|
category: "Stylistic Issues",
|
16
|
-
recommended: false
|
16
|
+
recommended: false,
|
17
|
+
url: "https://eslint.org/docs/rules/func-style"
|
17
18
|
},
|
18
19
|
|
19
20
|
schema: [
|
@@ -19,7 +19,8 @@ module.exports = {
|
|
19
19
|
docs: {
|
20
20
|
description: "enforce consistent line breaks inside function parentheses",
|
21
21
|
category: "Stylistic Issues",
|
22
|
-
recommended: false
|
22
|
+
recommended: false,
|
23
|
+
url: "https://eslint.org/docs/rules/function-paren-newline"
|
23
24
|
},
|
24
25
|
fixable: "whitespace",
|
25
26
|
schema: [
|
@@ -30,7 +30,8 @@ module.exports = {
|
|
30
30
|
docs: {
|
31
31
|
description: "enforce consistent spacing around `*` operators in generator functions",
|
32
32
|
category: "ECMAScript 6",
|
33
|
-
recommended: false
|
33
|
+
recommended: false,
|
34
|
+
url: "https://eslint.org/docs/rules/generator-star-spacing"
|
34
35
|
},
|
35
36
|
|
36
37
|
fixable: "whitespace",
|
@@ -51,7 +51,8 @@ module.exports = {
|
|
51
51
|
docs: {
|
52
52
|
description: "require `require()` calls to be placed at top-level module scope",
|
53
53
|
category: "Node.js and CommonJS",
|
54
|
-
recommended: false
|
54
|
+
recommended: false,
|
55
|
+
url: "https://eslint.org/docs/rules/global-require"
|
55
56
|
},
|
56
57
|
|
57
58
|
schema: []
|
package/lib/rules/id-length.js
CHANGED
package/lib/rules/id-match.js
CHANGED