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

eslint-plugin-no-use-extend-native

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-no-use-extend-native

ESLint plugin to prevent use of extended native objects

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

eslint-plugin-no-use-extend-native

NPM version Build Status Coverage Status

Code Climate Dependencies DevDependencies

ESLint plugin to prevent use of extended native objects

Uses Sindre Sorhus's proto-props

Install

First, install ESLint via

npm install --save-dev eslint

Then install eslint-plugin-no-use-extend-native

npm install --save-dev eslint-plugin-no-use-extend-native

Usage

In your .eslintrc file add the plugin as such:

{
  plugins: [
    'no-use-extend-native'
  ]
}

To modify the single rule, no-use-extend-native, add the rule to your .eslintrc as such:

{
  plugins: [
    'no-use-extend-native'
  ],
  rules: {
    'no-use-extend-native/no-use-extend-native': 0
  }
}

The default value is 2.

With this plugin enabled, ESLint will find issues with using extended native objects:

var colors = require('colors');
console.log('unicorn'.green);
// => ESLint will give an error stating 'Avoid using extended native objects'

[].customFunction();
// => ESLint will give an error stating 'Avoid using extended native objects'

More examples can be seen in the tests.

LICENSE

MIT © Dustin Specker

Keywords

FAQs

Package last updated on 03 Nov 2015

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