[code-infra] New lint rule: mandate production switch for certain function calls #207
Labels
performance
scope: code-infra
Specific to the core-infra product
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
Some helpers should always be wrapped with a
process.env.NODE_ENV !== 'production'
conditional to prevent them from ending up in user's production bundles. See mui/mui-x#14748 (comment)To Do: Craft an eslint rule that mandates the wrapper for certain function calls:
Should pass:
Should fail:
List of calls
warnOnce
checkSlot
The text was updated successfully, but these errors were encountered: