File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1601,12 +1601,18 @@ class Linter {
16011601 languageOptions . ecmaVersion
16021602 ) ;
16031603
1604- // add configured globals and language globals
1605- const configuredGlobals = {
1606- ...( getGlobalsForEcmaVersion ( languageOptions . ecmaVersion ) ) ,
1607- ...( languageOptions . sourceType === "commonjs" ? globals . commonjs : void 0 ) ,
1608- ...languageOptions . globals
1609- } ;
1604+ /*
1605+ * add configured globals and language globals
1606+ *
1607+ * using Object.assign instead of object spread for performance reasons
1608+ * https://github.com/eslint/eslint/issues/16302
1609+ */
1610+ const configuredGlobals = Object . assign (
1611+ { } ,
1612+ getGlobalsForEcmaVersion ( languageOptions . ecmaVersion ) ,
1613+ languageOptions . sourceType === "commonjs" ? globals . commonjs : void 0 ,
1614+ languageOptions . globals
1615+ ) ;
16101616
16111617 // double check that there is a parser to avoid mysterious error messages
16121618 if ( ! languageOptions . parser ) {
You can’t perform that action at this time.
0 commit comments