npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lwc/eslint-plugin-lwc-platform

v5.0.0

Published

ESLint rules and configuration of LWC modules used in Salesforce

Downloads

1,533

Readme

@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 ID | Description | | ------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------- | | @lwc/lwc-platform/no-aura-libs | disallow import of Aura libraries | | @lwc/lwc-platform/no-community-import | disallow import of community-only modules | | @lwc/lwc-platform/no-create-context-provider | disallow import of createContextProvider from lwc | | @lwc/lwc-platform/no-deprecated-module-import | disallow import of deprecated modules | | @lwc/lwc-platform/no-dynamic-import | disallow dynamic import | | @lwc/lwc-platform/no-dynamic-import-identifier | disallow dynamic import via identifier | | @lwc/lwc-platform/no-dynamic-import-relative-path-string | disallow relative path dynamic import via string literal | | @lwc/lwc-platform/no-aura | disallow usage of $A | | @lwc/lwc-platform/no-inline-disable | disallow inline disablement of ESLint rule | | @lwc/lwc-platform/no-interop-create | disallow import of createComponent from aura | | @lwc/lwc-platform/no-interop-dispatch | disallow import of dispatchGlobalEvent from aura | | @lwc/lwc-platform/no-interop-execute | disallow import of executeGlobalController from aura | | @lwc/lwc-platform/no-interop-execute-privileged | disallow import of unstable_executeGlobalControllerPrivileged from aura | | @lwc/lwc-platform/no-interop-execute-raw-response | disallow import of executeGlobalControllerRawResponse from aura | | @lwc/lwc-platform/no-interop-get-event | disallow import of getEventDef from aura | | @lwc/lwc-platform/no-interop-get-module | disallow import of getModule from aura | | @lwc/lwc-platform/no-interop-is-external-definition | disallow import of isExternalDefinition from aura | | @lwc/lwc-platform/no-interop-module-instrumentation | disallow import of aura-instrumentation | | @lwc/lwc-platform/no-interop-module-storage | disallow import of aura-storage | | @lwc/lwc-platform/no-interop-register | disallow import of registerModule from aura | | @lwc/lwc-platform/no-interop-render | disallow import of renderComponent from aura | | @lwc/lwc-platform/no-interop-sanitize | disallow import of sanitizeDOM from aura | | @lwc/lwc-platform/no-interop-load-definitions | disallow import of unstable_loadComponentDefs from aura | | @lwc/lwc-platform/no-interop | disallow import of aura | | @lwc/lwc-platform/no-process-env | restrict usage of the process global object | | @lwc/lwc-platform/no-site-import | disallow import of site-only modules | | @lwc/lwc-platform/no-wire-service | disallow import of wire-service | | @lwc/lwc-platform/valid-dynamic-import-hint | validate hint comments usage with dynamic import | | @lwc/lwc-platform/valid-offline-wire | validate components for offline support |