关于 react-audit-grep-patterns
React Audit Grep Patterns 是用于审查 React 18.3.1 和 React 19 迁移的命令库,提供框架变更、测试文件及依赖冲突的扫描参考。
主要功能
- 01React 16/17 到 18.3.1 扫描模式
- 02React 18 到 19 扫描模式
- 03针对测试文件的扫描
- 04依赖和 peer 冲突扫描
适用场景
- 01升级到 React 18.3.1 前扫描代码库
- 02审查 React 18 项目的 React 19 迁移
- 03升级时检查测试和依赖
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ github/ awesome-copilot --skill react-audit-grep-patterns安装后在 Claude Code 中输入/react-audit-grep-patterns确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
references/test-scans.mddep-scans.mdreact19-scans.mdreact18-scans.md详细介绍
React 审计 Grep 模式
用于 React 18.3.1 和 React 19 迁移审计的完整扫描命令库。
用法
阅读与你的目标相关的章节:
references/react18-scans.md- React 16/17 → 18.3.1 审计的所有扫描references/react19-scans.md- React 18 → 19 审计的所有扫描references/test-scans.md- 测试文件专用扫描(两个审计器都会使用)references/dep-scans.md- 依赖与 peer 冲突扫描
所有扫描共用的基础模式
# Standard flags used throughout:
# -r = recursive
# -n = show line numbers
# -l = show filenames only (for counting affected files)
# --include="*.js" --include="*.jsx" = JS/JSX files only
# | grep -v "\.test\.\|\.spec\.\|__tests__" = exclude test files
# | grep -v "node_modules" = safety (usually handled by not scanning node_modules)
# 2>/dev/null = suppress "no files found" errors
# Source files only (exclude tests):
SRC_FLAGS='--include="*.js" --include="*.jsx"'
EXCLUDE_TESTS='grep -v "\.test\.\|\.spec\.\|__tests__"'
# Test files only:
TEST_FLAGS='--include="*.test.js" --include="*.test.jsx" --include="*.spec.js" --include="*.spec.jsx"'
评论
支持 Markdown