Socket
Book a DemoInstallSign in
Socket

eslint-plugin-builtin-compat

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-builtin-compat

Checks built-in objects compatibility

0.0.2
latest
Source
npmnpm
Version published
Weekly downloads
502
-65.09%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-builtin-compat

Checks built-in methods compatibility. It uses browser-compat-data to determine incompatible method calls.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-builtin-compat:

$ npm install eslint-plugin-builtin-compat --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-builtin-compat globally.

Usage

Add builtin-compat to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["builtin-compat"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "builtin-compat/no-incompatible-builtins": 2
  }
}

You can ignore certain built-ins, usually after adding a polyfill:

{
  "settings": {
    "builtin-compat-ignore": ["assign", "startsWith"]
  }
}

Configure supported browsers in package.json (see browserslist):

{
  "browserslist": ["last 1 versions", "not ie <= 8"]
}

Contributing

Contributions are welcome! Just open an issues with any idea or pull-request if it is no-brainer. Make sure all tests and linting rules pass.

Keywords

eslint

FAQs

Package last updated on 06 Apr 2018

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.