@shrinkray-tools/eslint-plugin
v0.1.0
Published
ESLint rules for performance-first development, built to catch common frontend slowdowns before they reach production.
Downloads
13
Maintainers
Readme
@shrinkray-tools/eslint-plugin
ESLint rules for performance-first development, built to catch common frontend slowdowns before they reach production.
Part of the ShrinkRay Tools suite, open source tools to help you keep web performance fast by default.
What It Does
This plugin adds performance-focused ESLint rules to catch:
- Oversized imports (like
moment,aws-sdk, or fulllodash) - Future: render-blocking patterns, large inline styles, client-only hydration
Installation
npm install --save-dev @shrinkray-tools/eslint-pluginUsage
Add it to your ESLint config:
Manual Rule Setup
{
"plugins": ["@shrinkray-tools"],
"rules": {
"@shrinkray-tools/no-large-imports": "warn"
}
}Recommended Config
Use the built-in recommended preset to enable safe default rules:
{
"extends": ["plugin:@shrinkray-tools/recommended"]
}Rules
no-large-imports
Warns when known large libraries are imported directly. Helps teams avoid bundle bloat by catching heavy or legacy dependencies early.
Warned Libraries
| Library | Approx Size |
|-------------|--------------|
| moment | ~300 KB |
| lodash | ~200 KB |
| date-fns | ~180 KB |
| chart.js | ~300 KB |
| aws-sdk | ~500 KB |
| three | ~450 KB |
These are rough estimates of uncompressed ESM/UMD import costs and may vary by usage.
Coming Soon
no-hydration-only-componentsno-render-blocking-fontswarn-large-inline-style
Local Development
If you're working on this plugin locally:
npm install
npm run testTo test the plugin inside another repo locally:
npm link
cd your-project
npm link @shrinkray-tools/eslint-pluginRelated Projects
- ShrinkRay Analyzer – script and resource analysis via headless browser
- ShrinkRay CLI – coming soon
License
MIT License © Den Odell
