npm / eslint-scope / 9.1.2

eslint-scope 9.1.2

Source
https://github.com/eslint/js
Tag scanned
eslint-scope-v9.1.2
Directory
packages/eslint-scope (only this part of the repository was scanned)
Compared with
eslint-scope-v9.1.1 (0 signals introduced since)
Files
62 scanned, 4 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 41 info
Scan time
0.1 s
LLM review
LLM review by claude-haiku-5-5 (Anthropic): nothing at warn or critical to review.
Disclude version
4.0.0
Scanned (UTC)
2026-10-14 19:25

Signals

Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.

  1. file mixes tab and space indentation (19 tab-indented and 16 space-indented lines) (raw pass, confidence 0.40)

    /*
      Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
    
      Redistribution and use in source and binary forms, with or without
  2. info whitespace-anomaly packages/eslint-scope/lib/index.js:2:1

    file mixes tab and space indentation (51 tab-indented and 18 space-indented lines) (raw pass, confidence 0.40)

    /*
      Copyright (C) 2012-2014 Yusuke Suzuki <utatane.tea@gmail.com>
      Copyright (C) 2013 Alex Seville <hi@alexanderseville.com>
      Copyright (C) 2014 Thiago de Arruda <tpadilha84@gmail.com>
  3. file mixes tab and space indentation (91 tab-indented and 16 space-indented lines) (raw pass, confidence 0.40)

    /*
      Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
    
      Redistribution and use in source and binary forms, with or without
  4. file mixes tab and space indentation (55 tab-indented and 16 space-indented lines) (raw pass, confidence 0.40)

    /*
      Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
    
      Redistribution and use in source and binary forms, with or without
  5. file mixes tab and space indentation (623 tab-indented and 16 space-indented lines) (raw pass, confidence 0.40)

    /*
      Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
    
      Redistribution and use in source and binary forms, with or without
  6. file mixes tab and space indentation (183 tab-indented and 16 space-indented lines) (raw pass, confidence 0.40)

    /*
      Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
    
      Redistribution and use in source and binary forms, with or without
  7. info whitespace-anomaly packages/eslint-scope/lib/scope.js:2:1

    file mixes tab and space indentation (502 tab-indented and 16 space-indented lines) (raw pass, confidence 0.40)

    /*
      Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
    
      Redistribution and use in source and binary forms, with or without
  8. file mixes tab and space indentation (15 tab-indented and 16 space-indented lines) (raw pass, confidence 0.40)

    /*
      Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
    
      Redistribution and use in source and binary forms, with or without
  9. file mixes tab and space indentation (419 tab-indented and 9 space-indented lines) (raw pass, confidence 0.40)

    describe("ScopeManager#addGlobals", () => {
    	it("adds variables to the global scope and resolves references from the global scope", () => {
    		const ast = espree(`
                foo = bar + bar;
  10. file mixes tab and space indentation (16 tab-indented and 4 space-indented lines) (raw pass, confidence 0.40)

    describe("arguments", () => {
    	it("arguments are correctly materialized", () => {
    		const ast = espree(`
                (function () {
  11. file mixes tab and space indentation (112 tab-indented and 13 space-indented lines) (raw pass, confidence 0.40)

    describe("catch", () => {
    	it("creates scope", () => {
    		const ast = espree(`
                (function () {
  12. file mixes tab and space indentation (44 tab-indented and 6 space-indented lines) (raw pass, confidence 0.40)

    describe("childVisitorKeys option", () => {
    	it("should handle as a known node if the childVisitorKeys option was given.", () => {
    		const ast = espree(`
                var foo = 0;
  13. file mixes tab and space indentation (78 tab-indented and 13 space-indented lines) (raw pass, confidence 0.40)

    describe("ES6 arrow function expression", () => {
    	it("materialize scope for arrow function expression", () => {
    		const ast = espree(`
                var arrow = () => {
  14. file mixes tab and space indentation (103 tab-indented and 34 space-indented lines) (raw pass, confidence 0.40)

    describe("ES6 block scope", () => {
    	it("let is materialized in ES6 block scope#1", () => {
    		getSupportedEcmaVersions({ min: 6 }).forEach(ecmaVersion => {
    			const ast = espree(`
  15. file mixes tab and space indentation (40 tab-indented and 9 space-indented lines) (raw pass, confidence 0.40)

    describe("ES6 catch", () => {
    	it("takes binding pattern", () => {
    		const ast = espree(`
                try {
  16. file mixes tab and space indentation (254 tab-indented and 46 space-indented lines) (raw pass, confidence 0.40)

    describe("ES6 class", () => {
    	it("declaration name creates class scope", () => {
    		const ast = espree(`
                class Derived extends Base {
  17. file mixes tab and space indentation (211 tab-indented and 63 space-indented lines) (raw pass, confidence 0.40)

    describe("ES6 default parameters:", () => {
    	describe("a default parameter creates a writable reference for its initialization:", () => {
    		const patterns = {
    			FunctionDeclaration: "function foo(a, b = 0) {}",
  18. file mixes tab and space indentation (950 tab-indented and 143 space-indented lines) (raw pass, confidence 0.40)

    describe("ES6 destructuring assignments", () => {
    	it("Pattern in var in ForInStatement", () => {
    		const ast = espree(`
                (function () {
  19. file mixes tab and space indentation (175 tab-indented and 22 space-indented lines) (raw pass, confidence 0.40)

    describe("ES6 iteration scope", () => {
    	it("let materialize iteration scope for ForInStatement#1", () => {
    		getSupportedEcmaVersions({ min: 6 }).forEach(ecmaVersion => {
    			const ast = espree(`
  20. file mixes tab and space indentation (12 tab-indented and 6 space-indented lines) (raw pass, confidence 0.40)

    describe("ES6 new.target", () => {
    	it("should not make references of new.target", () => {
    		const ast = espree(`
                class A {
  21. file mixes tab and space indentation (36 tab-indented and 14 space-indented lines) (raw pass, confidence 0.40)

    describe("ES6 object", () => {
    	it("method definition", () => {
    		const ast = espree(`
                ({
  22. file mixes tab and space indentation (17 tab-indented and 4 space-indented lines) (raw pass, confidence 0.40)

    describe("ES6 rest arguments", () => {
    	it("materialize rest argument in scope", () => {
    		const ast = espree(`
                function foo(...bar) {
  23. file mixes tab and space indentation (26 tab-indented and 9 space-indented lines) (raw pass, confidence 0.40)

    describe("ES6 super", () => {
    	it("is not handled as reference", () => {
    		const ast = espree(`
                class Foo extends Bar {
  24. file mixes tab and space indentation (27 tab-indented and 10 space-indented lines) (raw pass, confidence 0.40)

    describe("ES6 switch", () => {
    	it("materialize scope", () => {
    		getSupportedEcmaVersions({ min: 6 }).forEach(ecmaVersion => {
    			const ast = espree(`
  25. file mixes tab and space indentation (27 tab-indented and 7 space-indented lines) (raw pass, confidence 0.40)

    describe("ES6 template literal", () => {
    	it("refer variables", () => {
    		const ast = espree(`
                (function () {
  26. file mixes tab and space indentation (18 tab-indented and 6 space-indented lines) (raw pass, confidence 0.40)

    describe("fallback option", () => {
    	it("should raise an error when it encountered an unknown node if no fallback.", () => {
    		const ast = espree(`
                var foo = 0;
  27. file mixes tab and space indentation (26 tab-indented and 3 space-indented lines) (raw pass, confidence 0.40)

    describe("function name", () => {
    	it("should create its special scope", () => {
    		const ast = espree(`
                (function name() {
  28. file mixes tab and space indentation (110 tab-indented and 61 space-indented lines) (raw pass, confidence 0.40)

    describe("ScopeManager.prototype.getDeclaredVariables", () => {
    	/**
    	 * Asserts that nodes of the given type declare expected variables.
    	 * @param {Object} ast The AST to check.
  29. file mixes tab and space indentation (118 tab-indented and 32 space-indented lines) (raw pass, confidence 0.40)

    describe("implicit global reference", () => {
    	it("assignments global scope", () => {
    		const ast = espree(`
                var x = 20;
  30. file mixes tab and space indentation (79 tab-indented and 10 space-indented lines) (raw pass, confidence 0.40)

    describe("impliedStrict option", () => {
    	it("ensures all user scopes are strict if ecmaVersion >= 5", () => {
    		const ast = espree(`
                function foo() {
  31. file mixes tab and space indentation (345 tab-indented and 90 space-indented lines) (raw pass, confidence 0.40)

    describe("References:", () => {
    	describe("JSX References:", () => {
    		it("should treat JSX identifiers as references", () => {
    			const ast = espree(
  32. file mixes tab and space indentation (29 tab-indented and 6 space-indented lines) (raw pass, confidence 0.40)

    describe("label", () => {
    	it("should not create variables", () => {
    		const ast = espree("function bar() { q: for(;;) { break q; } }");
  33. file mixes tab and space indentation (69 tab-indented and 6 space-indented lines) (raw pass, confidence 0.40)

    describe("nodejsScope option", () => {
    	it("creates a function scope following the global scope immediately when nodejscope: true", () => {
    		const ast = espree(`
                "use strict";
  34. file mixes tab and space indentation (17 tab-indented and 16 space-indented lines) (raw pass, confidence 0.40)

    describe("optimistic", () => {
    	it("direct call to eval", () => {
    		const ast = espree(`
                function outer() {
  35. file mixes tab and space indentation (412 tab-indented and 57 space-indented lines) (raw pass, confidence 0.40)

    describe("References:", () => {
    	describe("When there is a `let` declaration on global,", () => {
    		it("the reference on global should be resolved.", () => {
    			const ast = espree("let a = 0;");
  36. file mixes tab and space indentation (188 tab-indented and 2 space-indented lines) (raw pass, confidence 0.40)

    function example() {
      let x = 1;
      console.log(x);
    }
  37. file mixes tab and space indentation (23 tab-indented and 6 space-indented lines) (raw pass, confidence 0.40)

    describe("typescript", () => {
    	describe("multiple call signatures", () => {
    		it("should create a function scope", () => {
    			const ast = parse(
  38. file mixes tab and space indentation (218 tab-indented and 82 space-indented lines) (raw pass, confidence 0.40)

    function assertIsStrictRecursively(scope, expected) {
    	assert.strictEqual(scope.isStrict, expected);
    
    	scope.childScopes.forEach(childScope => {
  39. file mixes tab and space indentation (41 tab-indented and 12 space-indented lines) (raw pass, confidence 0.40)

    describe("`using` and `await using` block scope", () => {
    	it("`using` in block scope", () => {
    		const ast = espree.parse(
    			`
  40. file mixes tab and space indentation (8 tab-indented and 16 space-indented lines) (raw pass, confidence 0.40)

    /*
      Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
    
      Redistribution and use in source and binary forms, with or without
  41. file mixes tab and space indentation (25 tab-indented and 6 space-indented lines) (raw pass, confidence 0.40)

    describe("with", () => {
    	it("creates scope", () => {
    		const ast = espree(
    			`

Reproduce This Scan

Run disclude locally to verify. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.

cargo install disclude --version 4.0.0
git clone https://github.com/eslint/js js && cd js
git checkout eslint-scope-v9.1.2
disclude scan --severity info --diff eslint-scope-v9.1.1 packages/eslint-scope