react-native-reanimated
react-native-reanimated copied to clipboard
feat: Eslint rules to ensure logger usage instead of console
Summary
This PR adds 3 different eslint rules to ensure that errors and warnings are logged properly:
use-logger- shows error whenconsole.warnorconsole.erroris used instead of a proper method from theloggerobject,wrong-logger-import- ensures that a local logger implementation is used in the package, e.g. reanimated uses logger from the reanimated package and worklets use package from the worklets package,no-logger-message-prefix- shows error when the user adds a[Worklets]or[Reanimated]prefix in the log message string (this prefix is added automatically by the logger)