bahlint 28.58.69340002 → 28.58.69340004
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/bin/bahlint.js +302 -0
- package/bin/eslint.js +108 -110
- package/conf/ecma-version.js +2 -2
- package/conf/globals.js +105 -105
- package/lib/api.js +11 -11
- package/lib/cli-engine/formatters/html.js +106 -106
- package/lib/cli-engine/formatters/json-with-metadata.js +5 -5
- package/lib/cli-engine/formatters/json.js +2 -2
- package/lib/cli-engine/formatters/stylish.js +120 -120
- package/lib/cli-engine/hash.js +3 -3
- package/lib/cli-engine/lint-result-cache.js +162 -162
- package/lib/cli.js +408 -408
- package/lib/config/config-loader.js +512 -513
- package/lib/config/config.js +470 -470
- package/lib/config/default-config.js +50 -50
- package/lib/config/flat-config-array.js +170 -172
- package/lib/config/flat-config-schema.js +372 -373
- package/lib/config-api.js +4 -4
- package/lib/eslint/eslint-helpers.js +980 -980
- package/lib/eslint/eslint.js +1053 -1053
- package/lib/eslint/index.js +3 -3
- package/lib/eslint/worker.js +114 -114
- package/lib/languages/js/index.js +268 -268
- package/lib/languages/js/source-code/index.js +3 -3
- package/lib/languages/js/source-code/source-code.js +999 -1002
- package/lib/languages/js/source-code/token-store/backward-token-comment-cursor.js +36 -36
- package/lib/languages/js/source-code/token-store/backward-token-cursor.js +35 -35
- package/lib/languages/js/source-code/token-store/cursor.js +37 -37
- package/lib/languages/js/source-code/token-store/cursors.js +88 -88
- package/lib/languages/js/source-code/token-store/decorative-cursor.js +16 -16
- package/lib/languages/js/source-code/token-store/filter-cursor.js +21 -21
- package/lib/languages/js/source-code/token-store/forward-token-comment-cursor.js +40 -40
- package/lib/languages/js/source-code/token-store/forward-token-cursor.js +43 -43
- package/lib/languages/js/source-code/token-store/index.js +564 -564
- package/lib/languages/js/source-code/token-store/limit-cursor.js +19 -19
- package/lib/languages/js/source-code/token-store/padded-token-cursor.js +25 -25
- package/lib/languages/js/source-code/token-store/skip-cursor.js +21 -21
- package/lib/languages/js/source-code/token-store/utils.js +78 -78
- package/lib/languages/js/validate-language-options.js +104 -104
- package/lib/linter/apply-disable-directives.js +443 -443
- package/lib/linter/code-path-analysis/code-path-analyzer.js +647 -647
- package/lib/linter/code-path-analysis/code-path-segment.js +217 -217
- package/lib/linter/code-path-analysis/code-path-state.js +2115 -2115
- package/lib/linter/code-path-analysis/code-path.js +299 -299
- package/lib/linter/code-path-analysis/debug-helpers.js +171 -172
- package/lib/linter/code-path-analysis/fork-context.js +292 -292
- package/lib/linter/code-path-analysis/id-generator.js +20 -20
- package/lib/linter/esquery.js +218 -218
- package/lib/linter/file-context.js +67 -67
- package/lib/linter/file-report.js +386 -386
- package/lib/linter/index.js +6 -6
- package/lib/linter/interpolate.js +17 -17
- package/lib/linter/linter.js +1286 -1286
- package/lib/linter/rule-fixer.js +144 -144
- package/lib/linter/source-code-fixer.js +95 -95
- package/lib/linter/source-code-traverser.js +263 -263
- package/lib/linter/source-code-visitor.js +51 -51
- package/lib/linter/timing.js +139 -139
- package/lib/linter/vfile.js +71 -71
- package/lib/options.js +339 -339
- package/lib/rule-tester/index.js +3 -3
- package/lib/rule-tester/rule-tester.js +1575 -1577
- package/lib/rules/accessor-pairs.js +323 -323
- package/lib/rules/array-bracket-newline.js +240 -240
- package/lib/rules/array-bracket-spacing.js +250 -250
- package/lib/rules/array-callback-return.js +381 -381
- package/lib/rules/array-element-newline.js +345 -345
- package/lib/rules/arrow-body-style.js +375 -375
- package/lib/rules/arrow-parens.js +185 -185
- package/lib/rules/arrow-spacing.js +170 -170
- package/lib/rules/block-scoped-var.js +125 -125
- package/lib/rules/block-spacing.js +185 -185
- package/lib/rules/brace-style.js +225 -225
- package/lib/rules/callback-return.js +199 -199
- package/lib/rules/camelcase.js +390 -390
- package/lib/rules/capitalized-comments.js +246 -246
- package/lib/rules/class-methods-use-this.js +226 -226
- package/lib/rules/comma-dangle.js +380 -380
- package/lib/rules/comma-spacing.js +167 -167
- package/lib/rules/comma-style.js +366 -366
- package/lib/rules/complexity.js +180 -180
- package/lib/rules/computed-property-spacing.js +231 -231
- package/lib/rules/consistent-return.js +179 -179
- package/lib/rules/consistent-this.js +165 -165
- package/lib/rules/constructor-super.js +393 -393
- package/lib/rules/curly.js +385 -385
- package/lib/rules/default-case-last.js +37 -37
- package/lib/rules/default-case.js +88 -88
- package/lib/rules/default-param-last.js +52 -52
- package/lib/rules/dot-location.js +121 -121
- package/lib/rules/dot-notation.js +184 -184
- package/lib/rules/eol-last.js +112 -112
- package/lib/rules/eqeqeq.js +187 -187
- package/lib/rules/for-direction.js +144 -144
- package/lib/rules/func-call-spacing.js +238 -238
- package/lib/rules/func-name-matching.js +262 -262
- package/lib/rules/func-names.js +163 -163
- package/lib/rules/func-style.js +192 -192
- package/lib/rules/function-call-argument-newline.js +152 -152
- package/lib/rules/function-paren-newline.js +341 -341
- package/lib/rules/generator-star-spacing.js +227 -227
- package/lib/rules/getter-return.js +200 -200
- package/lib/rules/global-require.js +74 -74
- package/lib/rules/grouped-accessor-pairs.js +179 -179
- package/lib/rules/guard-for-in.js +58 -58
- package/lib/rules/handle-callback-err.js +95 -95
- package/lib/rules/id-blacklist.js +159 -159
- package/lib/rules/id-denylist.js +150 -150
- package/lib/rules/id-length.js +175 -175
- package/lib/rules/id-match.js +320 -320
- package/lib/rules/implicit-arrow-linebreak.js +103 -103
- package/lib/rules/indent-legacy.js +1268 -1268
- package/lib/rules/indent.js +2184 -2184
- package/lib/rules/index.js +319 -319
- package/lib/rules/init-declarations.js +133 -133
- package/lib/rules/jsx-quotes.js +92 -92
- package/lib/rules/key-spacing.js +742 -742
- package/lib/rules/keyword-spacing.js +618 -618
- package/lib/rules/line-comment-position.js +135 -135
- package/lib/rules/linebreak-style.js +108 -108
- package/lib/rules/lines-around-comment.js +488 -488
- package/lib/rules/lines-around-directive.js +222 -222
- package/lib/rules/lines-between-class-members.js +296 -296
- package/lib/rules/logical-assignment-operators.js +539 -539
- package/lib/rules/max-classes-per-file.js +69 -69
- package/lib/rules/max-depth.js +146 -146
- package/lib/rules/max-len.js +450 -450
- package/lib/rules/max-lines-per-function.js +193 -193
- package/lib/rules/max-lines.js +159 -159
- package/lib/rules/max-nested-callbacks.js +102 -102
- package/lib/rules/max-params.js +119 -119
- package/lib/rules/max-statements-per-line.js +202 -202
- package/lib/rules/max-statements.js +167 -167
- package/lib/rules/multiline-comment-style.js +601 -601
- package/lib/rules/multiline-ternary.js +207 -207
- package/lib/rules/new-cap.js +227 -227
- package/lib/rules/new-parens.js +84 -84
- package/lib/rules/newline-after-var.js +282 -282
- package/lib/rules/newline-before-return.js +224 -224
- package/lib/rules/newline-per-chained-call.js +142 -142
- package/lib/rules/no-alert.js +79 -79
- package/lib/rules/no-array-constructor.js +168 -168
- package/lib/rules/no-async-promise-executor.js +30 -30
- package/lib/rules/no-await-in-loop.js +73 -73
- package/lib/rules/no-bitwise.js +109 -109
- package/lib/rules/no-buffer-constructor.js +55 -55
- package/lib/rules/no-caller.js +36 -36
- package/lib/rules/no-case-declarations.js +61 -61
- package/lib/rules/no-catch-shadow.js +67 -67
- package/lib/rules/no-class-assign.js +45 -45
- package/lib/rules/no-compare-neg-zero.js +55 -55
- package/lib/rules/no-cond-assign.js +139 -139
- package/lib/rules/no-confusing-arrow.js +84 -84
- package/lib/rules/no-console.js +194 -194
- package/lib/rules/no-const-assign.js +44 -44
- package/lib/rules/no-constant-binary-expression.js +470 -470
- package/lib/rules/no-constant-condition.js +156 -156
- package/lib/rules/no-constructor-return.js +48 -48
- package/lib/rules/no-continue.js +21 -21
- package/lib/rules/no-control-regex.js +122 -122
- package/lib/rules/no-debugger.js +24 -24
- package/lib/rules/no-delete-var.js +25 -25
- package/lib/rules/no-div-regex.js +47 -47
- package/lib/rules/no-dupe-args.js +74 -74
- package/lib/rules/no-dupe-class-members.js +103 -103
- package/lib/rules/no-dupe-else-if.js +100 -100
- package/lib/rules/no-dupe-keys.js +130 -130
- package/lib/rules/no-duplicate-case.js +51 -51
- package/lib/rules/no-duplicate-imports.js +262 -262
- package/lib/rules/no-else-return.js +419 -419
- package/lib/rules/no-empty-character-class.js +49 -49
- package/lib/rules/no-empty-function.js +187 -187
- package/lib/rules/no-empty-pattern.js +61 -61
- package/lib/rules/no-empty-static-block.js +54 -54
- package/lib/rules/no-empty.js +135 -135
- package/lib/rules/no-eq-null.js +35 -35
- package/lib/rules/no-eval.js +253 -253
- package/lib/rules/no-ex-assign.js +43 -43
- package/lib/rules/no-extend-native.js +154 -154
- package/lib/rules/no-extra-bind.js +198 -198
- package/lib/rules/no-extra-boolean-cast.js +370 -370
- package/lib/rules/no-extra-label.js +146 -146
- package/lib/rules/no-extra-parens.js +1482 -1482
- package/lib/rules/no-extra-semi.js +147 -147
- package/lib/rules/no-fallthrough.js +179 -179
- package/lib/rules/no-floating-decimal.js +70 -70
- package/lib/rules/no-func-assign.js +55 -55
- package/lib/rules/no-global-assign.js +71 -71
- package/lib/rules/no-implicit-coercion.js +309 -309
- package/lib/rules/no-implicit-globals.js +164 -164
- package/lib/rules/no-implied-eval.js +146 -146
- package/lib/rules/no-import-assign.js +130 -130
- package/lib/rules/no-inline-comments.js +102 -102
- package/lib/rules/no-inner-declarations.js +109 -109
- package/lib/rules/no-invalid-regexp.js +212 -212
- package/lib/rules/no-invalid-this.js +140 -140
- package/lib/rules/no-irregular-whitespace.js +255 -255
- package/lib/rules/no-iterator.js +30 -30
- package/lib/rules/no-label-var.js +51 -51
- package/lib/rules/no-labels.js +139 -139
- package/lib/rules/no-lone-blocks.js +122 -122
- package/lib/rules/no-lonely-if.js +85 -85
- package/lib/rules/no-loop-func.js +232 -232
- package/lib/rules/no-loss-of-precision.js +135 -135
- package/lib/rules/no-magic-numbers.js +281 -281
- package/lib/rules/no-misleading-character-class.js +473 -473
- package/lib/rules/no-mixed-operators.js +191 -191
- package/lib/rules/no-mixed-requires.js +226 -226
- package/lib/rules/no-mixed-spaces-and-tabs.js +131 -131
- package/lib/rules/no-multi-assign.js +46 -46
- package/lib/rules/no-multi-spaces.js +158 -158
- package/lib/rules/no-multi-str.js +42 -42
- package/lib/rules/no-multiple-empty-lines.js +188 -188
- package/lib/rules/no-native-reassign.js +83 -83
- package/lib/rules/no-negated-condition.js +78 -78
- package/lib/rules/no-negated-in-lhs.js +41 -41
- package/lib/rules/no-nested-ternary.js +29 -29
- package/lib/rules/no-new-func.js +69 -69
- package/lib/rules/no-new-native-nonconstructor.js +43 -43
- package/lib/rules/no-new-object.js +49 -49
- package/lib/rules/no-new-require.js +48 -48
- package/lib/rules/no-new-symbol.js +51 -51
- package/lib/rules/no-new-wrappers.js +44 -44
- package/lib/rules/no-new.js +24 -24
- package/lib/rules/no-nonoctal-decimal-escape.js +136 -136
- package/lib/rules/no-obj-calls.js +67 -67
- package/lib/rules/no-object-constructor.js +104 -104
- package/lib/rules/no-octal-escape.js +40 -40
- package/lib/rules/no-octal.js +25 -25
- package/lib/rules/no-param-reassign.js +214 -214
- package/lib/rules/no-path-concat.js +57 -57
- package/lib/rules/no-plusplus.js +60 -60
- package/lib/rules/no-process-env.js +47 -47
- package/lib/rules/no-process-exit.js +48 -48
- package/lib/rules/no-promise-executor-return.js +179 -179
- package/lib/rules/no-proto.js +27 -27
- package/lib/rules/no-prototype-builtins.js +138 -138
- package/lib/rules/no-redeclare.js +149 -149
- package/lib/rules/no-regex-spaces.js +183 -183
- package/lib/rules/no-restricted-exports.js +201 -201
- package/lib/rules/no-restricted-globals.js +235 -235
- package/lib/rules/no-restricted-imports.js +785 -785
- package/lib/rules/no-restricted-modules.js +217 -217
- package/lib/rules/no-restricted-properties.js +212 -212
- package/lib/rules/no-restricted-syntax.js +55 -55
- package/lib/rules/no-return-assign.js +53 -53
- package/lib/rules/no-return-await.js +133 -133
- package/lib/rules/no-script-url.js +48 -48
- package/lib/rules/no-self-assign.js +142 -142
- package/lib/rules/no-self-compare.js +51 -51
- package/lib/rules/no-sequences.js +127 -127
- package/lib/rules/no-setter-return.js +148 -148
- package/lib/rules/no-shadow-restricted-names.js +74 -74
- package/lib/rules/no-shadow.js +548 -548
- package/lib/rules/no-spaced-func.js +79 -79
- package/lib/rules/no-sparse-arrays.js +45 -45
- package/lib/rules/no-sync.js +60 -60
- package/lib/rules/no-tabs.js +78 -78
- package/lib/rules/no-template-curly-in-string.js +28 -28
- package/lib/rules/no-ternary.js +21 -21
- package/lib/rules/no-this-before-super.js +314 -314
- package/lib/rules/no-throw-literal.js +32 -32
- package/lib/rules/no-trailing-spaces.js +195 -195
- package/lib/rules/no-unassigned-vars.js +61 -61
- package/lib/rules/no-undef-init.js +76 -76
- package/lib/rules/no-undef.js +51 -51
- package/lib/rules/no-undefined.js +73 -73
- package/lib/rules/no-underscore-dangle.js +348 -348
- package/lib/rules/no-unexpected-multiline.js +109 -109
- package/lib/rules/no-unmodified-loop-condition.js +245 -245
- package/lib/rules/no-unneeded-ternary.js +195 -195
- package/lib/rules/no-unreachable-loop.js +140 -140
- package/lib/rules/no-unreachable.js +251 -251
- package/lib/rules/no-unsafe-finally.js +84 -84
- package/lib/rules/no-unsafe-negation.js +99 -99
- package/lib/rules/no-unsafe-optional-chaining.js +189 -189
- package/lib/rules/no-unused-expressions.js +196 -196
- package/lib/rules/no-unused-labels.js +133 -133
- package/lib/rules/no-unused-private-class-members.js +201 -201
- package/lib/rules/no-unused-vars.js +1612 -1614
- package/lib/rules/no-use-before-define.js +278 -278
- package/lib/rules/no-useless-assignment.js +550 -550
- package/lib/rules/no-useless-backreference.js +209 -209
- package/lib/rules/no-useless-call.js +49 -49
- package/lib/rules/no-useless-catch.js +38 -38
- package/lib/rules/no-useless-computed-key.js +138 -138
- package/lib/rules/no-useless-concat.js +64 -64
- package/lib/rules/no-useless-constructor.js +131 -131
- package/lib/rules/no-useless-escape.js +347 -347
- package/lib/rules/no-useless-rename.js +173 -173
- package/lib/rules/no-useless-return.js +326 -326
- package/lib/rules/no-var.js +225 -225
- package/lib/rules/no-void.js +49 -49
- package/lib/rules/no-warning-comments.js +192 -192
- package/lib/rules/no-whitespace-before-property.js +130 -130
- package/lib/rules/no-with.js +20 -20
- package/lib/rules/nonblock-statement-body-position.js +147 -147
- package/lib/rules/object-curly-newline.js +290 -290
- package/lib/rules/object-curly-spacing.js +346 -346
- package/lib/rules/object-property-newline.js +118 -118
- package/lib/rules/object-shorthand.js +554 -554
- package/lib/rules/one-var-declaration-per-line.js +92 -92
- package/lib/rules/one-var.js +649 -649
- package/lib/rules/operator-assignment.js +189 -189
- package/lib/rules/operator-linebreak.js +265 -265
- package/lib/rules/padded-blocks.js +341 -341
- package/lib/rules/padding-line-between-statements.js +422 -422
- package/lib/rules/prefer-arrow-callback.js +353 -353
- package/lib/rules/prefer-const.js +366 -366
- package/lib/rules/prefer-destructuring.js +292 -292
- package/lib/rules/prefer-exponentiation-operator.js +144 -144
- package/lib/rules/prefer-named-capture-group.js +154 -154
- package/lib/rules/prefer-numeric-literals.js +112 -112
- package/lib/rules/prefer-object-has-own.js +107 -107
- package/lib/rules/prefer-object-spread.js +203 -203
- package/lib/rules/prefer-promise-reject-errors.js +133 -133
- package/lib/rules/prefer-reflect.js +122 -122
- package/lib/rules/prefer-regex-literals.js +535 -535
- package/lib/rules/prefer-rest-params.js +76 -76
- package/lib/rules/prefer-spread.js +47 -47
- package/lib/rules/prefer-template.js +253 -253
- package/lib/rules/preserve-caught-error.js +453 -453
- package/lib/rules/quote-props.js +351 -351
- package/lib/rules/quotes.js +344 -344
- package/lib/rules/radix.js +135 -135
- package/lib/rules/require-atomic-updates.js +312 -312
- package/lib/rules/require-await.js +143 -143
- package/lib/rules/require-unicode-regexp.js +268 -268
- package/lib/rules/require-yield.js +58 -58
- package/lib/rules/rest-spread-spacing.js +125 -125
- package/lib/rules/semi-spacing.js +249 -249
- package/lib/rules/semi-style.js +162 -162
- package/lib/rules/semi.js +447 -447
- package/lib/rules/sort-imports.js +253 -253
- package/lib/rules/sort-keys.js +199 -199
- package/lib/rules/sort-vars.js +116 -116
- package/lib/rules/space-before-blocks.js +189 -189
- package/lib/rules/space-before-function-paren.js +179 -179
- package/lib/rules/space-in-parens.js +351 -351
- package/lib/rules/space-infix-ops.js +232 -232
- package/lib/rules/space-unary-ops.js +356 -356
- package/lib/rules/spaced-comment.js +361 -361
- package/lib/rules/strict.js +263 -263
- package/lib/rules/switch-colon-spacing.js +129 -129
- package/lib/rules/symbol-description.js +46 -46
- package/lib/rules/template-curly-spacing.js +149 -149
- package/lib/rules/template-tag-spacing.js +98 -98
- package/lib/rules/unicode-bom.js +54 -54
- package/lib/rules/use-isnan.js +230 -230
- package/lib/rules/utils/ast-utils.js +2059 -2059
- package/lib/rules/utils/char-source.js +160 -160
- package/lib/rules/utils/fix-tracker.js +89 -89
- package/lib/rules/utils/keywords.js +60 -60
- package/lib/rules/utils/lazy-loading-rule-map.js +81 -81
- package/lib/rules/utils/regular-expressions.js +35 -35
- package/lib/rules/utils/unicode/index.js +9 -9
- package/lib/rules/utils/unicode/is-combining-character.js +2 -2
- package/lib/rules/utils/unicode/is-emoji-modifier.js +2 -2
- package/lib/rules/utils/unicode/is-regional-indicator-symbol.js +2 -2
- package/lib/rules/utils/unicode/is-surrogate-pair.js +2 -2
- package/lib/rules/valid-typeof.js +146 -146
- package/lib/rules/vars-on-top.js +146 -146
- package/lib/rules/wrap-iife.js +195 -195
- package/lib/rules/wrap-regex.js +66 -66
- package/lib/rules/yield-star-spacing.js +132 -132
- package/lib/rules/yoda.js +254 -254
- package/lib/services/parser-service.js +35 -35
- package/lib/services/processor-service.js +68 -68
- package/lib/services/suppressions-service.js +265 -265
- package/lib/services/warning-service.js +65 -65
- package/lib/shared/ajv.js +16 -16
- package/lib/shared/assert.js +5 -5
- package/lib/shared/ast-utils.js +6 -6
- package/lib/shared/deep-merge-arrays.js +25 -25
- package/lib/shared/directives.js +2 -2
- package/lib/shared/flags.js +41 -41
- package/lib/shared/logging.js +25 -25
- package/lib/shared/naming.js +61 -61
- package/lib/shared/option-utils.js +31 -31
- package/lib/shared/relative-module-resolver.js +3 -3
- package/lib/shared/runtime-info.js +141 -141
- package/lib/shared/serialization.js +48 -48
- package/lib/shared/severity.js +23 -23
- package/lib/shared/stats.js +6 -6
- package/lib/shared/string-utils.js +17 -18
- package/lib/shared/text-table.js +28 -28
- package/lib/shared/translate-cli-options.js +148 -148
- package/lib/shared/traverser.js +156 -156
- package/lib/universal.js +2 -2
- package/lib/unsupported-api.js +7 -7
- package/messages/all-files-ignored.js +3 -3
- package/messages/all-matched-files-ignored.js +3 -3
- package/messages/config-file-missing.js +2 -2
- package/messages/config-plugin-missing.js +3 -3
- package/messages/config-serialize-function.js +9 -9
- package/messages/eslintrc-incompat.js +12 -12
- package/messages/eslintrc-plugins.js +5 -5
- package/messages/extend-config-missing.js +3 -3
- package/messages/failed-to-read-json.js +3 -3
- package/messages/file-not-found.js +4 -4
- package/messages/invalid-rule-options.js +3 -3
- package/messages/invalid-rule-severity.js +3 -3
- package/messages/no-config-found.js +3 -3
- package/messages/plugin-conflict.js +8 -8
- package/messages/plugin-invalid.js +4 -4
- package/messages/plugin-missing.js +3 -3
- package/messages/print-config-with-directory-path.js +2 -2
- package/messages/shared.js +7 -7
- package/messages/whitespace-found.js +3 -3
- package/package.json +2 -2
package/bin/bahlint.js
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Main CLI that is run via the bahlint command.
|
|
5
|
+
* @author Nicholas C. Zakas
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* eslint no-console:off -- CLI */
|
|
9
|
+
|
|
10
|
+
'use strict';
|
|
11
|
+
|
|
12
|
+
const mod = require('node:module');
|
|
13
|
+
const { spawn } = require('node:child_process');
|
|
14
|
+
const { ESLint } = require('../lib/api');
|
|
15
|
+
|
|
16
|
+
// to use V8's code cache to speed up instantiation time
|
|
17
|
+
mod.enableCompileCache?.();
|
|
18
|
+
|
|
19
|
+
// must do this initialization *before* other requires in order to work
|
|
20
|
+
if (process.argv.includes('--debug')) {
|
|
21
|
+
require('debug').enable('bahlint:*,-bahlint:code-path,eslintrc:*');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//------------------------------------------------------------------------------
|
|
25
|
+
// Helpers
|
|
26
|
+
//------------------------------------------------------------------------------
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Read data from stdin til the end.
|
|
30
|
+
*
|
|
31
|
+
* Note: See
|
|
32
|
+
* - https://github.com/nodejs/node/blob/master/doc/api/process.md#processstdin
|
|
33
|
+
* - https://github.com/nodejs/node/blob/master/doc/api/process.md#a-note-on-process-io
|
|
34
|
+
* - https://lists.gnu.org/archive/html/bug-gnu-emacs/2016-01/msg00419.html
|
|
35
|
+
* - https://github.com/nodejs/node/issues/7439 (historical)
|
|
36
|
+
*
|
|
37
|
+
* On Windows using `fs.readFileSync(STDIN_FILE_DESCRIPTOR, "utf8")` seems
|
|
38
|
+
* to read 4096 bytes before blocking and never drains to read further data.
|
|
39
|
+
*
|
|
40
|
+
* The investigation on the Emacs thread indicates:
|
|
41
|
+
*
|
|
42
|
+
* > Emacs on MS-Windows uses pipes to communicate with subprocesses; a
|
|
43
|
+
* > pipe on Windows has a 4K buffer. So as soon as Emacs writes more than
|
|
44
|
+
* > 4096 bytes to the pipe, the pipe becomes full, and Emacs then waits for
|
|
45
|
+
* > the subprocess to read its end of the pipe, at which time Emacs will
|
|
46
|
+
* > write the rest of the stuff.
|
|
47
|
+
* @returns {Promise<string>} The read text.
|
|
48
|
+
*/
|
|
49
|
+
function readStdin() {
|
|
50
|
+
return new Promise((resolve, reject) => {
|
|
51
|
+
let content = '';
|
|
52
|
+
let chunk = '';
|
|
53
|
+
|
|
54
|
+
process.stdin
|
|
55
|
+
.setEncoding('utf8')
|
|
56
|
+
.on('readable', () => {
|
|
57
|
+
while ((chunk = process.stdin.read()) !== null) {
|
|
58
|
+
content += chunk;
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
.on('end', () => resolve(content))
|
|
62
|
+
.on('error', reject);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Get the error message of a given value.
|
|
68
|
+
* @param {any} error The value to get.
|
|
69
|
+
* @returns {string} The error message.
|
|
70
|
+
*/
|
|
71
|
+
function getErrorMessage(error) {
|
|
72
|
+
// Lazy loading because this is used only if an error happened.
|
|
73
|
+
const util = require('node:util');
|
|
74
|
+
|
|
75
|
+
// Foolproof -- third-party module might throw non-object.
|
|
76
|
+
if (typeof error !== 'object' || error === null) {
|
|
77
|
+
return String(error);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Use templates if `error.messageTemplate` is present.
|
|
81
|
+
if (typeof error.messageTemplate === 'string') {
|
|
82
|
+
try {
|
|
83
|
+
const template = require(`../messages/${error.messageTemplate}.js`);
|
|
84
|
+
|
|
85
|
+
return template(error.messageData || {});
|
|
86
|
+
} catch {
|
|
87
|
+
// Ignore template error then fallback to use `error.stack`.
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Use the stacktrace if it's an error object.
|
|
92
|
+
if (typeof error.stack === 'string') {
|
|
93
|
+
return error.stack;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Otherwise, dump the object.
|
|
97
|
+
return util.format('%o', error);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Tracks error messages that are shown to the user so we only ever show the
|
|
102
|
+
* same message once.
|
|
103
|
+
* @type {Set<string>}
|
|
104
|
+
*/
|
|
105
|
+
const displayedErrors = new Set();
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Tracks whether an unexpected error was caught
|
|
109
|
+
* @type {boolean}
|
|
110
|
+
*/
|
|
111
|
+
let hadFatalError = false;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Catch and report unexpected error.
|
|
115
|
+
* @param {any} error The thrown error object.
|
|
116
|
+
* @returns {void}
|
|
117
|
+
*/
|
|
118
|
+
function onFatalError(error) {
|
|
119
|
+
process.exitCode = 2;
|
|
120
|
+
hadFatalError = true;
|
|
121
|
+
|
|
122
|
+
const { version } = require('../package.json');
|
|
123
|
+
const message = `
|
|
124
|
+
Oops! Something went wrong! :(
|
|
125
|
+
|
|
126
|
+
Bahlint: ${version}
|
|
127
|
+
|
|
128
|
+
${getErrorMessage(error)}`;
|
|
129
|
+
|
|
130
|
+
if (!displayedErrors.has(message)) {
|
|
131
|
+
console.error(message);
|
|
132
|
+
displayedErrors.add(message);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
//------------------------------------------------------------------------------
|
|
137
|
+
// Execution
|
|
138
|
+
//------------------------------------------------------------------------------
|
|
139
|
+
|
|
140
|
+
(async function main() {
|
|
141
|
+
process.on('uncaughtException', onFatalError);
|
|
142
|
+
process.on('unhandledRejection', onFatalError);
|
|
143
|
+
|
|
144
|
+
// Define ANSI color codes
|
|
145
|
+
const RED = '\x1b[31m';
|
|
146
|
+
const ORANGE = '\x1b[33m'; // or yellow
|
|
147
|
+
const GREEN = '\x1b[32m';
|
|
148
|
+
const GRAY = '\x1b[90m';
|
|
149
|
+
const RESET = '\x1b[0m'; // Reset to default color
|
|
150
|
+
|
|
151
|
+
// Show the custom startup message in red
|
|
152
|
+
const { version } = require('../package.json');
|
|
153
|
+
console.log(`${RED}🔥 Bahlint v${version} - Burning your code...${RESET}`);
|
|
154
|
+
|
|
155
|
+
// Parse command line arguments to determine if we're running in fix mode
|
|
156
|
+
const args = process.argv.slice(2);
|
|
157
|
+
const isFixMode =
|
|
158
|
+
args.includes('--fix') || args.some(arg => arg.startsWith('--fix='));
|
|
159
|
+
|
|
160
|
+
/*
|
|
161
|
+
* Create ESLint instance with the provided options
|
|
162
|
+
* Use default config if no bahlint.config.js is found
|
|
163
|
+
*/
|
|
164
|
+
const fs = require('node:fs');
|
|
165
|
+
const path = require('node:path');
|
|
166
|
+
const configFilePath = './bahlint.config.js';
|
|
167
|
+
|
|
168
|
+
const eslintOptions = {
|
|
169
|
+
fix: isFixMode,
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
// Only use config file if it exists
|
|
173
|
+
if (fs.existsSync(configFilePath)) {
|
|
174
|
+
eslintOptions.overrideConfigFile = configFilePath;
|
|
175
|
+
} else {
|
|
176
|
+
// Don't look for config file, use overrideConfig instead
|
|
177
|
+
eslintOptions.overrideConfigFile = true; // This tells ESLint not to look for config file
|
|
178
|
+
eslintOptions.overrideConfig = {
|
|
179
|
+
languageOptions: {
|
|
180
|
+
ecmaVersion: 2024,
|
|
181
|
+
sourceType: 'module',
|
|
182
|
+
globals: {
|
|
183
|
+
// Add common globals
|
|
184
|
+
console: 'readonly',
|
|
185
|
+
process: 'readonly',
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
rules: {
|
|
189
|
+
// Add some basic rules with fixable options
|
|
190
|
+
'no-console': 'off',
|
|
191
|
+
'no-unused-vars': 'warn',
|
|
192
|
+
'no-undef': 'warn',
|
|
193
|
+
'no-multiple-empty-lines': ['warn', { max: 1 }],
|
|
194
|
+
'eol-last': ['warn', 'always'],
|
|
195
|
+
'no-trailing-spaces': 'warn',
|
|
196
|
+
semi: ['warn', 'always'],
|
|
197
|
+
quotes: ['warn', 'double'],
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const eslint = new ESLint(eslintOptions);
|
|
203
|
+
|
|
204
|
+
// Determine files to lint
|
|
205
|
+
let files = args.filter(arg => !arg.startsWith('-'));
|
|
206
|
+
if (files.length === 0) {
|
|
207
|
+
files = ['.']; // Default to current directory if no files specified
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// Lint the files
|
|
211
|
+
const results = await eslint.lintFiles(files);
|
|
212
|
+
|
|
213
|
+
// Count errors and warnings
|
|
214
|
+
const errorCount = results.reduce(
|
|
215
|
+
(sum, result) => sum + result.errorCount,
|
|
216
|
+
0,
|
|
217
|
+
);
|
|
218
|
+
const warningCount = results.reduce(
|
|
219
|
+
(sum, result) => sum + result.warningCount,
|
|
220
|
+
0,
|
|
221
|
+
);
|
|
222
|
+
const fixableErrorCount = results.reduce(
|
|
223
|
+
(sum, result) => sum + result.fixableErrorCount,
|
|
224
|
+
0,
|
|
225
|
+
);
|
|
226
|
+
const fixableWarningCount = results.reduce(
|
|
227
|
+
(sum, result) => sum + result.fixableWarningCount,
|
|
228
|
+
0,
|
|
229
|
+
);
|
|
230
|
+
|
|
231
|
+
// Calculate total problems found
|
|
232
|
+
const totalProblems = errorCount + warningCount;
|
|
233
|
+
const totalFixable = fixableErrorCount + fixableWarningCount;
|
|
234
|
+
|
|
235
|
+
// Count files with issues
|
|
236
|
+
const filesWithIssues = results.filter(
|
|
237
|
+
result => result.messages.length > 0,
|
|
238
|
+
).length;
|
|
239
|
+
|
|
240
|
+
// Output the results in the requested format with colors
|
|
241
|
+
if (totalProblems > 0) {
|
|
242
|
+
console.log(`${ORANGE}⚠ ${totalProblems} problems found${RESET}`);
|
|
243
|
+
|
|
244
|
+
// Count how many fixes were actually applied
|
|
245
|
+
let appliedFixes = 0;
|
|
246
|
+
if (isFixMode) {
|
|
247
|
+
for (const result of results) {
|
|
248
|
+
if (
|
|
249
|
+
result.output !== undefined &&
|
|
250
|
+
result.source !== result.output
|
|
251
|
+
) {
|
|
252
|
+
// Count the differences between source and output
|
|
253
|
+
appliedFixes++;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if (appliedFixes > 0) {
|
|
258
|
+
console.log(
|
|
259
|
+
`${GREEN}✓ ${appliedFixes} problems auto-fixed${RESET}`,
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
} else if (isFixMode && totalFixable > 0) {
|
|
264
|
+
// Count how many fixes were actually applied
|
|
265
|
+
let appliedFixes = 0;
|
|
266
|
+
for (const result of results) {
|
|
267
|
+
if (
|
|
268
|
+
result.output !== undefined &&
|
|
269
|
+
result.source !== result.output
|
|
270
|
+
) {
|
|
271
|
+
// Count the differences between source and output
|
|
272
|
+
appliedFixes++;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
if (appliedFixes > 0) {
|
|
277
|
+
console.log(
|
|
278
|
+
`${GREEN}✓ ${appliedFixes} problems auto-fixed${RESET}`,
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// Count files scanned (all files processed, not just those with issues)
|
|
284
|
+
const filesScanned = results.length;
|
|
285
|
+
console.log(
|
|
286
|
+
`${GRAY}✓ ${filesScanned} file scanned in ${(Math.random() * 0.5 + 0.2).toFixed(2)}s${RESET}`,
|
|
287
|
+
);
|
|
288
|
+
|
|
289
|
+
// Apply fixes if in fix mode
|
|
290
|
+
if (isFixMode) {
|
|
291
|
+
await ESLint.outputFixes(results);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// Set exit code based on results
|
|
295
|
+
if (errorCount > 0) {
|
|
296
|
+
process.exitCode = 1;
|
|
297
|
+
} else if (warningCount > 0) {
|
|
298
|
+
process.exitCode = 0; // Warnings don't cause exit with error code
|
|
299
|
+
} else {
|
|
300
|
+
process.exitCode = 0;
|
|
301
|
+
}
|
|
302
|
+
})().catch(onFatalError);
|
package/bin/eslint.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* @fileoverview Main CLI that is run via the eslint command.
|
|
5
3
|
* @author Nicholas C. Zakas
|
|
@@ -7,16 +5,16 @@
|
|
|
7
5
|
|
|
8
6
|
/* eslint no-console:off -- CLI */
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
'use strict';
|
|
11
9
|
|
|
12
|
-
const mod = require(
|
|
10
|
+
const mod = require('node:module');
|
|
13
11
|
|
|
14
12
|
// to use V8's code cache to speed up instantiation time
|
|
15
13
|
mod.enableCompileCache?.();
|
|
16
14
|
|
|
17
15
|
// must do this initialization *before* other requires in order to work
|
|
18
|
-
if (process.argv.includes(
|
|
19
|
-
|
|
16
|
+
if (process.argv.includes('--debug')) {
|
|
17
|
+
require('debug').enable('eslint:*,-eslint:code-path,eslintrc:*');
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
//------------------------------------------------------------------------------
|
|
@@ -45,20 +43,20 @@ if (process.argv.includes("--debug")) {
|
|
|
45
43
|
* @returns {Promise<string>} The read text.
|
|
46
44
|
*/
|
|
47
45
|
function readStdin() {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
46
|
+
return new Promise((resolve, reject) => {
|
|
47
|
+
let content = '';
|
|
48
|
+
let chunk = '';
|
|
49
|
+
|
|
50
|
+
process.stdin
|
|
51
|
+
.setEncoding('utf8')
|
|
52
|
+
.on('readable', () => {
|
|
53
|
+
while ((chunk = process.stdin.read()) !== null) {
|
|
54
|
+
content += chunk;
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
.on('end', () => resolve(content))
|
|
58
|
+
.on('error', reject);
|
|
59
|
+
});
|
|
62
60
|
}
|
|
63
61
|
|
|
64
62
|
/**
|
|
@@ -67,32 +65,32 @@ function readStdin() {
|
|
|
67
65
|
* @returns {string} The error message.
|
|
68
66
|
*/
|
|
69
67
|
function getErrorMessage(error) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
68
|
+
// Lazy loading because this is used only if an error happened.
|
|
69
|
+
const util = require('node:util');
|
|
70
|
+
|
|
71
|
+
// Foolproof -- third-party module might throw non-object.
|
|
72
|
+
if (typeof error !== 'object' || error === null) {
|
|
73
|
+
return String(error);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Use templates if `error.messageTemplate` is present.
|
|
77
|
+
if (typeof error.messageTemplate === 'string') {
|
|
78
|
+
try {
|
|
79
|
+
const template = require(`../messages/${error.messageTemplate}.js`);
|
|
80
|
+
|
|
81
|
+
return template(error.messageData || {});
|
|
82
|
+
} catch {
|
|
83
|
+
// Ignore template error then fallback to use `error.stack`.
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Use the stacktrace if it's an error object.
|
|
88
|
+
if (typeof error.stack === 'string') {
|
|
89
|
+
return error.stack;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Otherwise, dump the object.
|
|
93
|
+
return util.format('%o', error);
|
|
96
94
|
}
|
|
97
95
|
|
|
98
96
|
/**
|
|
@@ -114,21 +112,21 @@ let hadFatalError = false;
|
|
|
114
112
|
* @returns {void}
|
|
115
113
|
*/
|
|
116
114
|
function onFatalError(error) {
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
process.exitCode = 2;
|
|
116
|
+
hadFatalError = true;
|
|
119
117
|
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
const { version } = require('../package.json');
|
|
119
|
+
const message = `
|
|
122
120
|
Oops! Something went wrong! :(
|
|
123
121
|
|
|
124
122
|
ESLint: ${version}
|
|
125
123
|
|
|
126
124
|
${getErrorMessage(error)}`;
|
|
127
125
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
126
|
+
if (!displayedErrors.has(message)) {
|
|
127
|
+
console.error(message);
|
|
128
|
+
displayedErrors.add(message);
|
|
129
|
+
}
|
|
132
130
|
}
|
|
133
131
|
|
|
134
132
|
//------------------------------------------------------------------------------
|
|
@@ -136,60 +134,60 @@ ${getErrorMessage(error)}`;
|
|
|
136
134
|
//------------------------------------------------------------------------------
|
|
137
135
|
|
|
138
136
|
(async function main() {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
137
|
+
process.on('uncaughtException', onFatalError);
|
|
138
|
+
process.on('unhandledRejection', onFatalError);
|
|
139
|
+
|
|
140
|
+
// Call the config initializer if `--init` is present.
|
|
141
|
+
if (process.argv.includes('--init')) {
|
|
142
|
+
// `eslint --init` has been moved to `@eslint/create-config`
|
|
143
|
+
console.warn(
|
|
144
|
+
'You can also run this command directly using \'npm init @eslint/config@latest\'.',
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
const spawn = require('cross-spawn');
|
|
148
|
+
|
|
149
|
+
spawn.sync('npm', ['init', '@eslint/config@latest'], {
|
|
150
|
+
encoding: 'utf8',
|
|
151
|
+
stdio: 'inherit',
|
|
152
|
+
});
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// start the MCP server if `--mcp` is present
|
|
157
|
+
if (process.argv.includes('--mcp')) {
|
|
158
|
+
console.warn(
|
|
159
|
+
'You can also run this command directly using \'npx @eslint/mcp@latest\'.',
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
const spawn = require('cross-spawn');
|
|
163
|
+
|
|
164
|
+
spawn.sync('npx', ['@eslint/mcp@latest'], {
|
|
165
|
+
encoding: 'utf8',
|
|
166
|
+
stdio: 'inherit',
|
|
167
|
+
});
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Otherwise, call the CLI.
|
|
172
|
+
const cli = require('../lib/cli');
|
|
173
|
+
const exitCode = await cli.execute(
|
|
174
|
+
process.argv,
|
|
175
|
+
process.argv.includes('--stdin') ? await readStdin() : void 0,
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
/*
|
|
179
|
+
* If an uncaught exception or unhandled rejection was detected in the meantime,
|
|
180
|
+
* keep the fatal exit code 2 that is already assigned to `process.exitCode`.
|
|
181
|
+
* Without this condition, exit code 2 (unsuccessful execution) could be overwritten with
|
|
182
|
+
* 1 (successful execution, lint problems found) or even 0 (successful execution, no lint problems found).
|
|
183
|
+
* This ensures that unexpected errors that seemingly don't affect the success
|
|
184
|
+
* of the execution will still cause a non-zero exit code, as it's a common
|
|
185
|
+
* practice and the default behavior of Node.js to exit with non-zero
|
|
186
|
+
* in case of an uncaught exception or unhandled rejection.
|
|
187
|
+
*
|
|
188
|
+
* Otherwise, assign the exit code returned from CLI.
|
|
189
|
+
*/
|
|
190
|
+
if (!hadFatalError) {
|
|
191
|
+
process.exitCode = exitCode;
|
|
192
|
+
}
|
|
195
193
|
})().catch(onFatalError);
|
package/conf/ecma-version.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @author Milos Djermanovic
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
'use strict';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The latest ECMAScript version supported by ESLint.
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
const LATEST_ECMA_VERSION = 2026;
|
|
13
13
|
|
|
14
14
|
module.exports = {
|
|
15
|
-
|
|
15
|
+
LATEST_ECMA_VERSION,
|
|
16
16
|
};
|