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

@locker/eslint-plugin-locker

Package Overview
Dependencies
Maintainers
8
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@locker/eslint-plugin-locker

Lightning Web Security ESLint rules

  • 0.15.13
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.7K
decreased by-2%
Maintainers
8
Weekly downloads
 
Created
Source

@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 IDDescriptionFixable Using
@locker/locker/distorted-cookie-store-blocked-propertiesdisallowed CookieStore properties
@locker/locker/distorted-cookie-store-propertiesdistorted CookieStore properties
@locker/locker/distorted-custom-element-registry-blocked-propertiesdisallow blocked CustomElementRegistry properties
@locker/locker/distorted-custom-element-registry-propertiesdistorted CustomElementRegistry properties
@locker/locker/distorted-document-blocked-propertiesdisallow blocked Document properties
@locker/locker/distorted-document-cookiedistorted document.cookie
@locker/locker/distorted-document-domain-setterdistort Document#domain setter
@locker/locker/distorted-document-element-replacechildrendistort {DocumentElement}.prototype.replaceChildren
@locker/locker/distorted-document-exec-commanddistorted document.execCommand
@locker/locker/distorted-element-attach-shadowdistorted Element.prototype.attachShadow
@locker/locker/distorted-element-attributes-getterdistort Element.prototype.attributes getter
@locker/locker/distorted-element-blocked-propertiesdisallow blocked Element properties
@locker/locker/distorted-element-inner-html-setterdistort Element.prototype.innerHTML setter
@locker/locker/distorted-element-insert-adjacent-htmldistort Element.prototype.insertAdjacentHTML
@locker/locker/distorted-element-outer-html-setterdistort Element.prototype.outerHTML setter
@locker/locker/distorted-element-set-attributedistort Element.prototype.setAttribute APIs
@locker/locker/distorted-element-shadow-root-getterdistort Element.prototype.shadowRoot getter
@locker/locker/distorted-element-toggle-attributedistort Element.prototype.toggleAttribute
@locker/locker/distorted-html-frame-iframe-object-element-content-document-getterdistort HTML{FrameIFrame
@locker/locker/distorted-html-frame-iframe-object-element-content-window-getterdistort HTML{FrameIFrame
@locker/locker/distorted-html-element-blocked-propertiesdisallow blocked HTMLElement properties
@locker/locker/distorted-html-element-inner-text-setterdistort HTMLElement.prototype.innerText setter
@locker/locker/distorted-html-element-outer-text-setterdistort HTMLElement.prototype.outerText setter
@locker/locker/distorted-html-embed-object-element-blocked-propertiesdisallow blocked HTML{EmbedObject}Element properties
@locker/locker/distorted-html-iframe-element-blocked-propertiesdisallow blocked HTMLIFrameElement properties
@locker/locker/distorted-html-iframe-script-element-src-setterdistort HTML{IFrameScript}Element.prototype.src setter
@locker/locker/distorted-html-link-element-rel-list-setterdistort HTMLLinkElement.prototype.relList setter
@locker/locker/distorted-html-link-element-rel-setterdistort HTMLLinkElement.prototype.rel setter
@locker/locker/distorted-message-event-source-getterdistort MessageEvent.prototype.source getter
@locker/locker/distorted-named-node-map-set-named-itemdistorted NamedNodeMap.prototype.setNamedItem
@locker/locker/distorted-navigator-sendbeacondistorted navigator.sendBeacon
@locker/locker/distorted-navigator-service-worker-getterdistorted navigator.serviceWorker getter
@locker/locker/distorted-node-insertbeforedistort Node.prototype.insertBefore
@locker/locker/distorted-node-removechilddistort Node.prototype.removeChild
@locker/locker/distorted-node-replacechilddistort Node.prototype.replaceChild
@locker/locker/distorted-node-text-content-setterdistort Node.prototype.textContent setter
@locker/locker/distorted-range-create-contextual-fragmentdistorted Range.prototype.createContextualFragment
@locker/locker/distorted-range-delete-contentsdistorted Range.prototype.deleteContents
@locker/locker/distorted-range-extract-contentsdistorted Range.prototype.extractContents
@locker/locker/distorted-range-insertnodedistorted Range.prototype.insertNode
@locker/locker/distorted-shadow-root-mode-getterdistorted ShadowRoot.prototype.mode getter
@locker/locker/distorted-shared-worker-constructordistorted SharedWorker constructor
@locker/locker/distorted-storage-constructordistorted Storage constructor
@locker/locker/distorted-trusted-type-policy-factory-create-policydistort TrustedTypePolicyFactory.prototype.createPolicy
@locker/locker/distorted-url-create-object-urldistorted URL.createObjectURL
@locker/locker/distorted-window-fetchdistorted window.fetch
@locker/locker/distorted-window-frames-getterdistorted window.frames getter
@locker/locker/distorted-window-onstorage-setterdistorted window.onstorage setter
@locker/locker/distorted-window-opener-getterdistorted window.opener getter
@locker/locker/distorted-window-parent-getterdistorted window.parent getter
@locker/locker/distorted-window-set-intervaldistorted window.setInterval
@locker/locker/distorted-window-set-timeoutdistorted window.setTimeout
@locker/locker/distorted-worker-constructordistorted Worker constructor
@locker/locker/distorted-xml-http-request-window-opendistorted {XMLHttpRequestWindow}.prototype.open
@locker/locker/distorted-xsltprocessor-transformtodocumentdistorted XSLTProcessor.prototype.transformToDocument
@locker/locker/distorted-xsltprocessor-transformtofragmentdistorted XSLTProcessor.prototype.transformToFragment
@locker/locker/no-export-platform-resource-loaderdisallow export from 'lightning/platformResourceLoader'
@locker/locker/uncompiled-empty-window-locationwindow.location is empty@locker/rollup-plugin
@locker/locker/uncompiled-no-async-awaitdisallow 'async await' syntax usage@locker/rollup-plugin
@locker/locker/uncompiled-no-dynamic-importdisallow dynamic 'import'@locker/rollup-plugin
@locker/locker/uncompiled-null-document-locationdocument.location is null@locker/rollup-plugin
@locker/locker/uncompiled-null-window-topwindow.top is null--fix or @locker/rollup-plugin
@locker/locker/undefined-document-alldocument.all is undefined

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