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

@locker/eslint-plugin-locker

v0.22.8

Published

Lightning Web Security ESLint rules

Downloads

25,153

Readme

@locker/eslint-plugin-locker

Lightning Web Security ESLint rules

Installation

$ yarn add --dev eslint @locker/eslint-plugin-locker

Usage

Add @locker/eslint-plugin-locker to the plugins section of your configuration. Then configure the desired rules in the rules section.

Example of .eslintrc:

{
    "plugins": ["@locker/eslint-plugin-locker"],
    "rules": {
        "@locker/locker/blocked-document-properties": "error",
        "@locker/locker/distorted-document-cookie": "warn"
    }
}

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

Configurations

To choose configuration settings, install the @locker/eslint-config-locker sharable configuration package.

Rules

Lightning Web Security

| Rule ID | Description | Fixable Using | | --- | --- | --- | | @locker/locker/distorted-cachestorage-properties | distorted CacheStorage properties | | | @locker/locker/distorted-cookie-store-blocked-properties | disallowed CookieStore properties | | | @locker/locker/distorted-cookie-store-properties | distorted CookieStore properties | | | @locker/locker/distorted-data-transfer-blocked-properties | disallow blocked DataTransfer properties | | | @locker/locker/distorted-document-blocked-properties | disallow blocked Document properties | | | @locker/locker/distorted-document-cookie | distorted document.cookie | | | @locker/locker/distorted-document-domain-setter | distort Document#domain setter | | | @locker/locker/distorted-document-element-replacechildren | distort {Document|Element}.prototype.replaceChildren | | | @locker/locker/distorted-document-exec-command | distorted document.execCommand | | | @locker/locker/distorted-element-attach-shadow | distorted Element.prototype.attachShadow | | | @locker/locker/distorted-element-blocked-properties | disallow blocked Element properties | | | @locker/locker/distorted-element-get-inner-html | distort Element.prototype.getInnerHTML | | | @locker/locker/distorted-element-inner-html-setter | distort Element.prototype.innerHTML setter | | | @locker/locker/distorted-element-insert-adjacent-html | distort Element.prototype.insertAdjacentHTML | | | @locker/locker/distorted-element-outer-html-setter | distort Element.prototype.outerHTML setter | | | @locker/locker/distorted-element-set-attribute | distort Element.prototype.setAttribute APIs | | | @locker/locker/distorted-element-set-html | distort Element.prototype.setHTML | | | @locker/locker/distorted-element-shadow-root-getter | distort Element.prototype.shadowRoot getter | | | @locker/locker/distorted-element-toggle-attribute | distort Element.prototype.toggleAttribute | | | @locker/locker/distorted-html-element-blocked-properties | disallow blocked HTMLElement properties | | | @locker/locker/distorted-html-element-inner-text-setter | distort HTMLElement.prototype.innerText setter | | | @locker/locker/distorted-html-element-outer-text-setter | distort HTMLElement.prototype.outerText setter | | | @locker/locker/distorted-html-embed-object-element-blocked-properties | disallow blocked HTML{Embed|Object}Element properties | | | @locker/locker/distorted-html-iframe-element-blocked-properties | disallow blocked HTMLIFrameElement properties | | | @locker/locker/distorted-html-iframe-script-element-src-setter | distort HTML{IFrame|Script}Element.prototype.src setter | | | @locker/locker/distorted-html-link-element-rel-list-setter | distort HTMLLinkElement.prototype.relList setter | | | @locker/locker/distorted-html-link-element-rel-setter | distort HTMLLinkElement.prototype.rel setter | | | @locker/locker/distorted-named-node-map-set-named-item | distorted NamedNodeMap.prototype.setNamedItem | | | @locker/locker/distorted-navigator-sendbeacon | distorted navigator.sendBeacon | | | @locker/locker/distorted-navigator-service-worker-getter | distorted navigator.serviceWorker getter | | | @locker/locker/distorted-node-insertbefore | distort Node.prototype.insertBefore | | | @locker/locker/distorted-node-removechild | distort Node.prototype.removeChild | | | @locker/locker/distorted-node-replacechild | distort Node.prototype.replaceChild | | | @locker/locker/distorted-node-text-content-setter | distort Node.prototype.textContent setter | | | @locker/locker/distorted-range-create-contextual-fragment | distorted Range.prototype.createContextualFragment | | | @locker/locker/distorted-range-delete-contents | distorted Range.prototype.deleteContents | | | @locker/locker/distorted-range-extract-contents | distorted Range.prototype.extractContents | | | @locker/locker/distorted-range-insertnode | distorted Range.prototype.insertNode | | | @locker/locker/distorted-shared-worker-constructor | distorted SharedWorker constructor | | | @locker/locker/distorted-storage-constructor | distorted Storage constructor | | | @locker/locker/distorted-trusted-type-policy-factory-create-policy | distort TrustedTypePolicyFactory.prototype.createPolicy | | | @locker/locker/distorted-url-create-object-url | distorted URL.createObjectURL | | | @locker/locker/distorted-window-blocked-properties | disallow blocked Window properties | | | @locker/locker/distorted-window-fetch | distorted window.fetch | | | @locker/locker/distorted-window-frames-getter | distorted window.frames getter | | | @locker/locker/distorted-window-length-getter | distorted window.length getter | | | @locker/locker/distorted-window-onstorage-setter | distorted window.onstorage setter | | | @locker/locker/distorted-window-set-interval | distorted window.setInterval | | | @locker/locker/distorted-window-set-timeout | distorted window.setTimeout | | | @locker/locker/distorted-worker-constructor | distorted Worker constructor | | | @locker/locker/distorted-xml-http-request-window-open | distorted {XMLHttpRequest|Window}.prototype.open | | | @locker/locker/distorted-xsltprocessor-transformtodocument | distorted XSLTProcessor.prototype.transformToDocument | | | @locker/locker/distorted-xsltprocessor-transformtofragment | distorted XSLTProcessor.prototype.transformToFragment | | | @locker/locker/undefined-document-all | document.all is undefined | |