Expand Minimize

Best Practice

Rules to warn if best practices are not used.

Index

Rule Description Type Severity
SPF050101: Specify TypeScript linting rules Specify TypeScript linting rules to use when verifying TypeScript code Project Error
SPF050102: Project should list its dependencies in package.json or as external resources Project should list the packages it depends on in the package.json file or as external resources Project Error
SPF050103: Lock file missing A lock file is used to lock down dependencies across projects, to ensure production uses the same dependency versions. Project Error
SPF050601: React component files should have correct extension Files defining React components should have either the .jsx or .tsx extension Src Warning
SPF050602: File that doesn't define React component shouldn't use the .jsx/.tsx extension File that doesn't define React component shouldn't use the .jsx/.tsx extension Src Warning
SPF050701: Use the latest versions of JavaScript libraries in client-side web part manifest Use the latest versions of JavaScript libraries which contain the latest bug fixes and security patches Web Part Manifest Warning
SPF050801: Validate web part properties' values You should always validate web part properties' values JavaScriptFile CriticalWarning
SPF050802: Don't manipulate DOM elements outside the component You should not manipulate DOM elements outside your component, as SharePoint DOM can change breaking your customization JavaScriptFile CriticalWarning
SPF050803: Use the latest versions of JavaScript libraries in JavaScript file Use the latest versions of JavaScript libraries which contain the latest bug fixes and security patches SharePoint Framework JavaScript file Warning
SPF050901: Script is served with support for CORS Script is served with support for CORS External SharePoint Framework File Warning
SPF051304: Use the latest versions of JavaScript libraries in project configuration Use the latest versions of JavaScript libraries which contain the latest bug fixes and security patches ProjectConfig Warning
SPF051401: Use the latest versions of JavaScript libraries in client-side extension manifest Use the latest versions of JavaScript libraries which contain the latest bug fixes and security patches Extension Manifest Warning
Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.