eslint-plugin-sfdx

1.0.1 • Public • Published

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.

Package Sidebar

Install

npm i eslint-plugin-sfdx

Weekly Downloads

32

Version

1.0.1

License

Salesforce Developer MSA

Unpacked Size

12.6 kB

Total Files

4

Last publish

Collaborators

  • tstachl