Skip to content

Commit

Permalink
Merge pull request facebook#5352 from chicoxyzzy/eslint-upgrade
Browse files Browse the repository at this point in the history
remove eslint-disable when possible and update babel-eslint version
  • Loading branch information
zpao committed Nov 5, 2015
2 parents e131357 + b9fd77a commit 9b7cc43
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 19 deletions.
4 changes: 1 addition & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down
2 changes: 1 addition & 1 deletion grunt/tasks/jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
"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",
"coffee-script": "^1.8.0",
"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",
Expand Down
2 changes: 0 additions & 2 deletions src/isomorphic/classic/class/ReactClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -690,7 +689,6 @@ function bindAutoBindMethod(component, method) {
reboundMethod.__reactBoundMethod = method;
reboundMethod.__reactBoundArguments = args;
return reboundMethod;
/* eslint-enable */
};
}
return boundMethod;
Expand Down
2 changes: 0 additions & 2 deletions src/renderers/dom/client/validateDOMNesting.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,29 +218,28 @@ 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];
var id = readableIDToID[readableID];
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;
Expand Down

0 comments on commit 9b7cc43

Please sign in to comment.