eslint-plugin-sfdx
v1.0.1
Published
Custom rules for Salesforce DX
Downloads
155
Maintainers
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.