eslint 8.39.0 → 8.47.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/README.md +10 -4
- package/conf/globals.js +6 -1
- package/lib/cli-engine/cli-engine.js +30 -19
- package/lib/cli.js +2 -28
- package/lib/config/default-config.js +1 -1
- package/lib/config/flat-config-schema.js +127 -35
- package/lib/eslint/eslint-helpers.js +11 -10
- package/lib/eslint/eslint.js +1 -1
- package/lib/eslint/flat-eslint.js +119 -161
- package/lib/linter/apply-disable-directives.js +11 -1
- package/lib/linter/code-path-analysis/debug-helpers.js +1 -1
- package/lib/linter/config-comment-parser.js +9 -2
- package/lib/linter/linter.js +20 -11
- package/lib/linter/report-translator.js +22 -21
- package/lib/rule-tester/flat-rule-tester.js +1 -2
- package/lib/rule-tester/rule-tester.js +1 -2
- package/lib/rules/accessor-pairs.js +35 -43
- package/lib/rules/array-bracket-newline.js +2 -2
- package/lib/rules/array-bracket-spacing.js +2 -2
- package/lib/rules/array-callback-return.js +2 -2
- package/lib/rules/array-element-newline.js +12 -6
- package/lib/rules/arrow-body-style.js +2 -2
- package/lib/rules/arrow-parens.js +2 -2
- package/lib/rules/arrow-spacing.js +2 -2
- package/lib/rules/block-scoped-var.js +17 -7
- package/lib/rules/block-spacing.js +2 -2
- package/lib/rules/brace-style.js +2 -2
- package/lib/rules/callback-return.js +2 -2
- package/lib/rules/camelcase.js +2 -2
- package/lib/rules/capitalized-comments.js +2 -2
- package/lib/rules/class-methods-use-this.js +2 -2
- package/lib/rules/comma-dangle.js +2 -2
- package/lib/rules/comma-spacing.js +2 -2
- package/lib/rules/comma-style.js +2 -2
- package/lib/rules/complexity.js +1 -1
- package/lib/rules/computed-property-spacing.js +2 -2
- package/lib/rules/consistent-return.js +3 -3
- package/lib/rules/consistent-this.js +2 -2
- package/lib/rules/constructor-super.js +1 -1
- package/lib/rules/curly.js +2 -2
- package/lib/rules/default-case-last.js +1 -1
- package/lib/rules/default-case.js +2 -2
- package/lib/rules/default-param-last.js +1 -1
- package/lib/rules/dot-location.js +2 -2
- package/lib/rules/dot-notation.js +3 -4
- package/lib/rules/eol-last.js +2 -2
- package/lib/rules/eqeqeq.js +2 -2
- package/lib/rules/for-direction.js +1 -1
- package/lib/rules/func-call-spacing.js +2 -2
- package/lib/rules/func-name-matching.js +1 -1
- package/lib/rules/func-names.js +2 -2
- package/lib/rules/func-style.js +1 -1
- package/lib/rules/function-call-argument-newline.js +2 -2
- package/lib/rules/function-paren-newline.js +2 -2
- package/lib/rules/generator-star-spacing.js +2 -2
- package/lib/rules/getter-return.js +2 -2
- package/lib/rules/global-require.js +2 -2
- package/lib/rules/grouped-accessor-pairs.js +35 -44
- package/lib/rules/guard-for-in.js +1 -1
- package/lib/rules/handle-callback-err.js +2 -2
- package/lib/rules/id-blacklist.js +2 -2
- package/lib/rules/id-denylist.js +2 -2
- package/lib/rules/id-length.js +3 -36
- package/lib/rules/id-match.js +2 -2
- package/lib/rules/implicit-arrow-linebreak.js +2 -2
- package/lib/rules/indent-legacy.js +2 -2
- package/lib/rules/indent.js +84 -88
- package/lib/rules/init-declarations.js +1 -1
- package/lib/rules/jsx-quotes.js +1 -1
- package/lib/rules/key-spacing.js +4 -10
- package/lib/rules/keyword-spacing.js +2 -2
- package/lib/rules/line-comment-position.js +2 -2
- package/lib/rules/linebreak-style.js +2 -2
- package/lib/rules/lines-around-comment.js +2 -2
- package/lib/rules/lines-around-directive.js +2 -2
- package/lib/rules/lines-between-class-members.js +2 -2
- package/lib/rules/logical-assignment-operators.js +7 -5
- package/lib/rules/max-classes-per-file.js +1 -1
- package/lib/rules/max-depth.js +1 -1
- package/lib/rules/max-len.js +19 -15
- package/lib/rules/max-lines-per-function.js +2 -2
- package/lib/rules/max-lines.js +2 -2
- package/lib/rules/max-nested-callbacks.js +1 -1
- package/lib/rules/max-params.js +2 -2
- package/lib/rules/max-statements-per-line.js +2 -2
- package/lib/rules/max-statements.js +1 -1
- package/lib/rules/multiline-comment-style.js +2 -2
- package/lib/rules/multiline-ternary.js +2 -2
- package/lib/rules/new-cap.js +2 -2
- package/lib/rules/new-parens.js +2 -2
- package/lib/rules/newline-after-var.js +2 -4
- package/lib/rules/newline-before-return.js +2 -2
- package/lib/rules/newline-per-chained-call.js +2 -2
- package/lib/rules/no-alert.js +2 -2
- package/lib/rules/no-array-constructor.js +1 -1
- package/lib/rules/no-async-promise-executor.js +2 -2
- package/lib/rules/no-await-in-loop.js +1 -1
- package/lib/rules/no-bitwise.js +1 -1
- package/lib/rules/no-buffer-constructor.js +1 -1
- package/lib/rules/no-caller.js +1 -1
- package/lib/rules/no-case-declarations.js +1 -1
- package/lib/rules/no-catch-shadow.js +2 -2
- package/lib/rules/no-class-assign.js +2 -2
- package/lib/rules/no-compare-neg-zero.js +1 -1
- package/lib/rules/no-cond-assign.js +2 -2
- package/lib/rules/no-confusing-arrow.js +2 -2
- package/lib/rules/no-console.js +2 -2
- package/lib/rules/no-const-assign.js +2 -2
- package/lib/rules/no-constant-binary-expression.js +2 -2
- package/lib/rules/no-constant-condition.js +2 -2
- package/lib/rules/no-constructor-return.js +1 -1
- package/lib/rules/no-continue.js +1 -1
- package/lib/rules/no-control-regex.js +16 -3
- package/lib/rules/no-debugger.js +1 -1
- package/lib/rules/no-delete-var.js +1 -1
- package/lib/rules/no-div-regex.js +2 -2
- package/lib/rules/no-dupe-args.js +2 -2
- package/lib/rules/no-dupe-class-members.js +1 -1
- package/lib/rules/no-dupe-else-if.js +2 -2
- package/lib/rules/no-dupe-keys.js +1 -1
- package/lib/rules/no-duplicate-case.js +2 -2
- package/lib/rules/no-duplicate-imports.js +1 -1
- package/lib/rules/no-else-return.js +2 -2
- package/lib/rules/no-empty-character-class.js +34 -13
- package/lib/rules/no-empty-function.js +2 -2
- package/lib/rules/no-empty-pattern.js +39 -4
- package/lib/rules/no-empty-static-block.js +2 -2
- package/lib/rules/no-empty.js +2 -2
- package/lib/rules/no-eq-null.js +1 -1
- package/lib/rules/no-eval.js +2 -2
- package/lib/rules/no-ex-assign.js +2 -2
- package/lib/rules/no-extend-native.js +2 -2
- package/lib/rules/no-extra-bind.js +2 -2
- package/lib/rules/no-extra-boolean-cast.js +2 -2
- package/lib/rules/no-extra-label.js +2 -2
- package/lib/rules/no-extra-parens.js +48 -12
- package/lib/rules/no-extra-semi.js +31 -13
- package/lib/rules/no-fallthrough.js +3 -3
- package/lib/rules/no-floating-decimal.js +2 -2
- package/lib/rules/no-func-assign.js +2 -2
- package/lib/rules/no-global-assign.js +2 -2
- package/lib/rules/no-implicit-coercion.js +2 -2
- package/lib/rules/no-implicit-globals.js +2 -2
- package/lib/rules/no-implied-eval.js +2 -2
- package/lib/rules/no-import-assign.js +2 -2
- package/lib/rules/no-inline-comments.js +2 -2
- package/lib/rules/no-inner-declarations.js +1 -1
- package/lib/rules/no-invalid-regexp.js +23 -8
- package/lib/rules/no-invalid-this.js +2 -2
- package/lib/rules/no-irregular-whitespace.js +23 -6
- package/lib/rules/no-iterator.js +1 -1
- package/lib/rules/no-label-var.js +2 -2
- package/lib/rules/no-labels.js +1 -1
- package/lib/rules/no-lone-blocks.js +2 -2
- package/lib/rules/no-lonely-if.js +2 -2
- package/lib/rules/no-loop-func.js +3 -3
- package/lib/rules/no-loss-of-precision.js +15 -7
- package/lib/rules/no-magic-numbers.js +1 -1
- package/lib/rules/no-misleading-character-class.js +10 -4
- package/lib/rules/no-mixed-operators.js +2 -2
- package/lib/rules/no-mixed-requires.js +1 -1
- package/lib/rules/no-mixed-spaces-and-tabs.js +2 -2
- package/lib/rules/no-multi-assign.js +1 -1
- package/lib/rules/no-multi-spaces.js +2 -2
- package/lib/rules/no-multi-str.js +1 -1
- package/lib/rules/no-multiple-empty-lines.js +2 -2
- package/lib/rules/no-native-reassign.js +2 -2
- package/lib/rules/no-negated-condition.js +1 -1
- package/lib/rules/no-negated-in-lhs.js +1 -1
- package/lib/rules/no-nested-ternary.js +1 -1
- package/lib/rules/no-new-func.js +2 -2
- package/lib/rules/no-new-native-nonconstructor.js +2 -2
- package/lib/rules/no-new-object.js +2 -2
- package/lib/rules/no-new-require.js +1 -1
- package/lib/rules/no-new-symbol.js +2 -2
- package/lib/rules/no-new-wrappers.js +20 -8
- package/lib/rules/no-new.js +1 -1
- package/lib/rules/no-nonoctal-decimal-escape.js +2 -2
- package/lib/rules/no-obj-calls.js +2 -2
- package/lib/rules/no-octal-escape.js +1 -1
- package/lib/rules/no-octal.js +1 -1
- package/lib/rules/no-param-reassign.js +2 -2
- package/lib/rules/no-path-concat.js +1 -1
- package/lib/rules/no-plusplus.js +1 -1
- package/lib/rules/no-process-env.js +1 -1
- package/lib/rules/no-process-exit.js +1 -1
- package/lib/rules/no-promise-executor-return.js +2 -2
- package/lib/rules/no-proto.js +1 -1
- package/lib/rules/no-prototype-builtins.js +1 -1
- package/lib/rules/no-redeclare.js +2 -2
- package/lib/rules/no-regex-spaces.js +20 -5
- package/lib/rules/no-restricted-exports.js +2 -2
- package/lib/rules/no-restricted-globals.js +2 -2
- package/lib/rules/no-restricted-imports.js +2 -2
- package/lib/rules/no-restricted-modules.js +8 -11
- package/lib/rules/no-restricted-properties.js +1 -1
- package/lib/rules/no-restricted-syntax.js +1 -1
- package/lib/rules/no-return-assign.js +2 -2
- package/lib/rules/no-return-await.js +8 -3
- package/lib/rules/no-script-url.js +1 -1
- package/lib/rules/no-self-assign.js +2 -2
- package/lib/rules/no-self-compare.js +2 -2
- package/lib/rules/no-sequences.js +2 -2
- package/lib/rules/no-setter-return.js +2 -2
- package/lib/rules/no-shadow-restricted-names.js +2 -2
- package/lib/rules/no-shadow.js +2 -2
- package/lib/rules/no-spaced-func.js +2 -2
- package/lib/rules/no-sparse-arrays.js +1 -1
- package/lib/rules/no-sync.js +1 -1
- package/lib/rules/no-tabs.js +2 -2
- package/lib/rules/no-template-curly-in-string.js +1 -1
- package/lib/rules/no-ternary.js +1 -1
- package/lib/rules/no-this-before-super.js +1 -1
- package/lib/rules/no-throw-literal.js +1 -1
- package/lib/rules/no-trailing-spaces.js +2 -2
- package/lib/rules/no-undef-init.js +2 -2
- package/lib/rules/no-undef.js +2 -2
- package/lib/rules/no-undefined.js +2 -2
- package/lib/rules/no-underscore-dangle.js +2 -2
- package/lib/rules/no-unexpected-multiline.js +2 -2
- package/lib/rules/no-unmodified-loop-condition.js +2 -2
- package/lib/rules/no-unneeded-ternary.js +2 -2
- package/lib/rules/no-unreachable-loop.js +1 -1
- package/lib/rules/no-unreachable.js +2 -2
- package/lib/rules/no-unsafe-finally.js +1 -1
- package/lib/rules/no-unsafe-negation.js +2 -2
- package/lib/rules/no-unsafe-optional-chaining.js +1 -1
- package/lib/rules/no-unused-expressions.js +4 -6
- package/lib/rules/no-unused-labels.js +48 -15
- package/lib/rules/no-unused-private-class-members.js +1 -1
- package/lib/rules/no-unused-vars.js +4 -3
- package/lib/rules/no-use-before-define.js +2 -2
- package/lib/rules/no-useless-backreference.js +3 -3
- package/lib/rules/no-useless-call.js +2 -2
- package/lib/rules/no-useless-catch.js +1 -1
- package/lib/rules/no-useless-computed-key.js +2 -2
- package/lib/rules/no-useless-concat.js +2 -2
- package/lib/rules/no-useless-constructor.js +1 -1
- package/lib/rules/no-useless-escape.js +162 -83
- package/lib/rules/no-useless-rename.js +2 -2
- package/lib/rules/no-useless-return.js +37 -9
- package/lib/rules/no-var.js +2 -2
- package/lib/rules/no-void.js +1 -1
- package/lib/rules/no-warning-comments.js +2 -2
- package/lib/rules/no-whitespace-before-property.js +2 -2
- package/lib/rules/no-with.js +1 -1
- package/lib/rules/nonblock-statement-body-position.js +2 -2
- package/lib/rules/object-curly-newline.js +2 -2
- package/lib/rules/object-curly-spacing.js +4 -4
- package/lib/rules/object-property-newline.js +2 -2
- package/lib/rules/object-shorthand.js +2 -2
- package/lib/rules/one-var-declaration-per-line.js +1 -1
- package/lib/rules/one-var.js +2 -2
- package/lib/rules/operator-assignment.js +2 -2
- package/lib/rules/operator-linebreak.js +2 -2
- package/lib/rules/padded-blocks.js +2 -2
- package/lib/rules/padding-line-between-statements.js +8 -53
- package/lib/rules/prefer-arrow-callback.js +2 -2
- package/lib/rules/prefer-const.js +2 -2
- package/lib/rules/prefer-destructuring.js +2 -2
- package/lib/rules/prefer-exponentiation-operator.js +4 -3
- package/lib/rules/prefer-named-capture-group.js +10 -7
- package/lib/rules/prefer-numeric-literals.js +2 -2
- package/lib/rules/prefer-object-has-own.js +2 -2
- package/lib/rules/prefer-object-spread.js +2 -2
- package/lib/rules/prefer-promise-reject-errors.js +2 -2
- package/lib/rules/prefer-reflect.js +1 -1
- package/lib/rules/prefer-regex-literals.js +14 -17
- package/lib/rules/prefer-rest-params.js +2 -2
- package/lib/rules/prefer-spread.js +2 -2
- package/lib/rules/prefer-template.js +2 -2
- package/lib/rules/quote-props.js +2 -2
- package/lib/rules/quotes.js +16 -16
- package/lib/rules/radix.js +2 -2
- package/lib/rules/require-atomic-updates.js +2 -2
- package/lib/rules/require-await.js +2 -2
- package/lib/rules/require-jsdoc.js +2 -2
- package/lib/rules/require-unicode-regexp.js +5 -5
- package/lib/rules/require-yield.js +1 -1
- package/lib/rules/rest-spread-spacing.js +2 -2
- package/lib/rules/semi-spacing.js +2 -2
- package/lib/rules/semi-style.js +2 -2
- package/lib/rules/semi.js +30 -5
- package/lib/rules/sort-imports.js +2 -2
- package/lib/rules/sort-keys.js +2 -2
- package/lib/rules/sort-vars.js +2 -2
- package/lib/rules/space-before-blocks.js +2 -2
- package/lib/rules/space-before-function-paren.js +2 -2
- package/lib/rules/space-in-parens.js +2 -2
- package/lib/rules/space-infix-ops.js +2 -2
- package/lib/rules/space-unary-ops.js +2 -2
- package/lib/rules/spaced-comment.js +2 -2
- package/lib/rules/strict.js +1 -1
- package/lib/rules/switch-colon-spacing.js +2 -2
- package/lib/rules/symbol-description.js +2 -2
- package/lib/rules/template-curly-spacing.js +2 -2
- package/lib/rules/template-tag-spacing.js +2 -2
- package/lib/rules/unicode-bom.js +2 -2
- package/lib/rules/use-isnan.js +1 -1
- package/lib/rules/utils/ast-utils.js +55 -7
- package/lib/rules/utils/regular-expressions.js +2 -2
- package/lib/rules/valid-jsdoc.js +2 -2
- package/lib/rules/valid-typeof.js +9 -3
- package/lib/rules/vars-on-top.js +1 -1
- package/lib/rules/wrap-iife.js +2 -2
- package/lib/rules/wrap-regex.js +2 -2
- package/lib/rules/yield-star-spacing.js +2 -2
- package/lib/rules/yoda.js +4 -13
- package/lib/shared/string-utils.js +39 -1
- package/lib/shared/types.js +7 -3
- package/lib/unsupported-api.js +5 -2
- package/messages/eslintrc-incompat.js +98 -0
- package/messages/eslintrc-plugins.js +24 -0
- package/messages/invalid-rule-options.js +17 -0
- package/messages/invalid-rule-severity.js +13 -0
- package/messages/shared.js +18 -0
- package/package.json +15 -19
@@ -17,6 +17,8 @@ const interpolate = require("./interpolate");
|
|
17
17
|
// Typedefs
|
18
18
|
//------------------------------------------------------------------------------
|
19
19
|
|
20
|
+
/** @typedef {import("../shared/types").LintMessage} LintMessage */
|
21
|
+
|
20
22
|
/**
|
21
23
|
* An error message description
|
22
24
|
* @typedef {Object} MessageDescriptor
|
@@ -29,23 +31,6 @@ const interpolate = require("./interpolate");
|
|
29
31
|
* @property {Array<{desc?: string, messageId?: string, fix: Function}>} suggest Suggestion descriptions and functions to create a the associated fixes.
|
30
32
|
*/
|
31
33
|
|
32
|
-
/**
|
33
|
-
* Information about the report
|
34
|
-
* @typedef {Object} ReportInfo
|
35
|
-
* @property {string} ruleId The rule ID
|
36
|
-
* @property {(0|1|2)} severity Severity of the error
|
37
|
-
* @property {(string|undefined)} message The message
|
38
|
-
* @property {(string|undefined)} [messageId] The message ID
|
39
|
-
* @property {number} line The line number
|
40
|
-
* @property {number} column The column number
|
41
|
-
* @property {(number|undefined)} [endLine] The ending line number
|
42
|
-
* @property {(number|undefined)} [endColumn] The ending column number
|
43
|
-
* @property {(string|null)} nodeType Type of node
|
44
|
-
* @property {string} source Source text
|
45
|
-
* @property {({text: string, range: (number[]|null)}|null)} [fix] The fix object
|
46
|
-
* @property {Array<{text: string, range: (number[]|null)}|null>} [suggestions] Suggestion info
|
47
|
-
*/
|
48
|
-
|
49
34
|
//------------------------------------------------------------------------------
|
50
35
|
// Module Definition
|
51
36
|
//------------------------------------------------------------------------------
|
@@ -115,6 +100,22 @@ function normalizeReportLoc(descriptor) {
|
|
115
100
|
return descriptor.node.loc;
|
116
101
|
}
|
117
102
|
|
103
|
+
/**
|
104
|
+
* Clones the given fix object.
|
105
|
+
* @param {Fix|null} fix The fix to clone.
|
106
|
+
* @returns {Fix|null} Deep cloned fix object or `null` if `null` or `undefined` was passed in.
|
107
|
+
*/
|
108
|
+
function cloneFix(fix) {
|
109
|
+
if (!fix) {
|
110
|
+
return null;
|
111
|
+
}
|
112
|
+
|
113
|
+
return {
|
114
|
+
range: [fix.range[0], fix.range[1]],
|
115
|
+
text: fix.text
|
116
|
+
};
|
117
|
+
}
|
118
|
+
|
118
119
|
/**
|
119
120
|
* Check that a fix has a valid range.
|
120
121
|
* @param {Fix|null} fix The fix to validate.
|
@@ -152,7 +153,7 @@ function mergeFixes(fixes, sourceCode) {
|
|
152
153
|
return null;
|
153
154
|
}
|
154
155
|
if (fixes.length === 1) {
|
155
|
-
return fixes[0];
|
156
|
+
return cloneFix(fixes[0]);
|
156
157
|
}
|
157
158
|
|
158
159
|
fixes.sort(compareFixesByRange);
|
@@ -198,7 +199,7 @@ function normalizeFixes(descriptor, sourceCode) {
|
|
198
199
|
}
|
199
200
|
|
200
201
|
assertValidFix(fix);
|
201
|
-
return fix;
|
202
|
+
return cloneFix(fix);
|
202
203
|
}
|
203
204
|
|
204
205
|
/**
|
@@ -239,7 +240,7 @@ function mapSuggestions(descriptor, sourceCode, messages) {
|
|
239
240
|
* @param {{start: SourceLocation, end: (SourceLocation|null)}} options.loc Start and end location
|
240
241
|
* @param {{text: string, range: (number[]|null)}} options.fix The fix object
|
241
242
|
* @param {Array<{text: string, range: (number[]|null)}>} options.suggestions The array of suggestions objects
|
242
|
-
* @returns {
|
243
|
+
* @returns {LintMessage} Information about the report
|
243
244
|
*/
|
244
245
|
function createProblem(options) {
|
245
246
|
const problem = {
|
@@ -314,7 +315,7 @@ function validateSuggestions(suggest, messages) {
|
|
314
315
|
* problem for the Node.js API.
|
315
316
|
* @param {{ruleId: string, severity: number, sourceCode: SourceCode, messageIds: Object, disableFixes: boolean}} metadata Metadata for the reported problem
|
316
317
|
* @param {SourceCode} sourceCode The `SourceCode` instance for the text being linted
|
317
|
-
* @returns {function(...args):
|
318
|
+
* @returns {function(...args): LintMessage} Function that returns information about the report
|
318
319
|
*/
|
319
320
|
|
320
321
|
module.exports = function createReportTranslator(metadata) {
|
@@ -33,7 +33,7 @@ const { ConfigArraySymbol } = require("@humanwhocodes/config-array");
|
|
33
33
|
/** @typedef {import("../shared/types").Parser} Parser */
|
34
34
|
/** @typedef {import("../shared/types").LanguageOptions} LanguageOptions */
|
35
35
|
|
36
|
-
|
36
|
+
|
37
37
|
/**
|
38
38
|
* A test case that is expected to pass lint.
|
39
39
|
* @typedef {Object} ValidTestCase
|
@@ -72,7 +72,6 @@ const { ConfigArraySymbol } = require("@humanwhocodes/config-array");
|
|
72
72
|
* @property {number} [endLine] The 1-based line number of the reported end location.
|
73
73
|
* @property {number} [endColumn] The 1-based column number of the reported end location.
|
74
74
|
*/
|
75
|
-
/* eslint-enable jsdoc/valid-types -- https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/4#issuecomment-778805577 */
|
76
75
|
|
77
76
|
//------------------------------------------------------------------------------
|
78
77
|
// Private Members
|
@@ -63,7 +63,7 @@ const { SourceCode } = require("../source-code");
|
|
63
63
|
|
64
64
|
/** @typedef {import("../shared/types").Parser} Parser */
|
65
65
|
|
66
|
-
|
66
|
+
|
67
67
|
/**
|
68
68
|
* A test case that is expected to pass lint.
|
69
69
|
* @typedef {Object} ValidTestCase
|
@@ -108,7 +108,6 @@ const { SourceCode } = require("../source-code");
|
|
108
108
|
* @property {number} [endLine] The 1-based line number of the reported end location.
|
109
109
|
* @property {number} [endColumn] The 1-based column number of the reported end location.
|
110
110
|
*/
|
111
|
-
/* eslint-enable jsdoc/valid-types -- https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/4#issuecomment-778805577 */
|
112
111
|
|
113
112
|
//------------------------------------------------------------------------------
|
114
113
|
// Private Members
|
@@ -142,7 +142,7 @@ module.exports = {
|
|
142
142
|
docs: {
|
143
143
|
description: "Enforce getter and setter pairs in objects and classes",
|
144
144
|
recommended: false,
|
145
|
-
url: "https://eslint.org/docs/rules/accessor-pairs"
|
145
|
+
url: "https://eslint.org/docs/latest/rules/accessor-pairs"
|
146
146
|
},
|
147
147
|
|
148
148
|
schema: [{
|
@@ -178,7 +178,7 @@ module.exports = {
|
|
178
178
|
const checkGetWithoutSet = config.getWithoutSet === true;
|
179
179
|
const checkSetWithoutGet = config.setWithoutGet !== false;
|
180
180
|
const enforceForClassMembers = config.enforceForClassMembers !== false;
|
181
|
-
const sourceCode = context.
|
181
|
+
const sourceCode = context.sourceCode;
|
182
182
|
|
183
183
|
/**
|
184
184
|
* Reports the given node.
|
@@ -223,43 +223,6 @@ module.exports = {
|
|
223
223
|
}
|
224
224
|
}
|
225
225
|
|
226
|
-
/**
|
227
|
-
* Creates a new `AccessorData` object for the given getter or setter node.
|
228
|
-
* @param {ASTNode} node A getter or setter node.
|
229
|
-
* @returns {AccessorData} New `AccessorData` object that contains the given node.
|
230
|
-
* @private
|
231
|
-
*/
|
232
|
-
function createAccessorData(node) {
|
233
|
-
const name = astUtils.getStaticPropertyName(node);
|
234
|
-
const key = (name !== null) ? name : sourceCode.getTokens(node.key);
|
235
|
-
|
236
|
-
return {
|
237
|
-
key,
|
238
|
-
getters: node.kind === "get" ? [node] : [],
|
239
|
-
setters: node.kind === "set" ? [node] : []
|
240
|
-
};
|
241
|
-
}
|
242
|
-
|
243
|
-
/**
|
244
|
-
* Merges the given `AccessorData` object into the given accessors list.
|
245
|
-
* @param {AccessorData[]} accessors The list to merge into.
|
246
|
-
* @param {AccessorData} accessorData The object to merge.
|
247
|
-
* @returns {AccessorData[]} The same instance with the merged object.
|
248
|
-
* @private
|
249
|
-
*/
|
250
|
-
function mergeAccessorData(accessors, accessorData) {
|
251
|
-
const equalKeyElement = accessors.find(a => areEqualKeys(a.key, accessorData.key));
|
252
|
-
|
253
|
-
if (equalKeyElement) {
|
254
|
-
equalKeyElement.getters.push(...accessorData.getters);
|
255
|
-
equalKeyElement.setters.push(...accessorData.setters);
|
256
|
-
} else {
|
257
|
-
accessors.push(accessorData);
|
258
|
-
}
|
259
|
-
|
260
|
-
return accessors;
|
261
|
-
}
|
262
|
-
|
263
226
|
/**
|
264
227
|
* Checks accessor pairs in the given list of nodes.
|
265
228
|
* @param {ASTNode[]} nodes The list to check.
|
@@ -267,10 +230,39 @@ module.exports = {
|
|
267
230
|
* @private
|
268
231
|
*/
|
269
232
|
function checkList(nodes) {
|
270
|
-
const accessors =
|
271
|
-
|
272
|
-
|
273
|
-
|
233
|
+
const accessors = [];
|
234
|
+
let found = false;
|
235
|
+
|
236
|
+
for (let i = 0; i < nodes.length; i++) {
|
237
|
+
const node = nodes[i];
|
238
|
+
|
239
|
+
if (isAccessorKind(node)) {
|
240
|
+
|
241
|
+
// Creates a new `AccessorData` object for the given getter or setter node.
|
242
|
+
const name = astUtils.getStaticPropertyName(node);
|
243
|
+
const key = (name !== null) ? name : sourceCode.getTokens(node.key);
|
244
|
+
|
245
|
+
// Merges the given `AccessorData` object into the given accessors list.
|
246
|
+
for (let j = 0; j < accessors.length; j++) {
|
247
|
+
const accessor = accessors[j];
|
248
|
+
|
249
|
+
if (areEqualKeys(accessor.key, key)) {
|
250
|
+
accessor.getters.push(...node.kind === "get" ? [node] : []);
|
251
|
+
accessor.setters.push(...node.kind === "set" ? [node] : []);
|
252
|
+
found = true;
|
253
|
+
break;
|
254
|
+
}
|
255
|
+
}
|
256
|
+
if (!found) {
|
257
|
+
accessors.push({
|
258
|
+
key,
|
259
|
+
getters: node.kind === "get" ? [node] : [],
|
260
|
+
setters: node.kind === "set" ? [node] : []
|
261
|
+
});
|
262
|
+
}
|
263
|
+
found = false;
|
264
|
+
}
|
265
|
+
}
|
274
266
|
|
275
267
|
for (const { getters, setters } of accessors) {
|
276
268
|
if (checkSetWithoutGet && setters.length && !getters.length) {
|
@@ -19,7 +19,7 @@ module.exports = {
|
|
19
19
|
docs: {
|
20
20
|
description: "Enforce linebreaks after opening and before closing array brackets",
|
21
21
|
recommended: false,
|
22
|
-
url: "https://eslint.org/docs/rules/array-bracket-newline"
|
22
|
+
url: "https://eslint.org/docs/latest/rules/array-bracket-newline"
|
23
23
|
},
|
24
24
|
|
25
25
|
fixable: "whitespace",
|
@@ -56,7 +56,7 @@ module.exports = {
|
|
56
56
|
},
|
57
57
|
|
58
58
|
create(context) {
|
59
|
-
const sourceCode = context.
|
59
|
+
const sourceCode = context.sourceCode;
|
60
60
|
|
61
61
|
|
62
62
|
//----------------------------------------------------------------------
|
@@ -18,7 +18,7 @@ module.exports = {
|
|
18
18
|
docs: {
|
19
19
|
description: "Enforce consistent spacing inside array brackets",
|
20
20
|
recommended: false,
|
21
|
-
url: "https://eslint.org/docs/rules/array-bracket-spacing"
|
21
|
+
url: "https://eslint.org/docs/latest/rules/array-bracket-spacing"
|
22
22
|
},
|
23
23
|
|
24
24
|
fixable: "whitespace",
|
@@ -53,7 +53,7 @@ module.exports = {
|
|
53
53
|
},
|
54
54
|
create(context) {
|
55
55
|
const spaced = context.options[0] === "always",
|
56
|
-
sourceCode = context.
|
56
|
+
sourceCode = context.sourceCode;
|
57
57
|
|
58
58
|
/**
|
59
59
|
* Determines whether an option is set, relative to the spacing option.
|
@@ -141,7 +141,7 @@ module.exports = {
|
|
141
141
|
docs: {
|
142
142
|
description: "Enforce `return` statements in callbacks of array methods",
|
143
143
|
recommended: false,
|
144
|
-
url: "https://eslint.org/docs/rules/array-callback-return"
|
144
|
+
url: "https://eslint.org/docs/latest/rules/array-callback-return"
|
145
145
|
},
|
146
146
|
|
147
147
|
schema: [
|
@@ -172,7 +172,7 @@ module.exports = {
|
|
172
172
|
create(context) {
|
173
173
|
|
174
174
|
const options = context.options[0] || { allowImplicit: false, checkForEach: false };
|
175
|
-
const sourceCode = context.
|
175
|
+
const sourceCode = context.sourceCode;
|
176
176
|
|
177
177
|
let funcInfo = {
|
178
178
|
arrayMethodName: null,
|
@@ -19,7 +19,7 @@ module.exports = {
|
|
19
19
|
docs: {
|
20
20
|
description: "Enforce line breaks after each array element",
|
21
21
|
recommended: false,
|
22
|
-
url: "https://eslint.org/docs/rules/array-element-newline"
|
22
|
+
url: "https://eslint.org/docs/latest/rules/array-element-newline"
|
23
23
|
},
|
24
24
|
|
25
25
|
fixable: "whitespace",
|
@@ -79,7 +79,7 @@ module.exports = {
|
|
79
79
|
},
|
80
80
|
|
81
81
|
create(context) {
|
82
|
-
const sourceCode = context.
|
82
|
+
const sourceCode = context.sourceCode;
|
83
83
|
|
84
84
|
//----------------------------------------------------------------------
|
85
85
|
// Helpers
|
@@ -240,19 +240,25 @@ module.exports = {
|
|
240
240
|
.some(element => element.loc.start.line !== element.loc.end.line);
|
241
241
|
}
|
242
242
|
|
243
|
-
|
243
|
+
let linebreaksCount = 0;
|
244
|
+
|
245
|
+
for (let i = 0; i < node.elements.length; i++) {
|
246
|
+
const element = node.elements[i];
|
247
|
+
|
244
248
|
const previousElement = elements[i - 1];
|
245
249
|
|
246
250
|
if (i === 0 || element === null || previousElement === null) {
|
247
|
-
|
251
|
+
continue;
|
248
252
|
}
|
249
253
|
|
250
254
|
const commaToken = sourceCode.getFirstTokenBetween(previousElement, element, astUtils.isCommaToken);
|
251
255
|
const lastTokenOfPreviousElement = sourceCode.getTokenBefore(commaToken);
|
252
256
|
const firstTokenOfCurrentElement = sourceCode.getTokenAfter(commaToken);
|
253
257
|
|
254
|
-
|
255
|
-
|
258
|
+
if (!astUtils.isTokenOnSameLine(lastTokenOfPreviousElement, firstTokenOfCurrentElement)) {
|
259
|
+
linebreaksCount++;
|
260
|
+
}
|
261
|
+
}
|
256
262
|
|
257
263
|
const needsLinebreaks = (
|
258
264
|
elements.length >= options.minItems ||
|
@@ -22,7 +22,7 @@ module.exports = {
|
|
22
22
|
docs: {
|
23
23
|
description: "Require braces around arrow function bodies",
|
24
24
|
recommended: false,
|
25
|
-
url: "https://eslint.org/docs/rules/arrow-body-style"
|
25
|
+
url: "https://eslint.org/docs/latest/rules/arrow-body-style"
|
26
26
|
},
|
27
27
|
|
28
28
|
schema: {
|
@@ -74,7 +74,7 @@ module.exports = {
|
|
74
74
|
const asNeeded = !options[0] || options[0] === "as-needed";
|
75
75
|
const never = options[0] === "never";
|
76
76
|
const requireReturnForObjectLiteral = options[1] && options[1].requireReturnForObjectLiteral;
|
77
|
-
const sourceCode = context.
|
77
|
+
const sourceCode = context.sourceCode;
|
78
78
|
let funcInfo = null;
|
79
79
|
|
80
80
|
/**
|
@@ -35,7 +35,7 @@ module.exports = {
|
|
35
35
|
docs: {
|
36
36
|
description: "Require parentheses around arrow function arguments",
|
37
37
|
recommended: false,
|
38
|
-
url: "https://eslint.org/docs/rules/arrow-parens"
|
38
|
+
url: "https://eslint.org/docs/latest/rules/arrow-parens"
|
39
39
|
},
|
40
40
|
|
41
41
|
fixable: "code",
|
@@ -69,7 +69,7 @@ module.exports = {
|
|
69
69
|
const asNeeded = context.options[0] === "as-needed";
|
70
70
|
const requireForBlockBody = asNeeded && context.options[1] && context.options[1].requireForBlockBody === true;
|
71
71
|
|
72
|
-
const sourceCode = context.
|
72
|
+
const sourceCode = context.sourceCode;
|
73
73
|
|
74
74
|
/**
|
75
75
|
* Finds opening paren of parameters for the given arrow function, if it exists.
|
@@ -22,7 +22,7 @@ module.exports = {
|
|
22
22
|
docs: {
|
23
23
|
description: "Enforce consistent spacing before and after the arrow in arrow functions",
|
24
24
|
recommended: false,
|
25
|
-
url: "https://eslint.org/docs/rules/arrow-spacing"
|
25
|
+
url: "https://eslint.org/docs/latest/rules/arrow-spacing"
|
26
26
|
},
|
27
27
|
|
28
28
|
fixable: "whitespace",
|
@@ -61,7 +61,7 @@ module.exports = {
|
|
61
61
|
rule.before = rule.before !== false;
|
62
62
|
rule.after = rule.after !== false;
|
63
63
|
|
64
|
-
const sourceCode = context.
|
64
|
+
const sourceCode = context.sourceCode;
|
65
65
|
|
66
66
|
/**
|
67
67
|
* Get tokens of arrow(`=>`) and before/after arrow.
|
@@ -16,19 +16,19 @@ module.exports = {
|
|
16
16
|
docs: {
|
17
17
|
description: "Enforce the use of variables within the scope they are defined",
|
18
18
|
recommended: false,
|
19
|
-
url: "https://eslint.org/docs/rules/block-scoped-var"
|
19
|
+
url: "https://eslint.org/docs/latest/rules/block-scoped-var"
|
20
20
|
},
|
21
21
|
|
22
22
|
schema: [],
|
23
23
|
|
24
24
|
messages: {
|
25
|
-
outOfScope: "'{{name}}' used outside of binding context."
|
25
|
+
outOfScope: "'{{name}}' declared on line {{definitionLine}} column {{definitionColumn}} is used outside of binding context."
|
26
26
|
}
|
27
27
|
},
|
28
28
|
|
29
29
|
create(context) {
|
30
30
|
let stack = [];
|
31
|
-
const sourceCode = context.
|
31
|
+
const sourceCode = context.sourceCode;
|
32
32
|
|
33
33
|
/**
|
34
34
|
* Makes a block scope.
|
@@ -50,12 +50,22 @@ module.exports = {
|
|
50
50
|
/**
|
51
51
|
* Reports a given reference.
|
52
52
|
* @param {eslint-scope.Reference} reference A reference to report.
|
53
|
+
* @param {eslint-scope.Definition} definition A definition for which to report reference.
|
53
54
|
* @returns {void}
|
54
55
|
*/
|
55
|
-
function report(reference) {
|
56
|
+
function report(reference, definition) {
|
56
57
|
const identifier = reference.identifier;
|
57
|
-
|
58
|
-
|
58
|
+
const definitionPosition = definition.name.loc.start;
|
59
|
+
|
60
|
+
context.report({
|
61
|
+
node: identifier,
|
62
|
+
messageId: "outOfScope",
|
63
|
+
data: {
|
64
|
+
name: identifier.name,
|
65
|
+
definitionLine: definitionPosition.line,
|
66
|
+
definitionColumn: definitionPosition.column + 1
|
67
|
+
}
|
68
|
+
});
|
59
69
|
}
|
60
70
|
|
61
71
|
/**
|
@@ -92,7 +102,7 @@ module.exports = {
|
|
92
102
|
variables[i]
|
93
103
|
.references
|
94
104
|
.filter(isOutsideOfScope)
|
95
|
-
.forEach(report);
|
105
|
+
.forEach(ref => report(ref, variables[i].defs.find(def => def.parent === node)));
|
96
106
|
}
|
97
107
|
}
|
98
108
|
|
@@ -19,7 +19,7 @@ module.exports = {
|
|
19
19
|
docs: {
|
20
20
|
description: "Disallow or enforce spaces inside of blocks after opening block and before closing block",
|
21
21
|
recommended: false,
|
22
|
-
url: "https://eslint.org/docs/rules/block-spacing"
|
22
|
+
url: "https://eslint.org/docs/latest/rules/block-spacing"
|
23
23
|
},
|
24
24
|
|
25
25
|
fixable: "whitespace",
|
@@ -37,7 +37,7 @@ module.exports = {
|
|
37
37
|
create(context) {
|
38
38
|
const always = (context.options[0] !== "never"),
|
39
39
|
messageId = always ? "missing" : "extra",
|
40
|
-
sourceCode = context.
|
40
|
+
sourceCode = context.sourceCode;
|
41
41
|
|
42
42
|
/**
|
43
43
|
* Gets the open brace token from a given node.
|
package/lib/rules/brace-style.js
CHANGED
@@ -19,7 +19,7 @@ module.exports = {
|
|
19
19
|
docs: {
|
20
20
|
description: "Enforce consistent brace style for blocks",
|
21
21
|
recommended: false,
|
22
|
-
url: "https://eslint.org/docs/rules/brace-style"
|
22
|
+
url: "https://eslint.org/docs/latest/rules/brace-style"
|
23
23
|
},
|
24
24
|
|
25
25
|
schema: [
|
@@ -53,7 +53,7 @@ module.exports = {
|
|
53
53
|
create(context) {
|
54
54
|
const style = context.options[0] || "1tbs",
|
55
55
|
params = context.options[1] || {},
|
56
|
-
sourceCode = context.
|
56
|
+
sourceCode = context.sourceCode;
|
57
57
|
|
58
58
|
//--------------------------------------------------------------------------
|
59
59
|
// Helpers
|
@@ -21,7 +21,7 @@ module.exports = {
|
|
21
21
|
docs: {
|
22
22
|
description: "Require `return` statements after callbacks",
|
23
23
|
recommended: false,
|
24
|
-
url: "https://eslint.org/docs/rules/callback-return"
|
24
|
+
url: "https://eslint.org/docs/latest/rules/callback-return"
|
25
25
|
},
|
26
26
|
|
27
27
|
schema: [{
|
@@ -37,7 +37,7 @@ module.exports = {
|
|
37
37
|
create(context) {
|
38
38
|
|
39
39
|
const callbacks = context.options[0] || ["callback", "cb", "next"],
|
40
|
-
sourceCode = context.
|
40
|
+
sourceCode = context.sourceCode;
|
41
41
|
|
42
42
|
//--------------------------------------------------------------------------
|
43
43
|
// Helpers
|
package/lib/rules/camelcase.js
CHANGED
@@ -23,7 +23,7 @@ module.exports = {
|
|
23
23
|
docs: {
|
24
24
|
description: "Enforce camelcase naming convention",
|
25
25
|
recommended: false,
|
26
|
-
url: "https://eslint.org/docs/rules/camelcase"
|
26
|
+
url: "https://eslint.org/docs/latest/rules/camelcase"
|
27
27
|
},
|
28
28
|
|
29
29
|
schema: [
|
@@ -73,7 +73,7 @@ module.exports = {
|
|
73
73
|
const ignoreImports = options.ignoreImports;
|
74
74
|
const ignoreGlobals = options.ignoreGlobals;
|
75
75
|
const allow = options.allow || [];
|
76
|
-
const sourceCode = context.
|
76
|
+
const sourceCode = context.sourceCode;
|
77
77
|
|
78
78
|
//--------------------------------------------------------------------------
|
79
79
|
// Helpers
|
@@ -107,7 +107,7 @@ module.exports = {
|
|
107
107
|
docs: {
|
108
108
|
description: "Enforce or disallow capitalization of the first letter of a comment",
|
109
109
|
recommended: false,
|
110
|
-
url: "https://eslint.org/docs/rules/capitalized-comments"
|
110
|
+
url: "https://eslint.org/docs/latest/rules/capitalized-comments"
|
111
111
|
},
|
112
112
|
|
113
113
|
fixable: "code",
|
@@ -139,7 +139,7 @@ module.exports = {
|
|
139
139
|
|
140
140
|
const capitalize = context.options[0] || "always",
|
141
141
|
normalizedOptions = getAllNormalizedOptions(context.options[1]),
|
142
|
-
sourceCode = context.
|
142
|
+
sourceCode = context.sourceCode;
|
143
143
|
|
144
144
|
createRegExpForIgnorePatterns(normalizedOptions);
|
145
145
|
|
@@ -23,7 +23,7 @@ module.exports = {
|
|
23
23
|
docs: {
|
24
24
|
description: "Enforce that class methods utilize `this`",
|
25
25
|
recommended: false,
|
26
|
-
url: "https://eslint.org/docs/rules/class-methods-use-this"
|
26
|
+
url: "https://eslint.org/docs/latest/rules/class-methods-use-this"
|
27
27
|
},
|
28
28
|
|
29
29
|
schema: [{
|
@@ -133,7 +133,7 @@ module.exports = {
|
|
133
133
|
if (isIncludedInstanceMethod(node.parent) && !methodUsesThis) {
|
134
134
|
context.report({
|
135
135
|
node,
|
136
|
-
loc: astUtils.getFunctionHeadLoc(node, context.
|
136
|
+
loc: astUtils.getFunctionHeadLoc(node, context.sourceCode),
|
137
137
|
messageId: "missingThis",
|
138
138
|
data: {
|
139
139
|
name: astUtils.getFunctionNameWithKind(node)
|
@@ -78,7 +78,7 @@ module.exports = {
|
|
78
78
|
docs: {
|
79
79
|
description: "Require or disallow trailing commas",
|
80
80
|
recommended: false,
|
81
|
-
url: "https://eslint.org/docs/rules/comma-dangle"
|
81
|
+
url: "https://eslint.org/docs/latest/rules/comma-dangle"
|
82
82
|
},
|
83
83
|
|
84
84
|
fixable: "code",
|
@@ -136,7 +136,7 @@ module.exports = {
|
|
136
136
|
create(context) {
|
137
137
|
const options = normalizeOptions(context.options[0], context.languageOptions.ecmaVersion);
|
138
138
|
|
139
|
-
const sourceCode = context.
|
139
|
+
const sourceCode = context.sourceCode;
|
140
140
|
|
141
141
|
/**
|
142
142
|
* Gets the last item of the given node.
|
@@ -18,7 +18,7 @@ module.exports = {
|
|
18
18
|
docs: {
|
19
19
|
description: "Enforce consistent spacing before and after commas",
|
20
20
|
recommended: false,
|
21
|
-
url: "https://eslint.org/docs/rules/comma-spacing"
|
21
|
+
url: "https://eslint.org/docs/latest/rules/comma-spacing"
|
22
22
|
},
|
23
23
|
|
24
24
|
fixable: "whitespace",
|
@@ -48,7 +48,7 @@ module.exports = {
|
|
48
48
|
|
49
49
|
create(context) {
|
50
50
|
|
51
|
-
const sourceCode = context.
|
51
|
+
const sourceCode = context.sourceCode;
|
52
52
|
const tokensAndComments = sourceCode.tokensAndComments;
|
53
53
|
|
54
54
|
const options = {
|
package/lib/rules/comma-style.js
CHANGED
@@ -19,7 +19,7 @@ module.exports = {
|
|
19
19
|
docs: {
|
20
20
|
description: "Enforce consistent comma style",
|
21
21
|
recommended: false,
|
22
|
-
url: "https://eslint.org/docs/rules/comma-style"
|
22
|
+
url: "https://eslint.org/docs/latest/rules/comma-style"
|
23
23
|
},
|
24
24
|
|
25
25
|
fixable: "code",
|
@@ -51,7 +51,7 @@ module.exports = {
|
|
51
51
|
|
52
52
|
create(context) {
|
53
53
|
const style = context.options[0] || "last",
|
54
|
-
sourceCode = context.
|
54
|
+
sourceCode = context.sourceCode;
|
55
55
|
const exceptions = {
|
56
56
|
ArrayPattern: true,
|
57
57
|
ArrowFunctionExpression: true,
|
package/lib/rules/complexity.js
CHANGED
@@ -25,7 +25,7 @@ module.exports = {
|
|
25
25
|
docs: {
|
26
26
|
description: "Enforce a maximum cyclomatic complexity allowed in a program",
|
27
27
|
recommended: false,
|
28
|
-
url: "https://eslint.org/docs/rules/complexity"
|
28
|
+
url: "https://eslint.org/docs/latest/rules/complexity"
|
29
29
|
},
|
30
30
|
|
31
31
|
schema: [
|
@@ -18,7 +18,7 @@ module.exports = {
|
|
18
18
|
docs: {
|
19
19
|
description: "Enforce consistent spacing inside computed property brackets",
|
20
20
|
recommended: false,
|
21
|
-
url: "https://eslint.org/docs/rules/computed-property-spacing"
|
21
|
+
url: "https://eslint.org/docs/latest/rules/computed-property-spacing"
|
22
22
|
},
|
23
23
|
|
24
24
|
fixable: "whitespace",
|
@@ -49,7 +49,7 @@ module.exports = {
|
|
49
49
|
},
|
50
50
|
|
51
51
|
create(context) {
|
52
|
-
const sourceCode = context.
|
52
|
+
const sourceCode = context.sourceCode;
|
53
53
|
const propertyNameMustBeSpaced = context.options[0] === "always"; // default is "never"
|
54
54
|
const enforceForClassMembers = !context.options[1] || context.options[1].enforceForClassMembers;
|
55
55
|
|