@salesforce/eslint-plugin-lightning

1.0.0 • Public • Published

@salesforce/eslint-plugin-lightning

Collection of ESLint rules for Salesforce Lightning platform.

Installation

$ npm install eslint @salesforce/eslint-plugin-lightning --save-dev

Usage

Add this plugin to your ESLint configuration and extend your desired configuration. See ESLint documentation for details.

{
    "plugin": ["@salesforce/eslint-plugin-lightning"],
    "rules": {
        "@salesforce/lightning/no-moment": "error",
        "@salesforce/lightning/prefer-i18n-service": "error"
    }
}

Rules

Internationalization rules

Rule ID Description Fixable
lightning/no-aura-localization-service prevent usage of $A.localizationService
lightning/no-moment prevent usage of moment library
lightning/prefer-i18n-service suggest usage of @salesforce/i18n-service over direct calls to Intl

Apex rules

Rule ID Description Fixable
lightning/valid-apex-method-invocation enforce invoking Apex methods with the right arguments

Package Sidebar

Install

npm i @salesforce/eslint-plugin-lightning

Weekly Downloads

73,168

Version

1.0.0

License

MIT

Unpacked Size

13.7 kB

Total Files

9

Last publish

Collaborators

  • dme722
  • nolanlawson
  • ire-npm-team-user
  • jburnie
  • abirchfieldsfdc
  • dlouvton
  • mobify
  • jmsjtu
  • jasonschroeder-sfdc
  • packagellama
  • maward
  • danielshox
  • duane.chew
  • dferro
  • jcourtner
  • jye-sf
  • adirasanam
  • hkii
  • iamaziz
  • dbreese-salesforce
  • ashokrudraraju
  • dhersam
  • demianbrecht
  • mbettio
  • damilareolowoniyi
  • mmadialagan
  • mjrust
  • salesforce-releases
  • mpsenn
  • kevinv11n
  • byao
  • pmdartus
  • ekashida
  • gr8gatsby
  • ravi.jayaramappa
  • apapko
  • jleen-sfdc
  • jqian
  • cwallsf
  • dhagberg-sf
  • khawkins
  • amphro
  • jodarove
  • sfdctaka
  • fernomac
  • jimjag
  • ivarley
  • jbartolotta-sfdc