diff --git a/Gruntfile.js b/Gruntfile.js index 570e18f709..e04bf05524 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -23,9 +23,7 @@ module.exports = function(grunt) { './examples/shared/*.js', '.module-cache', ], - /*eslint-disable camelcase */ - compare_size: require('./grunt/config/compare_size'), - /*eslint-enable camelcase */ + 'compare_size': require('./grunt/config/compare_size'), }); grunt.config.set('compress', require('./grunt/config/compress')); diff --git a/grunt/tasks/jsx.js b/grunt/tasks/jsx.js index 3132114db3..d2140bdcdb 100644 --- a/grunt/tasks/jsx.js +++ b/grunt/tasks/jsx.js @@ -26,7 +26,7 @@ module.exports = function() { }); args.push.apply(args, rootIDs); - args.push('--config' /* from stdin */); + args.push('--config'); var child = spawn({ cmd: 'node', diff --git a/package.json b/package.json index 39af9e80aa..cb962cffca 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "0.15.0-alpha", "devDependencies": { "babel": "^5.8.29", - "babel-eslint": "4.1.3", + "babel-eslint": "4.1.4", "benchmark": "^1.0.0", "browserify": "^12.0.1", "bundle-collapser": "^1.1.1", @@ -12,8 +12,8 @@ "del": "^1.2.0", "derequire": "^2.0.3", "envify": "^3.0.0", - "eslint": "1.7.3", - "eslint-plugin-react": "3.6.3", + "eslint": "1.8.0", + "eslint-plugin-react": "3.7.0", "eslint-plugin-react-internal": "file:eslint-rules", "fbjs": "^0.4.0", "fbjs-scripts": "^0.3.0", diff --git a/src/isomorphic/classic/class/ReactClass.js b/src/isomorphic/classic/class/ReactClass.js index 4acab6b64c..c606d625c2 100644 --- a/src/isomorphic/classic/class/ReactClass.js +++ b/src/isomorphic/classic/class/ReactClass.js @@ -663,7 +663,6 @@ function bindAutoBindMethod(component, method) { boundMethod.__reactBoundArguments = null; var componentName = component.constructor.displayName; var _bind = boundMethod.bind; - /* eslint-disable block-scoped-var, no-undef */ boundMethod.bind = function(newThis, ...args) { // User is trying to bind() an autobound method; we effectively will // ignore the value of "this" that the user is trying to use, so @@ -690,7 +689,6 @@ function bindAutoBindMethod(component, method) { reboundMethod.__reactBoundMethod = method; reboundMethod.__reactBoundArguments = args; return reboundMethod; - /* eslint-enable */ }; } return boundMethod; diff --git a/src/renderers/dom/client/validateDOMNesting.js b/src/renderers/dom/client/validateDOMNesting.js index 13e5be2212..d853990b01 100644 --- a/src/renderers/dom/client/validateDOMNesting.js +++ b/src/renderers/dom/client/validateDOMNesting.js @@ -310,9 +310,7 @@ if (__DEV__) { } var stack = []; - /*eslint-disable space-after-keywords */ do { - /*eslint-enable space-after-keywords */ stack.push(instance); } while ((instance = instance._currentElement._owner)); stack.reverse(); diff --git a/src/renderers/shared/event/eventPlugins/__tests__/ResponderEventPlugin-test.js b/src/renderers/shared/event/eventPlugins/__tests__/ResponderEventPlugin-test.js index e9a640e6d3..a4803c0b10 100644 --- a/src/renderers/shared/event/eventPlugins/__tests__/ResponderEventPlugin-test.js +++ b/src/renderers/shared/event/eventPlugins/__tests__/ResponderEventPlugin-test.js @@ -218,7 +218,7 @@ var registerTestHandlers = function(eventTestConfig, readableIDToID) { '\nFor event test config:\n' + JSON.stringify(eventTestConfig) + '\n' ); }; - /*eslint-disable no-loop-func, no-shadow */ + var registerOneEventType = function(registrationName, eventTypeTestConfig) { for (var readableID in eventTypeTestConfig) { var nodeConfig = eventTypeTestConfig[readableID]; @@ -226,21 +226,20 @@ var registerTestHandlers = function(eventTestConfig, readableIDToID) { var handler = nodeConfig.order === NA ? neverFire.bind(null, readableID, registrationName) : // We partially apply readableID and nodeConfig, as they change in the // parent closure across iterations. - function(readableID, nodeConfig, e) { + function(rID, config, e) { expect( - readableID + '->' + registrationName + ' index:' + runs.dispatchCount++ + rID + '->' + registrationName + ' index:' + runs.dispatchCount++ ).toBe( - readableID + '->' + registrationName + ' index:' + nodeConfig.order + rID + '->' + registrationName + ' index:' + config.order ); - if (nodeConfig.assertEvent) { - nodeConfig.assertEvent(e); + if (config.assertEvent) { + config.assertEvent(e); } - return nodeConfig.returnVal; + return config.returnVal; }.bind(null, readableID, nodeConfig); EventPluginHub.putListener(idToInstance[id], registrationName, handler); } }; - /*eslint-enable no-loop-func, no-shadow */ for (var eventName in eventTestConfig) { var oneEventTypeTestConfig = eventTestConfig[eventName]; var hasTwoPhase = !!oneEventTypeTestConfig.bubbled;