mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Ensure function arity is preserved after build (#31808)
Co-authored-by: eps1lon <sebastian.silbermann@vercel.com>
This commit is contained in:
@@ -86,6 +86,17 @@ module.exports = {
|
||||
rules: {
|
||||
'no-undef': 'error',
|
||||
'no-shadow-restricted-names': 'error',
|
||||
'no-restricted-syntax': [
|
||||
'error',
|
||||
// TODO: Can be removed once we upgrade GCC to a version without `optimizeArgumentsArray` optimization.
|
||||
{
|
||||
selector: 'Identifier[name=/^JSCompiler_OptimizeArgumentsArray_/]',
|
||||
message:
|
||||
'Google Closure Compiler optimized `arguments` access. ' +
|
||||
'This affects function arity. ' +
|
||||
'Create a reference to `arguments` to avoid this optimization',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// These plugins aren't used, but eslint complains if an eslint-ignore comment
|
||||
|
||||
@@ -81,6 +81,17 @@ module.exports = {
|
||||
rules: {
|
||||
'no-undef': 'error',
|
||||
'no-shadow-restricted-names': 'error',
|
||||
'no-restricted-syntax': [
|
||||
'error',
|
||||
// TODO: Can be removed once we upgrade GCC to a version without `optimizeArgumentsArray` optimization.
|
||||
{
|
||||
selector: 'Identifier[name=/^JSCompiler_OptimizeArgumentsArray_/]',
|
||||
message:
|
||||
'Google Closure Compiler optimized `arguments` access. ' +
|
||||
'This affects function arity. ' +
|
||||
'Create a reference to `arguments` to avoid this optimization',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// These plugins aren't used, but eslint complains if an eslint-ignore comment
|
||||
|
||||
@@ -83,6 +83,17 @@ module.exports = {
|
||||
rules: {
|
||||
'no-undef': 'error',
|
||||
'no-shadow-restricted-names': 'error',
|
||||
'no-restricted-syntax': [
|
||||
'error',
|
||||
// TODO: Can be removed once we upgrade GCC to a version without `optimizeArgumentsArray` optimization.
|
||||
{
|
||||
selector: 'Identifier[name=/^JSCompiler_OptimizeArgumentsArray_/]',
|
||||
message:
|
||||
'Google Closure Compiler optimized `arguments` access. ' +
|
||||
'This affects function arity. ' +
|
||||
'Create a reference to `arguments` to avoid this optimization',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// These plugins aren't used, but eslint complains if an eslint-ignore comment
|
||||
|
||||
@@ -71,6 +71,17 @@ module.exports = {
|
||||
rules: {
|
||||
'no-undef': 'error',
|
||||
'no-shadow-restricted-names': 'error',
|
||||
'no-restricted-syntax': [
|
||||
'error',
|
||||
// TODO: Can be removed once we upgrade GCC to a version without `optimizeArgumentsArray` optimization.
|
||||
{
|
||||
selector: 'Identifier[name=/^JSCompiler_OptimizeArgumentsArray_/]',
|
||||
message:
|
||||
'Google Closure Compiler optimized `arguments` access. ' +
|
||||
'This affects function arity. ' +
|
||||
'Create a reference to `arguments` to avoid this optimization',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// These plugins aren't used, but eslint complains if an eslint-ignore comment
|
||||
|
||||
@@ -73,6 +73,17 @@ module.exports = {
|
||||
rules: {
|
||||
'no-undef': 'error',
|
||||
'no-shadow-restricted-names': 'error',
|
||||
'no-restricted-syntax': [
|
||||
'error',
|
||||
// TODO: Can be removed once we upgrade GCC to a version without `optimizeArgumentsArray` optimization.
|
||||
{
|
||||
selector: 'Identifier[name=/^JSCompiler_OptimizeArgumentsArray_/]',
|
||||
message:
|
||||
'Google Closure Compiler optimized `arguments` access. ' +
|
||||
'This affects function arity. ' +
|
||||
'Create a reference to `arguments` to avoid this optimization',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// These plugins aren't used, but eslint complains if an eslint-ignore comment
|
||||
|
||||
Reference in New Issue
Block a user