Socket
Socket
Sign inDemoInstall

eslint-plugin-react

Package Overview
Dependencies
Maintainers
1
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

10

History.md

@@ -0,1 +1,11 @@

2.1.1 / 2015-04-17
==================
* add support for classes static properties ([#43][])
* add tests for the babel-eslint parser
* add ESLint as peerDependency (@AlexKVal)
* documentation improvements (@AlexKVal, @chriscalo)
[#43]: https://github.com/yannickcr/eslint-plugin-react/issues/43
2.1.0 / 2015-04-06

@@ -2,0 +12,0 @@ ==================

@@ -40,2 +40,13 @@ /**

function isDisplayNameDeclaration(node) {
// Special case for class properties
// (babel-eslint does not expose property name so we have to rely on tokens)
if (node.type === 'ClassProperty') {
var tokens = context.getFirstTokens(node, 2);
if (tokens[0].value === 'displayName' || tokens[1].value === 'displayName') {
return true;
}
return false;
}
return Boolean(

@@ -76,2 +87,10 @@ node &&

ClassProperty: function(node) {
if (!isDisplayNameDeclaration(node)) {
return;
}
markDisplayNameAsDeclared(node);
},
MemberExpression: function(node) {

@@ -78,0 +97,0 @@ if (!isDisplayNameDeclaration(node.property)) {

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

// As for exceptions for props.children or props.className (and alike) look at
// https://github.com/yannickcr/eslint-plugin-react/issues/7
var componentUtil = require('../util/component');

@@ -43,2 +46,13 @@ var ComponentList = componentUtil.List;

function isPropTypesDeclaration(node) {
// Special case for class properties
// (babel-eslint does not expose property name so we have to rely on tokens)
if (node.type === 'ClassProperty') {
var tokens = context.getFirstTokens(node, 2);
if (tokens[0].value === 'propTypes' || tokens[1].value === 'propTypes') {
return true;
}
return false;
}
return Boolean(

@@ -48,2 +62,3 @@ node &&

);
}

@@ -201,2 +216,10 @@

ClassProperty: function(node) {
if (!isPropTypesDeclaration(node)) {
return;
}
markPropTypesAsDeclared(node, node.value);
},
MemberExpression: function(node) {

@@ -203,0 +226,0 @@ var type;

14

package.json
{
"name": "eslint-plugin-react",
"version": "2.1.0",
"version": "2.1.1",
"author": "Yannick Croissant <yannick.croissant+npm@gmail.com>",

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

"devDependencies": {
"babel-eslint": "3.0.1",
"coveralls": "2.11.2",
"eslint": "0.18",
"eslint-tester": "0.6.0",
"istanbul": "0.3.11",
"mocha": "2.2.1"
"eslint": "0.19.0",
"eslint-tester": "eslint/eslint-tester#c2a1f722cd",
"istanbul": "0.3.13",
"mocha": "2.2.4"
},
"peerDependencies": {
"eslint": ">=0.8.0"
},
"keywords": [

@@ -34,0 +38,0 @@ "eslint-plugin",

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