Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@salesforce/eslint-plugin-aura

Package Overview
Dependencies
Maintainers
80
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salesforce/eslint-plugin-aura

ESLint plugin for Aura

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
59K
increased by10.74%
Maintainers
80
Weekly downloads
 
Created
Source

eslint-plugin-aura

Build status NPM version

Salesforce Lightning (Aura) specific linting rules for ESLint.

Installation

npm install --save-dev @salesforce/eslint-plugin-aura

Usage

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

Example:

{
  "plugins": ["@salesforce/eslint-plugin-aura"],
  "extends": [
    "plugin:@salesforce/eslint-plugin-aura/recommended",
    "plugin:@salesforce/eslint-plugin-aura/locker"
  ]
}

Rules

Aura

Rule IDDescription
aura/aura-apivalidate Aura APIs
aura/getevt-markup-prefixverify the presence of the markup:// prefix for events accessed via $A.getEvt()
aura/no-deprecated-aura-errorprevent usage of $A.error
aura/no-deprecated-component-creationprevent usage of deprecated component creation methods
aura/no-deprecated-event-creationprevent usage of deprecated event creation methods

Locker

Rule IDDescription
aura/ecma-intrinsicsvalidate JavaScript intrinsic APIs
aura/secure-documentvalidate secure document public APIs
aura/secure-windowvalidate secure window public APIs

Configurations

This package exposes 2 configurations for your usage.

@salesforce/eslint-plugin-aura/recommended configuration

Goal: Prevent common pitfalls with Lightning component development, and enforce other Salesforce platform restrictions.

Rules:

@salesforce/eslint-plugin-aura/locker configuration

Goal: Prevent Lightning Locker violations.

Rules:

  • @salesforce/eslint-plugin-aura/recommended rules.
  • Proper usage of document and window via the secure-document and secure-window rules, respectively.
  • Proper usage of Javascript intrinsic APIs via the ecma-intrinsics rule.

Keywords

FAQs

Package last updated on 29 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc