Socket
Book a DemoInstallSign in
Socket

@lwc/eslint-plugin-lwc-platform

Package Overview
Dependencies
Maintainers
14
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lwc/eslint-plugin-lwc-platform

ESLint rules and configuration of LWC modules used in Salesforce

6.1.0
latest
npmnpm
Version published
Weekly downloads
36K
-10.11%
Maintainers
14
Weekly downloads
 
Created
Source

@lwc/eslint-plugin-lwc-platform

ESLint rules and configuration of LWC modules used in Core

Should I use this plugin?

This plugin contains linting rules that are run on LWC components deployed to Salesforce. If you author such components, you may use this plugin.

Installation

This plugin is intended to be used along with the official @salesforce/eslint-config-lwc config. The @lwc/eslint-plugin-lwc-platform only contains an extra set of rules that are relevant in the context of Salesforce.

$ npm install --save-dev eslint @salesforce/eslint-config-lwc @lwc/eslint-plugin-lwc-platform

Usage

Example of .eslintrc.json:

{
    "plugins": ["@lwc/lwc-platform"],
    "extends": [
        "@salesforce/eslint-config-lwc/recommended",
        "plugin:@lwc/lwc-platform/recommended",
        "plugin:@lwc/lwc-platform/style"
    ]
}

For more details about configuration please refer to the dedicated section in the ESLint documentation: https://eslint.org/docs/user-guide/configuring

Rules

Rule IDDescription
@lwc/lwc-platform/no-aura-libsdisallow import of Aura libraries
@lwc/lwc-platform/no-community-importdisallow import of community-only modules
@lwc/lwc-platform/no-create-context-providerdisallow import of createContextProvider from lwc
@lwc/lwc-platform/no-deprecated-module-importdisallow import of deprecated modules
@lwc/lwc-platform/no-dynamic-importdisallow dynamic import
@lwc/lwc-platform/no-dynamic-import-identifierdisallow dynamic import via identifier
@lwc/lwc-platform/no-dynamic-import-relative-path-stringdisallow relative path dynamic import via string literal
@lwc/lwc-platform/no-auradisallow usage of $A
@lwc/lwc-platform/no-inline-disabledisallow inline disablement of ESLint rule
@lwc/lwc-platform/no-interop-createdisallow import of createComponent from aura
@lwc/lwc-platform/no-interop-dispatchdisallow import of dispatchGlobalEvent from aura
@lwc/lwc-platform/no-interop-executedisallow import of executeGlobalController from aura
@lwc/lwc-platform/no-interop-execute-privilegeddisallow import of unstable_executeGlobalControllerPrivileged from aura
@lwc/lwc-platform/no-interop-execute-raw-responsedisallow import of executeGlobalControllerRawResponse from aura
@lwc/lwc-platform/no-interop-execute-with-callbackdisallow import of executeGlobalControllerWithCallback from aura
@lwc/lwc-platform/no-interop-get-eventdisallow import of getEventDef from aura
@lwc/lwc-platform/no-interop-get-moduledisallow import of getModule from aura
@lwc/lwc-platform/no-interop-is-external-definitiondisallow import of isExternalDefinition from aura
@lwc/lwc-platform/no-interop-module-instrumentationdisallow import of aura-instrumentation
@lwc/lwc-platform/no-interop-module-storagedisallow import of aura-storage
@lwc/lwc-platform/no-interop-registerdisallow import of registerModule from aura
@lwc/lwc-platform/no-interop-renderdisallow import of renderComponent from aura
@lwc/lwc-platform/no-interop-sanitizedisallow import of sanitizeDOM from aura
@lwc/lwc-platform/no-interop-load-definitionsdisallow import of unstable_loadComponentDefs from aura
@lwc/lwc-platform/no-interopdisallow import of aura
@lwc/lwc-platform/no-process-envrestrict usage of the process global object
@lwc/lwc-platform/no-site-importdisallow import of site-only modules
@lwc/lwc-platform/no-wire-servicedisallow import of wire-service
@lwc/lwc-platform/valid-dynamic-import-hintvalidate hint comments usage with dynamic import
@lwc/lwc-platform/valid-offline-wirevalidate components for offline support
@lwc/lwc-platform/no-restricted-namespacesdisallow importing from restricted namespaces

FAQs

Package last updated on 11 Jun 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.