You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit extends the safe-string-coercion internal ESLint rule to
auto-detect code where coercion can't fail or is correctly preceded
by a DEV check. In those cases, the rule now won't report.
Changes:
* Don't report if the coercion is wrapped in an `if (typeof...) {}`
block that ensures that the coercion won't throw
* Don't report if there's a valid coercion check call in the
statement immediately before the coercion. The check call must be in
the following format:
if (__DEV__) {
checkXxxxxStringCoercion(value);
};
* Renames rule option for clarity. New name: `isProductionUserAppCode`
* Removes now-unnecessary `eslint-disable*` comments
* Improve messages returned from ESLint when the DEV check is required,
but is missing or invalid. If invalid, message tells what's wrong.
0 commit comments