Deslop — RN Library Code Quality
Run the scanner:
bash "${CLAUDE_PLUGIN_ROOT}/plugins/rn-lib-claude/scripts/deslop.sh" ${ARGUMENT:-.}
What It Scans
Critical (exit 1, block publish)
NativeModulesusage — legacy bridge, banned in New ArchitecturerequireNativeComponent— usecodegenNativeComponentinsteadUIManager— legacy bridge APIconsole.loginside worklet functions — crashes New Architecture runtimethrow new Error('TODO')/ empty function bodies — placeholder code- Hardcoded secrets or API keys in source
- Empty catch blocks
catch (e) {} import { Animated } from 'react-native'— use Reanimated
Medium (warn, review before publish)
console.log/console.warnanywhere insrc/— remove before publishTODO/FIXME/HACKcomments insrc/- Hardcoded colors (
'#fff','red','black') — should be props - Hardcoded dimensions (magic numbers without comment)
PanResponder— use GestureDetector
Low (info)
eslint-disablecomments — should fix root cause@ts-ignore/@ts-expect-error— should fix type issue- Missing
displayNameon components - Default exports — should be named exports
Never Auto-Fix
- Hardcoded secrets — flag only, user removes
- Legacy bridge APIs — requires native code rewrite
After Scanning
List critical issues with file:line format. Suggest fix for each. Group by severity.