An ESLint configuration package from Salesforce that enforces a license header comment on all source files. Current stable version is 1.0.2. It is a small, single-purpose config that wraps the eslint-plugin-header plugin to ensure every JavaScript/TypeScript file in a Salesforce project starts with the required Salesforce copyright and license notice. Key differentiators: it is the official Salesforce tooling, tightly integrated with @salesforce/dev-scripts, and provides a plug-and-play setup for license compliance across Salesforce DX projects. Release cadence is sporadic, driven by license year updates or CI changes.
npm install eslint-config-salesforce-licenseVerified import paths — ran on the pinned version, not inferred.
Shows installation and basic configuration of the Salesforce license ESLint config, including a common override to skip license headers in test files.
Make sure your source files start with the exact license comment. Check the config source at https://github.com/forcedotcom/eslint-config-salesforce-license
Update to the latest version: npm install eslint-config-salesforce-license@latest
Run: npm install --save-dev eslint-plugin-header
Combine with eslint-config-salesforce-typescript for full Salesforce linting: extends: ['eslint-config-salesforce-license', 'eslint-config-salesforce-typescript']
npm install --save-dev eslint-plugin-header
npm install --save-dev eslint-config-salesforce-license
Use export default { extends: ['eslint-config-salesforce-license'] } or rename to .eslintrc.cjs