Skip to content

Commit e8e58d3

Browse files
Merge pull request #2555 from TrevorBurnham/no-babel-spread
perf: remove rest spread Babel plugin
2 parents 708d971 + 3af9455 commit e8e58d3

File tree

6 files changed

+8
-65
lines changed

6 files changed

+8
-65
lines changed

.babelrc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,5 @@
1313
"debug": false
1414
}
1515
]
16-
],
17-
"plugins": [
18-
"@babel/plugin-proposal-object-rest-spread"
1916
]
20-
}
17+
}

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
],
8383
"max-len": 0,
8484
"prefer-arrow-callback": 2,
85+
"prefer-object-spread": "error",
8586
"arrow-spacing": [
8687
2,
8788
{
@@ -138,4 +139,4 @@
138139
"no-process-env": 0,
139140
"default-case": 0
140141
}
141-
}
142+
}

package-lock.json

Lines changed: 2 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"devDependencies": {
5757
"@babel/cli": "^7.5.5",
5858
"@babel/core": "^7.10.5",
59-
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
59+
6060
"@babel/preset-env": "^7.10.4",
6161
"@babel/register": "^7.10.5",
6262
"@types/chai": "^4.1.7",

pegjs/snowflake.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2504,7 +2504,7 @@ table_base
25042504
// => table_name & { as?: alias_clause; }
25052505
if (t.type === 'var') {
25062506
t.as = alias;
2507-
Object.assign(t, {...getLocationObject()})
2507+
t = { ...t, ...getLocationObject() }
25082508
return t;
25092509
} else {
25102510
return {

pegjs/trino.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2470,7 +2470,7 @@ table_base
24702470
// => table_name & { as?: alias_clause; }
24712471
if (t.type === 'var') {
24722472
t.as = alias;
2473-
Object.assign(t, {...getLocationObject()})
2473+
t = { ...t, ...getLocationObject() }
24742474
return t;
24752475
} else {
24762476
return {

0 commit comments

Comments
 (0)