eslint-plugin-sfdx

Custom rules for Salesforce DX

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
eslint-plugin-sfdx
1.0.15 years ago5 years agoMinified + gzip package size for eslint-plugin-sfdx in KB

Readme

eslint-plugin-sfdx
Custom rules for Salesforce DX

Installation

You'll first need to install ESLint:
$ npm i eslint --save-dev

Next, install eslint-plugin-sfdx:
$ npm install eslint-plugin-sfdx --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-sfdx globally.

Usage

Add sfdx to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
    "plugins": [
        "sfdx"
    ]
}

Then configure the rules you want to use under the rules section.
{
    "rules": {
        "sfdx/ecma-intrinsics": 1,
        "sfdx/secure-document": 1,
        "sfdx/aura-api": 1,
        "sfdx/secure-window": 1
    }
}

License

The Salesforce Developer MSA governs your use of the Lightning CLI.