Find and fix problems in your JavaScript code.
401 matches across 9 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | eslint.config.js | 65 | function createInternalFilesPatterns(pattern = null) { |
| LOW | Makefile.js | 160 | function generateFormatterExamples() { |
| LOW | Makefile.js | 458 | function splitCommandResultToLines(result) { |
| LOW | Makefile.js | 512 | function getFirstVersionOfDeletion(filePath) { |
| LOW | Makefile.js | 998 | function checkHyperfineInstallation() { |
| LOW | Makefile.js | 1036 | function downloadMultifilesTestTarget() { |
| LOW | Makefile.js | 1053 | function createConfigForPerformanceTest() { |
| LOW | tools/code-sample-minimizer.js | 70 | function generateNewIdentifierName() { |
| LOW | tools/update-rule-type-headers.js | 40 | function escapeForMultilineComment(line) { |
| LOW | tools/config-rule.js | 275 | function generateConfigsFromSchema(schema) { |
| LOW | tools/internal-rules/no-invalid-meta.js | 39 | function getMetaPropertyFromExportsNode(exportsNode) { |
| LOW | tests/bench/large.js | 13177 | function comprehensiveArrayExpression() { |
| LOW | tests/bench/large.js | 14096 | function destructuringExpressionMatch(tokens, value) { |
| LOW | tests/bench/large.js | 15502 | function destructuringAssignOrJsonValue() { |
| LOW | tests/bench/large.js | 17087 | function isNonAsciiIdentifierStart(code) { |
| LOW | tests/bin/eslint.js | 194 | function runESLintWithCrossSpawnHook( |
| LOW | tests/lib/linter/file-report.js | 1552 | function assertAdditionalFixNoMatch() { |
| LOW | tests/lib/linter/file-report.js | 1564 | function assertSuggestionFixMatches() { |
| LOW | tests/lib/linter/file-report.js | 1585 | function assertSuggestionFixNoMatch() { |
| LOW | tests/lib/shared/runtime-info.js | 31 | function setupSpawnSyncStubReturnVals(stub, returnVals) { |
| LOW | tests/lib/rules/no-magic-numbers.js | 488 | code: "function getNegativeSecondsInMinute() {return -60;}", |
| LOW | tests/lib/rules/no-unused-expressions.js | 647 | function namedFunctionInExpressionContext() { |
| LOW | tests/lib/eslint/eslint.js | 15395 | async function testFromOptionsModuleWithFlag(url) { |
| LOW | tests/performance/jshint.js | 4632 | function comprehensiveArrayExpression() { |
| LOW | tests/performance/jshint.js | 5480 | function destructuringExpressionMatch( |
| LOW | tests/performance/jshint.js | 7011 | function destructuringAssignOrJsonValue() { |
| LOW | docs/tools/prism-eslint-hook.js | 58 | function installPrismESLintMarkerHook() { |
| LOW | docs/tools/code-block-utils.js | 14 | function docsExampleCodeToParsableCode(code) { |
| LOW | …ation-tutorial-code/example-eslint-integration.test.js | 8 | async function testExampleEslintIntegration() { |
| LOW | docs/src/rules/no-self-compare.md | 52 | function incrementUnlessReachedMaximum() { |
| LOW | docs/src/rules/no-unused-expressions.md | 64 | a() && function namedFunctionInExpressionContext () {f();} |
| LOW | docs/src/rules/no-await-in-loop.md | 177 | async function loopIterationsDependOnEachOther() { |
| LOW | docs/src/rules/no-await-in-loop.md | 210 | async function makeUpdatesToRateLimitedApi(thingsToUpdate) { |
| LOW | docs/src/assets/js/focus-visible.js | 8 | function applyFocusVisiblePolyfill(scope) { |
| LOW | docs/src/assets/js/focus-visible.js | 55 | function focusTriggersKeyboardModality(el) { |
| LOW | docs/src/assets/js/focus-visible.js | 201 | function addInitialPointerMoveListeners() { |
| LOW | docs/src/assets/js/focus-visible.js | 213 | function removeInitialPointerMoveListeners() { |
| LOW | lib/rule-tester/rule-tester.js | 166 | function cloneDeeplyExcludesParent(x) { |
| LOW | lib/rule-tester/rule-tester.js | 264 | function defineStartEndAsErrorInTree(ast, visitorKeys) { |
| LOW | lib/rule-tester/rule-tester.js | 309 | function throwForbiddenMethodError(methodName, prototype) { |
| LOW | lib/rule-tester/rule-tester.js | 348 | function getUnsubstitutedMessagePlaceholders(message, raw, data = {}) { |
| LOW | lib/rule-tester/rule-tester.js | 568 | function assertTestCommonProperties(item) { |
| LOW | lib/rule-tester/rule-tester.js | 686 | function buildLazyTestLocationEstimator(invoker) { |
| LOW | lib/config/flat-config-schema.js | 545 | function createEslintrcErrorSchema(key) { |
| LOW | lib/config/flat-config-array.js | 33 | function wrapConfigErrorWithDetails(error, originalLength, baseLength) { |
| LOW | lib/config/config-loader.js | 76 | function assertConfigurationExists(configFilePath, loaderOptions) { |
| LOW | lib/config/config-loader.js | 126 | function isNativeTypeScriptSupportEnabled() { |
| LOW | lib/config/config-loader.js | 141 | async function loadTypeScriptConfigFileWithJiti(filePath, fileURL, mtime) { |
| LOW | lib/config/config.js | 410 | function getOrCreateValidator(rule, ruleId) { |
| LOW | lib/linter/file-report.js | 67 | function updateLocationInformation( |
| LOW | lib/linter/file-report.js | 135 | function normalizeMultiArgReportCall(...args) { |
| LOW | lib/linter/file-report.js | 440 | function computeMessageFromDescriptor(descriptor, messages) { |
| LOW | lib/linter/source-code-fixer.js | 26 | function compareMessagesByFixRange(a, b) { |
| LOW | lib/linter/source-code-fixer.js | 37 | function compareMessagesByLocation(a, b) { |
| LOW | lib/linter/apply-disable-directives.js | 65 | function createIndividualDirectivesRemoval( |
| LOW | lib/linter/apply-disable-directives.js | 221 | function collectUsedEnableDirectives(directives) { |
| LOW | lib/linter/linter.js | 159 | function addProblemIfSameSeverityAndOptions( |
| LOW | lib/linter/linter.js | 294 | function getDirectiveCommentsForFlatConfig( |
| LOW | lib/linter/code-path-analysis/code-path-state.js | 826 | function finalizeTestSegmentsOfFor(context, choiceContext, head) { |
| LOW | lib/linter/code-path-analysis/code-path-analyzer.js | 38 | function isPropertyDefinitionValue(node) { |
| 225 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tools/commit-readme.sh | 3 | #------------------------------------------------------------------------------ |
| MEDIUM | tools/commit-readme.sh | 5 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 2 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 6 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 8 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 10 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 19 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 21 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 26 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 28 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 34 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 36 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 48 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 50 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 69 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 71 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 106 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 108 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 118 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/zh-hans.yml | 120 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 2 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 6 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 8 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 10 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 19 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 21 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 26 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 28 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 35 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 37 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 50 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 52 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 71 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 73 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 108 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 110 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 120 | #------------------------------------------------------------------------------ |
| MEDIUM | docs/src/_data/sites/en.yml | 122 | #------------------------------------------------------------------------------ |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/lib/rules/no-shadow.js | 30 | "(function() { var doSomething = function doSomething() {}; doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 31 | "(function() { var doSomething = foo || function doSomething() {}; doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 32 | "(function() { var doSomething = function doSomething() {} || foo; doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 33 | "(function() { var doSomething = foo && function doSomething() {}; doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 35 | code: "(function() { var doSomething = foo ?? function doSomething() {}; doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 38 | "(function() { var doSomething = foo || (bar || function doSomething() {}); doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 39 | "(function() { var doSomething = foo || (bar && function doSomething() {}); doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 40 | "(function() { var doSomething = foo ? function doSomething() {} : bar; doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 41 | "(function() { var doSomething = foo ? bar: function doSomething() {}; doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 42 | "(function() { var doSomething = foo ? bar: (baz || function doSomething() {}); doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 43 | "(function() { var doSomething = (foo ? bar: function doSomething() {}) || baz; doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 45 | code: "(function() { var { doSomething = function doSomething() {} } = obj; doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 49 | code: "(function() { var { doSomething = function doSomething() {} || foo } = obj; doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 53 | code: "(function() { var { doSomething = foo ? function doSomething() {} : bar } = obj; doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 57 | code: "(function() { var { doSomething = foo ? bar : function doSomething() {} } = obj; doSomething() }())", |
| LOW | tests/lib/rules/no-shadow.js | 61 | code: "(function() { var { doSomething = foo || (bar ? baz : (qux || function doSomething() {})) || quux } = obj; doS |
| LOW | tests/lib/rules/no-shadow.js | 65 | code: "function foo(doSomething = function doSomething() {}) { doSomething(); }", |
| LOW | tests/lib/rules/no-shadow.js | 69 | code: "function foo(doSomething = function doSomething() {} || foo) { doSomething(); }", |
| LOW | tests/lib/rules/no-shadow.js | 73 | code: "function foo(doSomething = foo ? function doSomething() {} : bar) { doSomething(); }", |
| LOW | tests/lib/rules/no-shadow.js | 77 | code: "function foo(doSomething = foo ? bar : function doSomething() {}) { doSomething(); }", |
| LOW | tests/lib/rules/no-shadow.js | 81 | code: "function foo(doSomething = foo || (bar ? baz : (qux || function doSomething() {})) || quux) { doSomething(); } |
| LOW | tests/lib/rules/no-unused-vars.js | 141 | "(function() { var doSomething = function doSomething() {}; doSomething() }())", |
| LOW | tests/lib/rules/no-inner-declarations.js | 28 | "function doSomething() { }", |
| LOW | tests/lib/rules/no-inner-declarations.js | 29 | "function doSomething() { function somethingElse() { } }", |
| LOW | tests/lib/rules/no-inner-declarations.js | 30 | "(function() { function doSomething() { } }());", |
| LOW | tests/lib/rules/no-inner-declarations.js | 71 | "function doSomething() { while (test) { var foo; } }", |
| LOW | tests/lib/rules/no-inner-declarations.js | 74 | { code: "function doSomething() { var foo; }", options: ["both"] }, |
| LOW | tests/lib/rules/no-inner-declarations.js | 139 | code: "'use strict' \n if (test) { function doSomething() { } }", |
| LOW | tests/lib/rules/no-inner-declarations.js | 144 | code: "'use strict' \n if (test) { function doSomething() { } }", |
| LOW | tests/lib/rules/no-inner-declarations.js | 149 | code: "function foo() {'use strict' \n if (test) { function doSomething() { } } }", |
| LOW | tests/lib/rules/no-inner-declarations.js | 173 | code: "if (test) { function doSomething() { } }", |
| LOW | tests/lib/rules/no-inner-declarations.js | 316 | code: "function doSomething() { do { function somethingElse() { } } while (test); }", |
| LOW | tests/lib/rules/no-inner-declarations.js | 328 | code: "(function() { if (test) { function doSomething() { } } }());", |
| LOW | tests/lib/rules/no-inner-declarations.js | 353 | code: "function doSomething() { if (test) { var foo = 42; } }", |
| LOW | tests/lib/rules/no-inner-declarations.js | 449 | code: "if (test) { function doSomething() { } }", |
| LOW | tests/lib/rules/no-inner-declarations.js | 463 | code: "if (test) { function doSomething() { } }", |
| LOW | tests/lib/rules/no-inner-declarations.js | 477 | code: "'use strict' \n if (test) { function doSomething() { } }", |
| LOW | tests/lib/rules/no-inner-declarations.js | 491 | code: "'use strict' \n if (test) { function doSomething() { } }", |
| LOW | tests/lib/rules/no-inner-declarations.js | 505 | code: "'use strict' \n if (test) { function doSomething() { } }", |
| LOW | tests/lib/rules/no-inner-declarations.js | 547 | code: "function doSomething() { 'use strict' \n do { function somethingElse() { } } while (test); }", |
| LOW | tests/lib/rules/camelcase.js | 32 | "function doSomething(){}", |
| LOW | tests/lib/rules/no-return-assign.js | 159 | code: `function doSomething() { |
| LOW | tests/lib/rules/no-return-assign.js | 169 | code: `function doSomething() { |
| LOW | tests/lib/rules/no-return-assign.js | 181 | code: `function doSomething() { |
| LOW | tests/lib/rules/no-return-assign.js | 192 | code: `function doSomething() { |
| LOW | lib/linter/timing.js | 166 | function getData() { |
| Severity | File | Line | Snippet |
|---|---|---|---|
| CRITICAL | tests/bench/large.js | 11519 | state.tokens.curr.left.first.forEach( |
| CRITICAL | tests/performance/jshint.js | 2968 | state.tokens.curr.left.first.forEach( |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/lib/rules/preserve-caught-error.js | 544 | throw new AggregateError([], "Lorem ipsum"); |
| LOW | tests/lib/rules/preserve-caught-error.js | 556 | throw new AggregateError([], "Lorem ipsum", { cause: err }); |
| LOW | tests/lib/rules/prefer-arrow-callback.js | 257 | ) /* Lorem ipsum |
| LOW | tests/lib/rules/prefer-arrow-callback.js | 258 | dolor sit amet. */ { |
| LOW | tests/lib/rules/prefer-arrow-callback.js | 267 | ) => /* Lorem ipsum |
| LOW | tests/lib/rules/prefer-arrow-callback.js | 268 | dolor sit amet. */ { |
| LOW | tests/lib/rules/prefer-arrow-callback.js | 495 | ) /* Lorem ipsum |
| LOW | tests/lib/rules/prefer-arrow-callback.js | 496 | dolor sit amet. */ { |
| LOW | tests/lib/rules/prefer-arrow-callback.js | 505 | ) => /* Lorem ipsum |
| LOW | tests/lib/rules/prefer-arrow-callback.js | 506 | dolor sit amet. */ { |
| LOW | tests/lib/services/warning-service.js | 78 | const message = `Lorem ipsum ${flag}.`; |
| LOW | tests/lib/services/warning-service.js | 127 | const message = `Lorem ipsum ${flag}.`; |
| LOW | docs/src/rules/no-alert.md | 31 | prompt("What's your name?", "John Doe"); |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/lib/rules/multiline-comment-style.js | 56 | // Step 1: Do the first thing |
| LOW | lib/config/config.js | 77 | // if the plugin exists then we need to check if the rule exists |
| LOW | lib/languages/js/source-code/source-code.js | 882 | // Step 1: Parse the directive |
| LOW | lib/languages/js/source-code/source-code.js | 889 | // Step 2: Extract the directive value |
| LOW | lib/languages/js/source-code/source-code.js | 897 | // Step 3: Validate the directive does not span multiple lines |
| LOW | lib/languages/js/source-code/source-code.js | 912 | // Step 4: Extract the directive value and create the Directive object |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/bench/large.js | 6221 | 65468, 65469, 65470, 65474, 65475, 65476, 65477, 65478, |
| LOW | tests/bench/large.js | 6241 | // sell copies of the Software, and to permit persons to whom the Software is |
| LOW | tests/bench/large.js | 6721 | keys.push(key); |
| LOW | tests/bench/large.js | 7181 | // |
| LOW | tests/performance/jshint.js | 2301 | // This is the heart of JSHINT, the Pratt parser. In addition to parsing, it |
| LOW | docs/src/extend/custom-rules.md | 761 | }, |
| LOW | docs/src/assets/js/focus-visible.js | 261 | // We detect that a node is a ShadowRoot by ensuring that it is a |
| LOW | .github/workflows/codeql-analysis.yml | 1 | # For most projects, this workflow file will not need changing; you simply need |
| LOW | .github/workflows/codeql-analysis.yml | 61 | # ℹ️ Command-line programs to run using the OS shell. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | docs/src/contribute/ai-policy.md | 24 | - **Review your work:** Before submitting a pull request generated by AI, you are expected to have thoroughly reviewed a |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | lib/cli-engine/formatters/formatters-meta.json | 8 | "description": "Outputs JSON-serialized results. The `json-with-metadata` provides the same linting results as the [ |