remove eslint-disable when possible and update eslint version
chico committed
Nov 1, 2015 at 04:36 UTC
8987522a2af58662903422df0301a70694a2a5e1
7 files changed
+11
-18
Gruntfile.js
+2
-4
@@ -23,9 +23,7 @@ module.exports = function(grunt) {
23
'./examples/shared/*.js',
24
'.module-cache',
25
],
26
- /*eslint-disable camelcase */
27
- compare_size: require('./grunt/config/compare_size'),
28
- /*eslint-enable camelcase */
26
+ 'compare-size': require('./grunt/config/compare-size'),
27
});
28
29
grunt.config.set('compress', require('./grunt/config/compress'));
@@ -135,7 +133,7 @@ module.exports = function(grunt) {
133
'npm-react-dom:pack',
134
'npm-react-addons:release',
135
'npm-react-addons:pack',
138
- 'compare_size',
136
+ 'compare-size',
137
]);
138
139
// Automate the release!
grunt/config/compare-size.js
renamed
grunt/tasks/jsx.js
+1
-1
@@ -26,7 +26,7 @@ module.exports = function() {
26
});
27
28
args.push.apply(args, rootIDs);
29
- args.push('--config' /* from stdin */);
29
+ args.push('--config'/* from stdin */);
30
31
var child = spawn({
32
cmd: 'node',
package.json
+1
-1
@@ -4,7 +4,7 @@
4
"version": "0.15.0-alpha",
5
"devDependencies": {
6
"babel": "^5.8.29",
7
- "babel-eslint": "4.1.3",
7
+ "babel-eslint": "4.1.4",
8
"benchmark": "^1.0.0",
9
"browserify": "^12.0.1",
10
"bundle-collapser": "^1.1.1",
src/isomorphic/classic/class/ReactClass.js
-2
@@ -663,7 +663,6 @@ function bindAutoBindMethod(component, method) {
663
boundMethod.__reactBoundArguments = null;
664
var componentName = component.constructor.displayName;
665
var _bind = boundMethod.bind;
666
- /* eslint-disable block-scoped-var, no-undef */
666
boundMethod.bind = function(newThis, ...args) {
667
// User is trying to bind() an autobound method; we effectively will
668
// ignore the value of "this" that the user is trying to use, so
@@ -690,7 +689,6 @@ function bindAutoBindMethod(component, method) {
689
reboundMethod.__reactBoundMethod = method;
690
reboundMethod.__reactBoundArguments = args;
691
return reboundMethod;
693
- /* eslint-enable */
692
};
693
}
694
return boundMethod;
src/renderers/dom/client/validateDOMNesting.js
-2
@@ -310,9 +310,7 @@ if (__DEV__) {
310
}
311
312
var stack = [];
313
- /*eslint-disable space-after-keywords */
313
do {
315
- /*eslint-enable space-after-keywords */
314
stack.push(instance);
315
} while ((instance = instance._currentElement._owner));
316
stack.reverse();
src/renderers/shared/event/eventPlugins/__tests__/ResponderEventPlugin-test.js
+7
-8
@@ -218,7 +218,7 @@ var registerTestHandlers = function(eventTestConfig, readableIDToID) {
218
'\nFor event test config:\n' + JSON.stringify(eventTestConfig) + '\n'
219
);
220
};
221
- /*eslint-disable no-loop-func, no-shadow */
221
+
222
var registerOneEventType = function(registrationName, eventTypeTestConfig) {
223
for (var readableID in eventTypeTestConfig) {
224
var nodeConfig = eventTypeTestConfig[readableID];
@@ -226,21 +226,20 @@ var registerTestHandlers = function(eventTestConfig, readableIDToID) {
226
var handler = nodeConfig.order === NA ? neverFire.bind(null, readableID, registrationName) :
227
// We partially apply readableID and nodeConfig, as they change in the
228
// parent closure across iterations.
229
- function(readableID, nodeConfig, e) {
229
+ function(rID, config, e) {
230
expect(
231
- readableID + '->' + registrationName + ' index:' + runs.dispatchCount++
231
+ rID + '->' + registrationName + ' index:' + runs.dispatchCount++
232
).toBe(
233
- readableID + '->' + registrationName + ' index:' + nodeConfig.order
233
+ rID + '->' + registrationName + ' index:' + config.order
234
);
235
- if (nodeConfig.assertEvent) {
236
- nodeConfig.assertEvent(e);
235
+ if (config.assertEvent) {
236
+ config.assertEvent(e);
237
}
238
- return nodeConfig.returnVal;
238
+ return config.returnVal;
239
}.bind(null, readableID, nodeConfig);
240
EventPluginHub.putListener(idToInstance[id], registrationName, handler);
241
}
242
};
243
- /*eslint-enable no-loop-func, no-shadow */
243
for (var eventName in eventTestConfig) {
244
var oneEventTypeTestConfig = eventTestConfig[eventName];
245
var hasTwoPhase = !!oneEventTypeTestConfig.bubbled;