Socket
Socket
Sign inDemoInstall

eslint-plugin-document-write

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-document-write

ESLint plugin to disallow document.write[ln]()


Version published
Weekly downloads
54
decreased by-35.71%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-document-write

ESLint plugin to disallow document.write() and document.writeln().

Install

$ npm install --save-dev eslint eslint-plugin-document-write

or

$ yarn add --dev eslint eslint-plugin-document-write

Usage

Like other ESLint plugins,

  • add document-write/no-document-write in the rules.
  • add "document-write" in the plugins.
{
  // ...
  "rules": {
    "document-write/no-document-write": "error"
  },
  "plugins": [ "document-write" ]
}

Why

There are a lot of limitation in document.write() and document.writeln() in recent browsers. For example, you cannot use document.write() and document.writeln()in deferred (<script defer ...>) and asynchronous (<script async ...>) scripts. See MDN for other limitations.

License

MIT

Keywords

FAQs

Package last updated on 23 Oct 2021

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