salesforce-component-standards

Solid

Quality standards for Salesforce Lightning Web Components (LWC), Aura components, and Visualforce pages. Covers SLDS 2 compliance, accessibility (WCAG 2.1 AA), data access pattern selection, component communication rules, XSS prevention, CSRF enforcement, FLS/CRUD in AuraEnabled methods, view state management, and Jest test requirements. Use this skill when building or reviewing any Salesforce UI component to enforce platform-specific security and quality standards.

Web & Frontend 33,992 stars 4157 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Salesforce Component Quality Standards Apply these checks to every LWC, Aura component, and Visualforce page you write or review. ## Section 1 — LWC Quality Standards ### 1.1 Data Access Pattern Selection Choose the right data access pattern before writing JavaScript controller code: | Use case | Pattern | Why | |---|---|---| | Read a single record reactively (follows navigation) | `@wire(getRecord, { recordId, fields })` | Lightning Data Service — cached, reactive | | Standard CRUD form for a single object | `<lightning-record-form>` or `<lightning-record-edit-form>` | Built-in FLS, CRUD, and accessibility | | Complex server query or filtered list | `@wire(apexMethodName, { param })` on a `cacheable=true` method | Allows caching; wire re-fires on param change | | User-triggered action, DML, or non-cacheable server call | Imperative `apexMethodName(params).then(...).catch(...)` | Required for DML — wired methods cannot be `@AuraEnabled` without `cacheable=true` | | Cross-component communication (no shared parent) | Lightning Message Service (LMS) | Decoupled, works across DOM boundaries | | Multi-object graph relationships | GraphQL `@wire(gql, { query, variables })` | Single round-trip for complex related data | ### 1.2 Security Rules | Rule | Enforcement | |---|---| | No raw user data in `innerHTML` | Use `{expression}` binding in the template — the framework auto-escapes. Never use `this.template.querySelector('.el').innerHTML = userValue` | | Apex `@AuraEnabled` ...

Details

Author
github
Repository
github/awesome-copilot
Created
11 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Related Skills