From 887ece399b4d7c1948338187c1996efd01065258 Mon Sep 17 00:00:00 2001 From: Chris Cowan Date: Thu, 18 Feb 2016 14:02:49 -0800 Subject: [PATCH] Fix linting warnings. --- .eslintrc | 6 ++++-- demo/app.js | 13 ++++++------- package.json | 6 +++--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.eslintrc b/.eslintrc index 35fa3df..7b782ad 100644 --- a/.eslintrc +++ b/.eslintrc @@ -62,10 +62,12 @@ "space-before-blocks": 1, "no-empty": 1, - "space-before-function-parentheses": [1, "never"], + "space-before-function-paren": [1, "never"], "wrap-iife": 1, - "space-in-brackets": [1, "never"], + "object-curly-spacing": [1, "never"], + "array-bracket-spacing": [1, "never"], + "computed-property-spacing": [1, "never"], "space-in-parens": [1, "never"], "space-infix-ops": 1, diff --git a/demo/app.js b/demo/app.js index 5756099..ce34414 100644 --- a/demo/app.js +++ b/demo/app.js @@ -5,8 +5,8 @@ import ReactDom from 'react-dom'; import Shuffle from '../src/Shuffle'; const alphabet = [ - 'a','b','c','d','e','f','g','h','i','j','k','l','m', - 'n','o','p','q','r','s','t','u','v','w','x','y','z'] + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] const App = React.createClass({ getInitialState() { @@ -17,8 +17,8 @@ const App = React.createClass({ }, filterChildren() { if (this.state.filtered === false) { - let newChildren = this.state.children.filter(function(child,index){ - if (index % 2 ===0) { + let newChildren = this.state.children.filter(function(child, index) { + if (index % 2 === 0) { return child } }); @@ -38,11 +38,11 @@ const App = React.createClass({
- {this.state.children.map(function(letter){ + {this.state.children.map(function(letter) { return (
+ src={ 'http://placehold.it/100x100&text=' + letter } />
) })} @@ -55,4 +55,3 @@ const App = React.createClass({ const content = document.getElementById('content'); ReactDom.render(, content) - diff --git a/package.json b/package.json index e60496c..6b02a30 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,9 @@ "chai": "^3.3.0", "css-loader": "^0.19.0", "del": "^2.0.2", - "eslint": "^1.6.0", - "eslint-loader": "^1.0.0", - "eslint-plugin-react": "^3.5.1", + "eslint": "^1.10.3", + "eslint-loader": "^1.3.0", + "eslint-plugin-react": "^3.16.1", "gulp": "^3.9.0", "gulp-babel": "^5.2.1", "gulp-eslint": "^1.0.0",