eslint-plugin-react
Advanced tools
Comparing version 3.3.0 to 3.3.1
@@ -72,3 +72,7 @@ /** | ||
if (node.attributes.length) { | ||
lastProp = context.getFirstToken(node.attributes[node.attributes.length - 1]).loc.start; | ||
lastProp = node.attributes[node.attributes.length - 1]; | ||
lastProp = { | ||
column: context.getFirstToken(lastProp).loc.start.column, | ||
line: context.getLastToken(lastProp).loc.end.line | ||
}; | ||
} | ||
@@ -75,0 +79,0 @@ return { |
{ | ||
"name": "eslint-plugin-react", | ||
"version": "3.3.0", | ||
"version": "3.3.1", | ||
"author": "Yannick Croissant <yannick.croissant+npm@gmail.com>", | ||
@@ -26,7 +26,7 @@ "description": "React specific linting rules for ESLint", | ||
"devDependencies": { | ||
"babel-eslint": "4.1.0", | ||
"babel-eslint": "4.1.1", | ||
"coveralls": "2.11.4", | ||
"eslint": "1.2.1", | ||
"istanbul": "0.3.18", | ||
"mocha": "2.2.5" | ||
"eslint": "1.3.1", | ||
"istanbul": "0.3.19", | ||
"mocha": "2.3.0" | ||
}, | ||
@@ -33,0 +33,0 @@ "keywords": [ |
@@ -12,7 +12,11 @@ ESLint-plugin-React | ||
npm install eslint | ||
```sh | ||
$ npm install eslint | ||
``` | ||
If you installed `ESLint` globally, you have to install React plugin globally too. Otherwise, install it locally. | ||
$ npm install eslint-plugin-react | ||
```sh | ||
$ npm install eslint-plugin-react | ||
``` | ||
@@ -50,4 +54,4 @@ # Configuration | ||
"react/jsx-curly-spacing": 1, | ||
"react/jsx-indent-props": 1, | ||
"react/jsx-max-props-per-line": 1, | ||
"react/jsx-indent-props": 1, | ||
"react/jsx-no-duplicate-props": 1, | ||
@@ -61,6 +65,6 @@ "react/jsx-no-undef": 1, | ||
"react/no-danger": 1, | ||
"react/no-set-state": 1, | ||
"react/no-did-mount-set-state": 1, | ||
"react/no-did-update-set-state": 1, | ||
"react/no-multi-comp": 1, | ||
"react/no-set-state": 1, | ||
"react/no-unknown-property": 1, | ||
@@ -79,8 +83,8 @@ "react/prop-types": 1, | ||
* [display-name](docs/rules/display-name.md): Prevent missing displayName in a React component definition | ||
* [display-name](docs/rules/display-name.md): Prevent missing `displayName` in a React component definition | ||
* [jsx-boolean-value](docs/rules/jsx-boolean-value.md): Enforce boolean attributes notation in JSX | ||
* [jsx-closing-bracket-location](docs/rules/jsx-closing-bracket-location.md): Validate closing bracket location in JSX | ||
* [jsx-curly-spacing](docs/rules/jsx-curly-spacing.md): Enforce or disallow spaces inside of curly braces in JSX attributes | ||
* [jsx-indent-props](docs/rules/jsx-indent-props.md): Validate props indentation in JSX | ||
* [jsx-max-props-per-line](docs/rules/jsx-max-props-per-line.md): Limit maximum of props on a single line in JSX | ||
* [jsx-indent-props](docs/rules/jsx-indent-props.md): Validate props indentation in JSX | ||
* [jsx-no-duplicate-props](docs/rules/jsx-no-duplicate-props.md): Prevent duplicate props in JSX | ||
@@ -95,9 +99,9 @@ * [jsx-no-literals](docs/rules/jsx-no-literals.md): Prevent usage of unwrapped JSX strings | ||
* [no-danger](docs/rules/no-danger.md): Prevent usage of dangerous JSX properties | ||
* [no-set-state](docs/rules/no-set-state.md): Prevent usage of setState | ||
* [no-did-mount-set-state](docs/rules/no-did-mount-set-state.md): Prevent usage of setState in componentDidMount | ||
* [no-did-update-set-state](docs/rules/no-did-update-set-state.md): Prevent usage of setState in componentDidUpdate | ||
* [no-did-mount-set-state](docs/rules/no-did-mount-set-state.md): Prevent usage of `setState` in `componentDidMount` | ||
* [no-did-update-set-state](docs/rules/no-did-update-set-state.md): Prevent usage of `setState` in `componentDidUpdate` | ||
* [no-multi-comp](docs/rules/no-multi-comp.md): Prevent multiple component definition per file | ||
* [no-set-state](docs/rules/no-set-state.md): Prevent usage of `setState` | ||
* [no-unknown-property](docs/rules/no-unknown-property.md): Prevent usage of unknown DOM property | ||
* [prop-types](docs/rules/prop-types.md): Prevent missing props validation in a React component definition | ||
* [react-in-jsx-scope](docs/rules/react-in-jsx-scope.md): Prevent missing React when using JSX | ||
* [react-in-jsx-scope](docs/rules/react-in-jsx-scope.md): Prevent missing `React` when using JSX | ||
* [require-extension](docs/rules/require-extension.md): Restrict file extensions that may be required | ||
@@ -104,0 +108,0 @@ * [self-closing-comp](docs/rules/self-closing-comp.md): Prevent extra closing tags for components without children |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
118393
2793
139