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

@dropbox/eslint-plugin-service-worker

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dropbox/eslint-plugin-service-worker

ESLint rules to report disallowed APIs in service worker environment.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3K
decreased by-6.6%
Maintainers
4
Weekly downloads
 
Created
Source

eslint-plugin-service-worker

ESLint plugin for service worker environment.

Installation

npm install eslint @dropbox/eslint-plugin-service-worker -D

Configuration

// .eslintrc.js
module.exports = {
  ...
  plugin: [
    "@dropbox/service-worker",
  ],
  rules: {
    "@dropbox/service-worker/no-restricted-web-api": "error",
    "@dropbox/service-worker/no-deprecated-extension-api": "error",
    "@dropbox/service-worker/no-dynamic-import": "error",
  },
  ...
}

Rules

no-restricted-web-api

In web extension service worker, certain web APIs will be restricted in use, such as XMLHttpRequest and window API. The rule catch the use of restricted Web APIs in service worker.

no-deprecated-extension-api

As part of Manifest V3 upgrade, certain extension APIs, such as browser.browserAction and browser.pageAction were deprecated. The rule will catch the usage of the deprecated extension APIS in service worker.

no-dynamic-import

Service worker does not allow dynamic import, import(). This rule will catch the usage of dynamic import in service worker.

License

Apache 2.0

Keywords

FAQs

Package last updated on 11 Jul 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