eslint 8.0.1 → 8.4.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 +8 -12
- package/conf/globals.js +144 -0
- package/lib/cli-engine/cli-engine.js +10 -21
- package/lib/cli.js +1 -1
- package/lib/config/default-config.js +11 -2
- package/lib/config/flat-config-array.js +2 -2
- package/lib/config/flat-config-helpers.js +67 -0
- package/lib/config/flat-config-schema.js +13 -8
- package/lib/config/rule-validator.js +28 -27
- package/lib/eslint/eslint.js +13 -18
- package/lib/linter/code-path-analysis/code-path-analyzer.js +6 -1
- package/lib/linter/code-path-analysis/code-path.js +1 -1
- package/lib/linter/linter.js +457 -45
- package/lib/linter/node-event-generator.js +7 -0
- package/lib/options.js +6 -6
- package/lib/rule-tester/rule-tester.js +5 -2
- package/lib/rules/accessor-pairs.js +1 -0
- package/lib/rules/array-bracket-newline.js +1 -0
- package/lib/rules/array-bracket-spacing.js +1 -0
- package/lib/rules/array-callback-return.js +1 -0
- package/lib/rules/array-element-newline.js +1 -0
- package/lib/rules/arrow-body-style.js +1 -0
- package/lib/rules/arrow-parens.js +1 -0
- package/lib/rules/arrow-spacing.js +1 -0
- package/lib/rules/block-scoped-var.js +3 -0
- package/lib/rules/block-spacing.js +11 -3
- package/lib/rules/brace-style.js +7 -0
- package/lib/rules/callback-return.js +1 -0
- package/lib/rules/camelcase.js +1 -0
- package/lib/rules/capitalized-comments.js +1 -0
- package/lib/rules/class-methods-use-this.js +11 -1
- package/lib/rules/comma-dangle.js +1 -0
- package/lib/rules/comma-spacing.js +1 -0
- package/lib/rules/comma-style.js +1 -0
- package/lib/rules/complexity.js +15 -6
- package/lib/rules/computed-property-spacing.js +1 -0
- package/lib/rules/consistent-return.js +1 -0
- package/lib/rules/consistent-this.js +1 -0
- package/lib/rules/constructor-super.js +1 -0
- package/lib/rules/curly.js +1 -0
- package/lib/rules/default-case-last.js +1 -0
- package/lib/rules/default-case.js +1 -0
- package/lib/rules/default-param-last.js +1 -0
- package/lib/rules/dot-location.js +1 -0
- package/lib/rules/dot-notation.js +1 -0
- package/lib/rules/eol-last.js +1 -0
- package/lib/rules/eqeqeq.js +1 -0
- package/lib/rules/for-direction.js +1 -0
- package/lib/rules/func-call-spacing.js +1 -0
- package/lib/rules/func-name-matching.js +1 -0
- package/lib/rules/func-names.js +1 -0
- package/lib/rules/func-style.js +1 -0
- package/lib/rules/function-call-argument-newline.js +1 -0
- package/lib/rules/function-paren-newline.js +1 -0
- package/lib/rules/generator-star-spacing.js +1 -0
- package/lib/rules/getter-return.js +1 -0
- package/lib/rules/global-require.js +1 -0
- package/lib/rules/grouped-accessor-pairs.js +1 -0
- package/lib/rules/guard-for-in.js +1 -0
- package/lib/rules/handle-callback-err.js +1 -0
- package/lib/rules/id-blacklist.js +1 -0
- package/lib/rules/id-denylist.js +1 -0
- package/lib/rules/id-length.js +1 -0
- package/lib/rules/id-match.js +1 -0
- package/lib/rules/implicit-arrow-linebreak.js +1 -0
- package/lib/rules/indent-legacy.js +1 -0
- package/lib/rules/indent.js +22 -0
- package/lib/rules/index.js +1 -0
- package/lib/rules/init-declarations.js +1 -0
- package/lib/rules/jsx-quotes.js +1 -0
- package/lib/rules/key-spacing.js +15 -13
- package/lib/rules/keyword-spacing.js +16 -1
- package/lib/rules/line-comment-position.js +1 -0
- package/lib/rules/linebreak-style.js +1 -0
- package/lib/rules/lines-around-comment.js +55 -7
- package/lib/rules/lines-around-directive.js +1 -0
- package/lib/rules/lines-between-class-members.js +1 -0
- package/lib/rules/max-classes-per-file.js +1 -0
- package/lib/rules/max-depth.js +3 -0
- package/lib/rules/max-len.js +1 -0
- package/lib/rules/max-lines-per-function.js +21 -2
- package/lib/rules/max-lines.js +1 -0
- package/lib/rules/max-nested-callbacks.js +1 -0
- package/lib/rules/max-params.js +1 -0
- package/lib/rules/max-statements-per-line.js +1 -0
- package/lib/rules/max-statements.js +11 -0
- package/lib/rules/multiline-comment-style.js +1 -0
- package/lib/rules/multiline-ternary.js +1 -0
- package/lib/rules/new-cap.js +1 -0
- package/lib/rules/new-parens.js +1 -0
- package/lib/rules/newline-after-var.js +1 -0
- package/lib/rules/newline-before-return.js +1 -0
- package/lib/rules/newline-per-chained-call.js +1 -0
- package/lib/rules/no-alert.js +1 -0
- package/lib/rules/no-array-constructor.js +1 -0
- package/lib/rules/no-async-promise-executor.js +1 -0
- package/lib/rules/no-await-in-loop.js +1 -0
- package/lib/rules/no-bitwise.js +1 -0
- package/lib/rules/no-buffer-constructor.js +1 -0
- package/lib/rules/no-caller.js +1 -0
- package/lib/rules/no-case-declarations.js +1 -0
- package/lib/rules/no-catch-shadow.js +1 -0
- package/lib/rules/no-class-assign.js +1 -0
- package/lib/rules/no-compare-neg-zero.js +1 -0
- package/lib/rules/no-cond-assign.js +1 -0
- package/lib/rules/no-confusing-arrow.js +1 -0
- package/lib/rules/no-console.js +1 -0
- package/lib/rules/no-const-assign.js +1 -0
- package/lib/rules/no-constant-condition.js +4 -1
- package/lib/rules/no-constructor-return.js +1 -0
- package/lib/rules/no-continue.js +1 -0
- package/lib/rules/no-control-regex.js +1 -0
- package/lib/rules/no-debugger.js +1 -0
- package/lib/rules/no-delete-var.js +1 -0
- package/lib/rules/no-div-regex.js +1 -0
- package/lib/rules/no-dupe-args.js +1 -0
- package/lib/rules/no-dupe-class-members.js +1 -0
- package/lib/rules/no-dupe-else-if.js +1 -0
- package/lib/rules/no-dupe-keys.js +1 -0
- package/lib/rules/no-duplicate-case.js +1 -0
- package/lib/rules/no-duplicate-imports.js +1 -0
- package/lib/rules/no-else-return.js +1 -0
- package/lib/rules/no-empty-character-class.js +1 -0
- package/lib/rules/no-empty-function.js +1 -0
- package/lib/rules/no-empty-pattern.js +1 -0
- package/lib/rules/no-empty.js +1 -0
- package/lib/rules/no-eq-null.js +1 -0
- package/lib/rules/no-eval.js +3 -0
- package/lib/rules/no-ex-assign.js +1 -0
- package/lib/rules/no-extend-native.js +1 -0
- package/lib/rules/no-extra-bind.js +1 -0
- package/lib/rules/no-extra-boolean-cast.js +1 -0
- package/lib/rules/no-extra-label.js +1 -0
- package/lib/rules/no-extra-parens.js +1 -0
- package/lib/rules/no-extra-semi.js +2 -1
- package/lib/rules/no-fallthrough.js +1 -0
- package/lib/rules/no-floating-decimal.js +1 -0
- package/lib/rules/no-func-assign.js +1 -0
- package/lib/rules/no-global-assign.js +1 -0
- package/lib/rules/no-implicit-coercion.js +1 -0
- package/lib/rules/no-implicit-globals.js +1 -0
- package/lib/rules/no-implied-eval.js +1 -0
- package/lib/rules/no-import-assign.js +1 -0
- package/lib/rules/no-inline-comments.js +1 -0
- package/lib/rules/no-inner-declarations.js +27 -4
- package/lib/rules/no-invalid-regexp.js +1 -0
- package/lib/rules/no-invalid-this.js +5 -0
- package/lib/rules/no-irregular-whitespace.js +1 -0
- package/lib/rules/no-iterator.js +1 -0
- package/lib/rules/no-label-var.js +1 -0
- package/lib/rules/no-labels.js +1 -0
- package/lib/rules/no-lone-blocks.js +9 -2
- package/lib/rules/no-lonely-if.js +1 -0
- package/lib/rules/no-loop-func.js +1 -0
- package/lib/rules/no-loss-of-precision.js +1 -0
- package/lib/rules/no-magic-numbers.js +1 -0
- package/lib/rules/no-misleading-character-class.js +1 -0
- package/lib/rules/no-mixed-operators.js +1 -0
- package/lib/rules/no-mixed-requires.js +1 -0
- package/lib/rules/no-mixed-spaces-and-tabs.js +1 -0
- package/lib/rules/no-multi-assign.js +1 -0
- package/lib/rules/no-multi-spaces.js +1 -0
- package/lib/rules/no-multi-str.js +1 -0
- package/lib/rules/no-multiple-empty-lines.js +1 -0
- package/lib/rules/no-native-reassign.js +1 -0
- package/lib/rules/no-negated-condition.js +1 -0
- package/lib/rules/no-negated-in-lhs.js +1 -0
- package/lib/rules/no-nested-ternary.js +1 -0
- package/lib/rules/no-new-func.js +1 -0
- package/lib/rules/no-new-object.js +1 -0
- package/lib/rules/no-new-require.js +1 -0
- package/lib/rules/no-new-symbol.js +1 -0
- package/lib/rules/no-new-wrappers.js +1 -0
- package/lib/rules/no-new.js +1 -0
- package/lib/rules/no-nonoctal-decimal-escape.js +1 -0
- package/lib/rules/no-obj-calls.js +1 -0
- package/lib/rules/no-octal-escape.js +1 -0
- package/lib/rules/no-octal.js +1 -0
- package/lib/rules/no-param-reassign.js +1 -0
- package/lib/rules/no-path-concat.js +1 -0
- package/lib/rules/no-plusplus.js +1 -0
- package/lib/rules/no-process-env.js +1 -0
- package/lib/rules/no-process-exit.js +1 -0
- package/lib/rules/no-promise-executor-return.js +1 -0
- package/lib/rules/no-proto.js +1 -0
- package/lib/rules/no-prototype-builtins.js +1 -0
- package/lib/rules/no-redeclare.js +3 -0
- package/lib/rules/no-regex-spaces.js +1 -0
- package/lib/rules/no-restricted-exports.js +1 -0
- package/lib/rules/no-restricted-globals.js +1 -0
- package/lib/rules/no-restricted-imports.js +1 -0
- package/lib/rules/no-restricted-modules.js +1 -0
- package/lib/rules/no-restricted-properties.js +1 -0
- package/lib/rules/no-restricted-syntax.js +1 -0
- package/lib/rules/no-return-assign.js +1 -0
- package/lib/rules/no-return-await.js +1 -0
- package/lib/rules/no-script-url.js +1 -0
- package/lib/rules/no-self-assign.js +1 -0
- package/lib/rules/no-self-compare.js +1 -0
- package/lib/rules/no-sequences.js +1 -0
- package/lib/rules/no-setter-return.js +1 -0
- package/lib/rules/no-shadow-restricted-names.js +1 -0
- package/lib/rules/no-shadow.js +1 -0
- package/lib/rules/no-spaced-func.js +1 -0
- package/lib/rules/no-sparse-arrays.js +1 -0
- package/lib/rules/no-sync.js +1 -0
- package/lib/rules/no-tabs.js +1 -0
- package/lib/rules/no-template-curly-in-string.js +1 -0
- package/lib/rules/no-ternary.js +1 -0
- package/lib/rules/no-this-before-super.js +1 -0
- package/lib/rules/no-throw-literal.js +1 -0
- package/lib/rules/no-trailing-spaces.js +1 -0
- package/lib/rules/no-undef-init.js +1 -0
- package/lib/rules/no-undef.js +1 -0
- package/lib/rules/no-undefined.js +1 -0
- package/lib/rules/no-underscore-dangle.js +1 -0
- package/lib/rules/no-unexpected-multiline.js +1 -0
- package/lib/rules/no-unmodified-loop-condition.js +1 -0
- package/lib/rules/no-unneeded-ternary.js +1 -0
- package/lib/rules/no-unreachable-loop.js +1 -0
- package/lib/rules/no-unreachable.js +1 -0
- package/lib/rules/no-unsafe-finally.js +1 -0
- package/lib/rules/no-unsafe-negation.js +1 -0
- package/lib/rules/no-unsafe-optional-chaining.js +1 -0
- package/lib/rules/no-unused-expressions.js +7 -0
- package/lib/rules/no-unused-labels.js +1 -0
- package/lib/rules/no-unused-private-class-members.js +195 -0
- package/lib/rules/no-unused-vars.js +1 -0
- package/lib/rules/no-use-before-define.js +176 -74
- package/lib/rules/no-useless-backreference.js +1 -0
- package/lib/rules/no-useless-call.js +1 -0
- package/lib/rules/no-useless-catch.js +1 -0
- package/lib/rules/no-useless-computed-key.js +1 -0
- package/lib/rules/no-useless-concat.js +1 -0
- package/lib/rules/no-useless-constructor.js +1 -0
- package/lib/rules/no-useless-escape.js +1 -0
- package/lib/rules/no-useless-rename.js +1 -0
- package/lib/rules/no-useless-return.js +1 -0
- package/lib/rules/no-var.js +1 -0
- package/lib/rules/no-void.js +1 -0
- package/lib/rules/no-warning-comments.js +1 -0
- package/lib/rules/no-whitespace-before-property.js +1 -0
- package/lib/rules/no-with.js +1 -0
- package/lib/rules/nonblock-statement-body-position.js +1 -0
- package/lib/rules/object-curly-newline.js +1 -0
- package/lib/rules/object-curly-spacing.js +1 -0
- package/lib/rules/object-property-newline.js +1 -0
- package/lib/rules/object-shorthand.js +1 -0
- package/lib/rules/one-var-declaration-per-line.js +1 -0
- package/lib/rules/one-var.js +6 -1
- package/lib/rules/operator-assignment.js +1 -0
- package/lib/rules/operator-linebreak.js +1 -0
- package/lib/rules/padded-blocks.js +9 -0
- package/lib/rules/padding-line-between-statements.js +3 -0
- package/lib/rules/prefer-arrow-callback.js +1 -0
- package/lib/rules/prefer-const.js +2 -1
- package/lib/rules/prefer-destructuring.js +1 -0
- package/lib/rules/prefer-exponentiation-operator.js +1 -0
- package/lib/rules/prefer-named-capture-group.js +1 -0
- package/lib/rules/prefer-numeric-literals.js +1 -0
- package/lib/rules/prefer-object-spread.js +1 -0
- package/lib/rules/prefer-promise-reject-errors.js +1 -0
- package/lib/rules/prefer-reflect.js +1 -0
- package/lib/rules/prefer-regex-literals.js +1 -0
- package/lib/rules/prefer-rest-params.js +1 -0
- package/lib/rules/prefer-spread.js +1 -0
- package/lib/rules/prefer-template.js +1 -0
- package/lib/rules/quote-props.js +1 -0
- package/lib/rules/quotes.js +1 -0
- package/lib/rules/radix.js +1 -0
- package/lib/rules/require-atomic-updates.js +15 -2
- package/lib/rules/require-await.js +1 -0
- package/lib/rules/require-jsdoc.js +1 -0
- package/lib/rules/require-unicode-regexp.js +1 -0
- package/lib/rules/require-yield.js +1 -0
- package/lib/rules/rest-spread-spacing.js +1 -0
- package/lib/rules/semi-spacing.js +1 -0
- package/lib/rules/semi-style.js +9 -2
- package/lib/rules/semi.js +19 -9
- package/lib/rules/sort-imports.js +1 -0
- package/lib/rules/sort-keys.js +1 -0
- package/lib/rules/sort-vars.js +1 -0
- package/lib/rules/space-before-blocks.js +1 -0
- package/lib/rules/space-before-function-paren.js +1 -0
- package/lib/rules/space-in-parens.js +1 -0
- package/lib/rules/space-infix-ops.js +1 -0
- package/lib/rules/space-unary-ops.js +1 -0
- package/lib/rules/spaced-comment.js +1 -0
- package/lib/rules/strict.js +1 -0
- package/lib/rules/switch-colon-spacing.js +1 -0
- package/lib/rules/symbol-description.js +1 -0
- package/lib/rules/template-curly-spacing.js +1 -0
- package/lib/rules/template-tag-spacing.js +1 -0
- package/lib/rules/unicode-bom.js +1 -0
- package/lib/rules/use-isnan.js +1 -0
- package/lib/rules/utils/ast-utils.js +15 -3
- package/lib/rules/valid-jsdoc.js +1 -0
- package/lib/rules/valid-typeof.js +1 -0
- package/lib/rules/vars-on-top.js +26 -12
- package/lib/rules/wrap-iife.js +1 -0
- package/lib/rules/wrap-regex.js +1 -0
- package/lib/rules/yield-star-spacing.js +1 -0
- package/lib/rules/yoda.js +1 -0
- package/lib/shared/types.js +10 -0
- package/package.json +12 -12
package/lib/rules/unicode-bom.js
CHANGED
package/lib/rules/use-isnan.js
CHANGED
@@ -35,7 +35,7 @@ const COMMENTS_IGNORE_PATTERN = /^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|g
|
|
35
35
|
const LINEBREAKS = new Set(["\r\n", "\r", "\n", "\u2028", "\u2029"]);
|
36
36
|
|
37
37
|
// A set of node types that can contain a list of statements
|
38
|
-
const STATEMENT_LIST_PARENTS = new Set(["Program", "BlockStatement", "SwitchCase"]);
|
38
|
+
const STATEMENT_LIST_PARENTS = new Set(["Program", "BlockStatement", "StaticBlock", "SwitchCase"]);
|
39
39
|
|
40
40
|
const DECIMAL_INTEGER_PATTERN = /^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u;
|
41
41
|
|
@@ -937,6 +937,8 @@ module.exports = {
|
|
937
937
|
*
|
938
938
|
* First, this checks the node:
|
939
939
|
*
|
940
|
+
* - The given node is not in `PropertyDefinition#value` position.
|
941
|
+
* - The given node is not `StaticBlock`.
|
940
942
|
* - The function name does not start with uppercase. It's a convention to capitalize the names
|
941
943
|
* of constructor functions. This check is not performed if `capIsConstructor` is set to `false`.
|
942
944
|
* - The function does not have a JSDoc comment that has a @this tag.
|
@@ -951,7 +953,8 @@ module.exports = {
|
|
951
953
|
* - The location is not on an ES2015 class.
|
952
954
|
* - Its `bind`/`call`/`apply` method is not called directly.
|
953
955
|
* - The function is not a callback of array methods (such as `.forEach()`) if `thisArg` is given.
|
954
|
-
* @param {ASTNode} node A function node to check.
|
956
|
+
* @param {ASTNode} node A function node to check. It also can be an implicit function, like `StaticBlock`
|
957
|
+
* or any expression that is `PropertyDefinition#value` node.
|
955
958
|
* @param {SourceCode} sourceCode A SourceCode instance to get comments.
|
956
959
|
* @param {boolean} [capIsConstructor = true] `false` disables the assumption that functions which name starts
|
957
960
|
* with an uppercase or are assigned to a variable which name starts with an uppercase are constructors.
|
@@ -964,7 +967,12 @@ module.exports = {
|
|
964
967
|
* Therefore, A expression node at `PropertyDefinition#value` is a function.
|
965
968
|
* In this case, `this` is always not default binding.
|
966
969
|
*/
|
967
|
-
if (node
|
970
|
+
if (node.parent.type === "PropertyDefinition" && node.parent.value === node) {
|
971
|
+
return false;
|
972
|
+
}
|
973
|
+
|
974
|
+
// Class static blocks are implicit functions. In this case, `this` is always not default binding.
|
975
|
+
if (node.type === "StaticBlock") {
|
968
976
|
return false;
|
969
977
|
}
|
970
978
|
|
@@ -1825,6 +1833,10 @@ module.exports = {
|
|
1825
1833
|
return true;
|
1826
1834
|
}
|
1827
1835
|
|
1836
|
+
if (rightToken.type === "PrivateIdentifier") {
|
1837
|
+
return true;
|
1838
|
+
}
|
1839
|
+
|
1828
1840
|
return false;
|
1829
1841
|
},
|
1830
1842
|
|
package/lib/rules/valid-jsdoc.js
CHANGED
package/lib/rules/vars-on-top.js
CHANGED
@@ -9,6 +9,7 @@
|
|
9
9
|
// Rule Definition
|
10
10
|
//------------------------------------------------------------------------------
|
11
11
|
|
12
|
+
/** @type {import('../shared/types').Rule} */
|
12
13
|
module.exports = {
|
13
14
|
meta: {
|
14
15
|
type: "suggestion",
|
@@ -77,10 +78,12 @@ module.exports = {
|
|
77
78
|
const l = statements.length;
|
78
79
|
let i = 0;
|
79
80
|
|
80
|
-
//
|
81
|
-
|
82
|
-
|
83
|
-
|
81
|
+
// Skip over directives and imports. Static blocks don't have either.
|
82
|
+
if (node.parent.type !== "StaticBlock") {
|
83
|
+
for (; i < l; ++i) {
|
84
|
+
if (!looksLikeDirective(statements[i]) && !looksLikeImport(statements[i])) {
|
85
|
+
break;
|
86
|
+
}
|
84
87
|
}
|
85
88
|
}
|
86
89
|
|
@@ -111,16 +114,27 @@ module.exports = {
|
|
111
114
|
/**
|
112
115
|
* Checks whether variable is on top at functional block scope level
|
113
116
|
* @param {ASTNode} node The node to check
|
114
|
-
* @param {ASTNode} parent Parent of the node
|
115
|
-
* @param {ASTNode} grandParent Parent of the node's parent
|
116
117
|
* @returns {void}
|
117
118
|
*/
|
118
|
-
function blockScopeVarCheck(node
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
119
|
+
function blockScopeVarCheck(node) {
|
120
|
+
const { parent } = node;
|
121
|
+
|
122
|
+
if (
|
123
|
+
parent.type === "BlockStatement" &&
|
124
|
+
/Function/u.test(parent.parent.type) &&
|
125
|
+
isVarOnTop(node, parent.body)
|
126
|
+
) {
|
127
|
+
return;
|
123
128
|
}
|
129
|
+
|
130
|
+
if (
|
131
|
+
parent.type === "StaticBlock" &&
|
132
|
+
isVarOnTop(node, parent.body)
|
133
|
+
) {
|
134
|
+
return;
|
135
|
+
}
|
136
|
+
|
137
|
+
context.report({ node, messageId: "top" });
|
124
138
|
}
|
125
139
|
|
126
140
|
//--------------------------------------------------------------------------
|
@@ -134,7 +148,7 @@ module.exports = {
|
|
134
148
|
} else if (node.parent.type === "Program") {
|
135
149
|
globalVarCheck(node, node.parent);
|
136
150
|
} else {
|
137
|
-
blockScopeVarCheck(node
|
151
|
+
blockScopeVarCheck(node);
|
138
152
|
}
|
139
153
|
}
|
140
154
|
};
|
package/lib/rules/wrap-iife.js
CHANGED
package/lib/rules/wrap-regex.js
CHANGED
package/lib/rules/yoda.js
CHANGED
@@ -115,6 +115,7 @@ function getNormalizedLiteral(node) {
|
|
115
115
|
// Rule Definition
|
116
116
|
//------------------------------------------------------------------------------
|
117
117
|
|
118
|
+
/** @type {import('../shared/types').Rule} */
|
118
119
|
module.exports = {
|
119
120
|
meta: {
|
120
121
|
type: "suggestion",
|
package/lib/shared/types.js
CHANGED
@@ -23,6 +23,16 @@ module.exports = {};
|
|
23
23
|
* @property {EcmaFeatures} [ecmaFeatures] The optional features.
|
24
24
|
* @property {3|5|6|7|8|9|10|11|12|13|2015|2016|2017|2018|2019|2020|2021|2022} [ecmaVersion] The ECMAScript version (or revision number).
|
25
25
|
* @property {"script"|"module"} [sourceType] The source code type.
|
26
|
+
* @property {boolean} [allowReserved] Allowing the use of reserved words as identifiers in ES3.
|
27
|
+
*/
|
28
|
+
|
29
|
+
/**
|
30
|
+
* @typedef {Object} LanguageOptions
|
31
|
+
* @property {number|"latest"} [ecmaVersion] The ECMAScript version (or revision number).
|
32
|
+
* @property {Record<string, GlobalConf>} [globals] The global variable settings.
|
33
|
+
* @property {"script"|"module"|"commonjs"} [sourceType] The source code type.
|
34
|
+
* @property {string|Object} [parser] The parser to use.
|
35
|
+
* @property {Object} [parserOptions] The parser options to use.
|
26
36
|
*/
|
27
37
|
|
28
38
|
/**
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "eslint",
|
3
|
-
"version": "8.0
|
3
|
+
"version": "8.4.0",
|
4
4
|
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
|
5
5
|
"description": "An AST-based pattern checker for JavaScript.",
|
6
6
|
"bin": {
|
@@ -47,8 +47,8 @@
|
|
47
47
|
"homepage": "https://eslint.org",
|
48
48
|
"bugs": "https://github.com/eslint/eslint/issues/",
|
49
49
|
"dependencies": {
|
50
|
-
"@eslint/eslintrc": "^1.0.
|
51
|
-
"@humanwhocodes/config-array": "^0.
|
50
|
+
"@eslint/eslintrc": "^1.0.5",
|
51
|
+
"@humanwhocodes/config-array": "^0.9.2",
|
52
52
|
"ajv": "^6.10.0",
|
53
53
|
"chalk": "^4.0.0",
|
54
54
|
"cross-spawn": "^7.0.2",
|
@@ -56,10 +56,10 @@
|
|
56
56
|
"doctrine": "^3.0.0",
|
57
57
|
"enquirer": "^2.3.5",
|
58
58
|
"escape-string-regexp": "^4.0.0",
|
59
|
-
"eslint-scope": "^
|
59
|
+
"eslint-scope": "^7.1.0",
|
60
60
|
"eslint-utils": "^3.0.0",
|
61
|
-
"eslint-visitor-keys": "^3.
|
62
|
-
"espree": "^9.
|
61
|
+
"eslint-visitor-keys": "^3.1.0",
|
62
|
+
"espree": "^9.2.0",
|
63
63
|
"esquery": "^1.4.0",
|
64
64
|
"esutils": "^2.0.2",
|
65
65
|
"fast-deep-equal": "^3.1.3",
|
@@ -81,7 +81,7 @@
|
|
81
81
|
"progress": "^2.0.0",
|
82
82
|
"regexpp": "^3.2.0",
|
83
83
|
"semver": "^7.2.1",
|
84
|
-
"strip-ansi": "^6.0.
|
84
|
+
"strip-ansi": "^6.0.1",
|
85
85
|
"strip-json-comments": "^3.1.0",
|
86
86
|
"text-table": "^0.2.0",
|
87
87
|
"v8-compile-cache": "^2.0.3"
|
@@ -99,11 +99,11 @@
|
|
99
99
|
"eslint": "file:.",
|
100
100
|
"eslint-config-eslint": "file:packages/eslint-config-eslint",
|
101
101
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
102
|
-
"eslint-plugin-eslint-plugin": "^
|
102
|
+
"eslint-plugin-eslint-plugin": "^4.0.1",
|
103
103
|
"eslint-plugin-internal-rules": "file:tools/internal-rules",
|
104
|
-
"eslint-plugin-jsdoc": "^
|
104
|
+
"eslint-plugin-jsdoc": "^37.0.0",
|
105
105
|
"eslint-plugin-node": "^11.1.0",
|
106
|
-
"eslint-release": "^3.
|
106
|
+
"eslint-release": "^3.2.0",
|
107
107
|
"eslump": "^3.0.0",
|
108
108
|
"esprima": "^4.0.1",
|
109
109
|
"fs-teardown": "^0.1.3",
|
@@ -116,8 +116,8 @@
|
|
116
116
|
"karma-webpack": "^5.0.0",
|
117
117
|
"lint-staged": "^11.0.0",
|
118
118
|
"load-perf": "^0.2.0",
|
119
|
-
"markdownlint": "^0.
|
120
|
-
"markdownlint-cli": "^0.
|
119
|
+
"markdownlint": "^0.24.0",
|
120
|
+
"markdownlint-cli": "^0.30.0",
|
121
121
|
"memfs": "^3.0.1",
|
122
122
|
"mocha": "^8.3.2",
|
123
123
|
"mocha-junit-reporter": "^2.0.0",
|