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 1.4.0 to 1.4.1

8

History.md

@@ -0,1 +1,9 @@

1.4.1 / 2015-03-03
==================
* fix this.props.children marked as missing in props validation ([#7][])
* fix usage of this.props without property ([#8][])
[#7]: https://github.com/yannickcr/eslint-plugin-react/issues/7
[#8]: https://github.com/yannickcr/eslint-plugin-react/issues/8
1.4.0 / 2015-02-24

@@ -2,0 +10,0 @@ ==================

2

lib/rules/jsx-uses-react.js
/**
* @fileoverview Count <Jsx /> as use of the React variable
* @fileoverview Prevent React to be marked as unused
* @author Glen Mailer

@@ -4,0 +4,0 @@ */

@@ -34,3 +34,3 @@ /**

'MemberExpression': function(node) {
if (node.object.type !== 'ThisExpression' || node.property.name !== 'props') {
if (node.object.type !== 'ThisExpression' || node.property.name !== 'props' || !node.parent.property) {
return;

@@ -65,3 +65,3 @@ }

for (var i = 0, j = usedPropTypes.length; i < j; i++) {
if (declaredPropTypes.indexOf(usedPropTypes[i]) === -1) {
if (declaredPropTypes.indexOf(usedPropTypes[i]) === -1 && usedPropTypes[i] !== 'children') {
context.report(node, '\'' + usedPropTypes[i] + '\' is missing in props validation');

@@ -68,0 +68,0 @@ }

/**
* @fileoverview Validate that React is in scope when using JSX.
* @fileoverview Prevent missing React when using JSX
* @author Glen Mailer

@@ -4,0 +4,0 @@ */

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

@@ -5,0 +5,0 @@ "description": "React specific linting rules for ESLint",

@@ -67,4 +67,4 @@ ESLint-plugin-React

* [no-did-update-set-state](docs/rules/no-did-update-set-state.md): Prevent usage of setState in componentDidUpdate
* [jsx-uses-react](docs/rules/jsx-uses-react.md): Make JSX count towards use of a declared variable
* [react-in-jsx-scope](docs/rules/react-in-jsx-scope.md): Prevent errors from not requiring React when using JSX
* [jsx-uses-react](docs/rules/jsx-uses-react.md): Prevent React to be incorrectly marked as unused
* [react-in-jsx-scope](docs/rules/react-in-jsx-scope.md): Prevent missing React when using JSX

@@ -71,0 +71,0 @@ ## To Do

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