@htmlguyllc/jalert
ACursor Rules for jAlert jQuery Plugin
Install
agr install @htmlguyllc/jalert --target cursorWrites 1 file into .cursor/rules/, pinned to git-fe4fd019.
- .cursorrules
Document
Cursor Rules for jAlert jQuery Plugin
Project Overview
jAlert is a jQuery plugin for creating modals, popups, lightboxes, and alerts. It's built with ES6+ and transpiled to ES5 for maximum browser compatibility.
Chat responses
Start each of your responses with: Yes, sir.
Build & Test Commands
- Build:
npm run build- only need to run this when changes are made to jAlert.js or jAlert.css - Test:
npm test - E2E Tests:
npm run test:e2e - Unit Tests:
npm run test:unit - All Tests:
npm run test:all
Required Checks for Every Change
1. Testing Requirements
- Update tests if they are impacted by changes
- Add tests for any new logic or functionality
- Ensure all new features have proper test coverage
2. Documentation Requirements
- Update index.html to maintain documentation about features/options
- Document every setting and its default value with the version where it was first introduced
- Document discovered gotchas that would impact users
- Update README.md for any development or release flow changes
3. Release Process
- Rebuild the project before any release
- Rerun
test:alland fix any issues - Add the new version to the changelog with any user-facing changes
- Modify README.md as needed to reflect the latest - at a minimum, the npm button
- Update index.html to reflect any changes to the options/features and the latest version content if it exists.
- Bump the version in package.json
- Commit
- Push
- Create tag
- Create release on Github
- NPM Publish
4. Compatibility & Quality
- Maintain backwards compatibility with older versions
- Ensure feature parody across versions
5. Accessibility & Mobile
- Consider accessibility in all changes (ARIA attributes, keyboard navigation)
- Ensure mobile-friendliness and responsive design
- Test touch interactions and mobile layouts
6. Code Quality
- Follow best practices and DRY principles
- Make code extendable and extensible
- Use consistent coding standards
- Avoid hacks, arbitrary protections, and arbitrary values
- Be concise and simple. Find the easiest path to a solution that will perform well
- Optimize for performance when possible as long as the impact to maintainability isn't too high
7. User Experience
- Provide all options for user control
- Ensure users don't feel trapped or limited by the plugin
- Give users full flexibility to customize behavior
Key Files
- Main JS: dist/jAlert.min.js
- Main CSS: dist/jAlert.min.css
- Source: src/jAlert.js, src/jAlert.css
- Tests: tests/unit/, tests/e2e/, tests/visual/
- Comprehensive demo: demo.html - used by tests
Dependencies
- jQuery >= 3.7.0 (peer dependency)
- Node >= 14.0.0
- NPM >= 6.0.0
Browser Support
Minimum browser versions that should fully support this plugin:
- Chrome: 30+
- Firefox: 28+
- Safari: 7+
- Edge: 12+
- Opera: 17+
- Internet Explorer: 11 (with jQuery polyfills, but MutationObserver support is limited) Note:
- IE10 and below are not fully supported due to missing ES5 features and MutationObserver.
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-fe4fd01962972026-08-06