Repository: eslint/eslint
File: tests/lib/rules/no-unused-vars.js (JavaScript)

Code before:

        // https://github.com/eslint/eslint/issues/9774
        {
            code: "(function(_a) {})();",
            options: [{ args: "all", varsIgnorePattern: "^_" }],
            errors: [definedError("_a")]
        },
        {
            code: "(function(_a) {})();",
            options: [{ args: "all", caughtErrorsIgnorePattern: "^_" }],
            errors: [definedError("_a")]
        },

        // https://github.com/eslint/eslint/issues/10982
        {
            code: "var a = function() { a(); };",
            errors: [{ ...assignedError("a"), line: 1, column: 5 }]
        },
        {
            code: "var a = function(){ return function() { a(); } };",
            errors: [{ ...assignedError("a"), line: 1, column: 5 }]
        },
        {
            code: "const a = () => () => { a(); };",
            languageOptions: { ecmaVersion: 2015 },
            errors: [{ ...assignedError("a") }]
        },
        {
            code: `let myArray = [1,2,3,4].filter((x) => x == 0);
    myArray = myArray.filter((x) => x == 1);`,
            languageOptions: { ecmaVersion: 2015 },
            errors: [{ ...assignedError("myArray"), line: 2, column: 5 }]
        },
        {
            code: "const a = 1; a += 1;",
            languageOptions: { ecmaVersion: 2015 },
            errors: [{ ...assignedError("a"), line: 1, column: 14 }]
        },
        {
            code: "const a = () => { a(); };",
            languageOptions: { ecmaVersion: 2015 },
            errors: [{ ...assignedError("a"), line: 1, column: 7 }]
        },

        // https://github.com/eslint/eslint/issues/14324
        {
            code: "let x = [];\nx = x.concat(x);",
            languageOptions: { ecmaVersion: 2015 },
            errors: [{ ...assignedError("x"), line: 2, column: 1 }]
        },
        {

Review comment (suggestion):
```suggestion
            errors: [{ ...assignedError("a"), line: 1, column: 7 }]
```

Code after:

        // https://github.com/eslint/eslint/issues/9774
        {
            code: "(function(_a) {})();",
            options: [{ args: "all", varsIgnorePattern: "^_" }],
            errors: [definedError("_a")]
        },
        {
            code: "(function(_a) {})();",
            options: [{ args: "all", caughtErrorsIgnorePattern: "^_" }],
            errors: [definedError("_a")]
        },

        // https://github.com/eslint/eslint/issues/10982
        {
            code: "var a = function() { a(); };",
            errors: [{ ...assignedError("a"), line: 1, column: 5 }]
        },
        {
            code: "var a = function(){ return function() { a(); } };",
            errors: [{ ...assignedError("a"), line: 1, column: 5 }]
        },
        {
            code: "const a = () => () => { a(); };",
            languageOptions: { ecmaVersion: 2015 },
            errors: [{ ...assignedError("a"), line: 1, column: 7 }]
        },
        {
            code: `let myArray = [1,2,3,4].filter((x) => x == 0);
    myArray = myArray.filter((x) => x == 1);`,
            languageOptions: { ecmaVersion: 2015 },
            errors: [{ ...assignedError("myArray"), line: 2, column: 5 }]
        },
        {
            code: "const a = 1; a += 1;",
            languageOptions: { ecmaVersion: 2015 },
            errors: [{ ...assignedError("a"), line: 1, column: 14 }]
        },
        {
            code: "const a = () => { a(); };",
            languageOptions: { ecmaVersion: 2015 },
            errors: [{ ...assignedError("a"), line: 1, column: 7 }]
        },

        // https://github.com/eslint/eslint/issues/14324
        {
            code: "let x = [];\nx = x.concat(x);",
            languageOptions: { ecmaVersion: 2015 },
            errors: [{ ...assignedError("x"), line: 2, column: 1 }]
        },
        {