Lightning-ready applications using custom JavaScript libraries must meet the following requirements:
1. **Static Resources**: JavaScript libraries must be stored in static resources within the package. Dynamically loading JavaScript files from third-party endpoints or CDNs is not allowed, except for Salesforce-approved CDNs like Google Maps and Stripe.
2. **Namespace Sandbox**: All JavaScript code must operate within the namespace sandbox of the application. Executing JavaScript in the Salesforce domain (e.g., through custom buttons, homepage components, or S-controls) is prohibited.
3. **Secure Coding Practices**: Lightning components must sanitize user inputs and avoid unsafe attributes. Use secure filters and sanitization libraries stored in static resources.
4. **LockerService Compatibility**: Lightning applications must be written for API version 40 or later to ensure compatibility with LockerService, which enforces component isolation and secure interactions.
5. **Version Control**: The entire solution, including JavaScript libraries, must be version-controlled to ensure transparency and security during reviews.
6. **Security Compliance**: Avoid using JavaScript to bypass sharing rules, CRUD, or field-level security settings.
These guidelines ensure compliance with Salesforce's security and functional standards.