Package Exports
- eslint-plugin-no-use-extend-native
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-plugin-no-use-extend-native) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
eslint-plugin-no-use-extend-native
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