Socket
Socket
Sign inDemoInstall

eslint-plugin-react

Package Overview
Dependencies
0
Maintainers
1
Versions
204
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.5.0 to 2.5.1

14

History.md

@@ -0,1 +1,15 @@

2.5.1 / 2015-06-14
==================
* update dependencies
* fix prop-types crash when propTypes definition is invalid ([#95][])
* fix jsx-uses-vars for ES6 classes ([#96][])
* fix hasOwnProperty that is taken for a prop ([#102][])
* documentation improvements ([#99][] @morenoh149)
[#95]: https://github.com/yannickcr/eslint-plugin-react/issues/95
[#96]: https://github.com/yannickcr/eslint-plugin-react/issues/96
[#102]: https://github.com/yannickcr/eslint-plugin-react/issues/102
[#99]: https://github.com/yannickcr/eslint-plugin-react/pull/99
2.5.0 / 2015-06-04

@@ -2,0 +16,0 @@ ==================

8

lib/rules/prop-types.js

@@ -129,2 +129,6 @@ /**

case 'direct':
// Ignore Object methods
if (Object.prototype[node.parent.property.name]) {
break;
}
usedPropTypes.push({

@@ -166,3 +170,3 @@ name: node.parent.property.name,

switch (propTypes.type) {
switch (propTypes && propTypes.type) {
case 'ObjectExpression':

@@ -177,2 +181,4 @@ for (var i = 0, j = propTypes.properties.length; i < j; i++) {

break;
case null:
break;
default:

@@ -179,0 +185,0 @@ ignorePropsValidation = true;

8

lib/util/variable.js

@@ -10,5 +10,2 @@ /**

*
* Similar to the one coming from ESLint but with a patch for babel-eslint
* to avoid https://github.com/babel/babel-eslint/issues/21
*
* @param {String} name The name of the variable to mark as used.

@@ -26,5 +23,2 @@ * @returns {Boolean} True if the variable was found and marked as used, false if not.

scope = scope.childScopes[0];
if (scope.childScopes.length) {
scope = scope.childScopes[0];
}
}

@@ -35,3 +29,3 @@

for (i = 0, len = variables.length; i < len; i++) {
if (variables[i].name === name) {
if (variables[i].name === name && scope.type !== 'class') {
variables[i].eslintUsed = true;

@@ -38,0 +32,0 @@ return true;

{
"name": "eslint-plugin-react",
"version": "2.5.0",
"version": "2.5.1",
"author": "Yannick Croissant <yannick.croissant+npm@gmail.com>",

@@ -26,7 +26,7 @@ "description": "React specific linting rules for ESLint",

"devDependencies": {
"babel-eslint": "3.1.9",
"babel-eslint": "3.1.15",
"coveralls": "2.11.2",
"eslint": "0.22.1",
"eslint-tester": "0.7.0",
"istanbul": "0.3.14",
"istanbul": "0.3.15",
"mocha": "2.2.5"

@@ -33,0 +33,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc