/bulletproof-react-skills:project-standardsfrom bulletproof-react-skills
Project standards from bulletproof-react: ESLint/Prettier/TypeScript config, absolute imports, pre-commit hooks, and CI conventions. Use when setting up tooling for a React project or reviewing its lint/format/type configuration. Reach for this whenever asked to "set up linting for a new React project," "configure absolute imports so I stop seeing ../../../," "add a pre-commit hook to run lint and type-check," or "review this project's ESLint/Prettier/ tsconfig setup" — or when enforcing consistent file/folder naming conventions across a codebase.
Ships in bulletproof-react-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Adapted from bulletproof-react @
9506629, MIT licensed. See ../../NOTICE.md for provenance and the re-pin workflow.
Enforce these project standards to keep a React codebase clean, consistent, and scalable as it grows — without them, code quality and maintainability degrade as more people touch the project.
Configure rules in .eslintrc.js and treat ESLint as your first line of defense against JavaScript errors: it catches mistakes early and enforces uniform coding practices across the codebase, which is what keeps the code correct and readable as the project scales.
ESLint Configuration Example Code
Enable "format on save" in the IDE so Prettier auto-formats code against the .prettierrc config on every save — this keeps code style uniform across the codebase without manual effort. Treat a failed auto-format as a signal of a syntax error, not a tooling glitch. Integrate Prettier with ESLint so formatting and linting run together as one consistent step in development.
Prettier Configuration Example Code
Don't rely on ESLint alone for catching bugs — JavaScript's dynamic nature means ESLint misses runtime data issues, especially in complex projects. Use TypeScript to close that gap and to surface issues during large refactors that would otherwise go unnoticed. When refactoring, update type declarations first, then resolve the TypeScript errors that ripple out across the project — this ordering surfaces the full blast radius of a change instead of missing pieces. Keep in mind TypeScript only checks types at build time; it gives you refactoring confidence, but it does not prevent runtime failures. See this resource on using TypeScript with React for more.
Use Husky to run git hooks — lint, format, and type checks — before every commit, so faulty commits never reach the repository in the first place. Configure it as described here.
Always configure and use absolute imports: they let you move files around freely without breaking import paths, and they eliminate messy relative chains like ../../../component. Configure it as follows:
For JavaScript (jsconfig.json) projects:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}
For TypeScript (tsconfig.json) projects:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}
You can define multiple path aliases for individual folders (@components, @hooks, etc.), but prefer a single @/* alias — it's short enough that you don't need to configure multiple paths, and it's visually distinct enough from node_modules imports that there's no confusion about what's a dependency versus your own source. With @/* mapped to src, a file at src/components/my-component becomes @/components/my-component instead of ../../../components/my-component.
Enforce file and folder naming conventions (e.g., kebab-case everywhere) to keep the codebase consistent and easy to navigate — don't leave naming to individual preference.
Enforce it with ESLint:
'check-file/filename-naming-convention': [
'error',
{
'**/*.{ts,tsx}': 'KEBAB_CASE',
},
{
// ignore the middle extensions of the filename to support filename like bable.config.js or smoke.spec.ts
ignoreMiddleExtensions: true,
},
],
'check-file/folder-naming-convention': [
'error',
{
// all folders within src (except __tests__)should be named in kebab-case
'src/**/!(__tests__)': 'KEBAB_CASE',
},
],
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub dfadler/bulletproof-react-skills --plugin bulletproof-react-skillsOther plugins' skills for the same job
7 skills in this plugin
/components-and-stylingComponent and styling conventions from bulletproof-react: colocation,
avoiding nested render functions, container/presentation separation, and
composition-over-config for component APIs. Covers when to reach for a
fully-styled vs. headless component library, which styling solution fits
a given setup (including React Server Components constraints), and using
Storybook for isolated component development. Use this when designing a
new component's API, reviewing a component for prop bloat or nested
render functions, choosing a component library or styling approach for a
project, or when a request looks like "this component is taking too many
props, how should I split it up," "what component library should I use
for this dashboard," or "where should I put this piece of state/style so
it doesn't cause unnecessary re-renders."
/performancePerformance conventions from bulletproof-react: code splitting,
component/state update optimization, list virtualization, image
optimization, and bundle analysis. Use when a React app feels slow or before
shipping a feature that renders large lists or heavy assets. Reach for this
whenever you're about to add a route, decide where a piece of state should
live, render a list of unknown or large size, or add images — and whenever
a request mentions phrasing like "this page feels slow", "why is this
component re-rendering so much", or "how should I load these images".