mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Add indent lint rule, fix code
This commit is contained in:
@@ -26,6 +26,7 @@ rules:
|
||||
no-unused-vars: [2, args: none]
|
||||
quotes: [2, 'single']
|
||||
space-before-blocks: 2
|
||||
indent: [2, 2, indentSwitchCase: true]
|
||||
|
||||
# WARNINGS
|
||||
# This is the only one that's hard to track since we don't lint just changes.
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
var keyOf = require('keyOf');
|
||||
var keyOf = require('keyOf');
|
||||
|
||||
/**
|
||||
* Module that is injectable into `EventPluginHub`, that specifies a
|
||||
|
||||
@@ -132,8 +132,8 @@ var ReactDOMIDOperations = {
|
||||
* @see {Danger.dangerouslyReplaceNodeWithMarkup}
|
||||
*/
|
||||
dangerouslyReplaceNodeWithMarkupByID: function(id, markup) {
|
||||
var node = ReactMount.getNode(id);
|
||||
DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup);
|
||||
var node = ReactMount.getNode(id);
|
||||
DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -202,7 +202,7 @@ var ReactCompositeComponentMixin = {
|
||||
ReactLifeCycle.currentlyMountingInstance = this;
|
||||
try {
|
||||
if (inst.componentWillMount) {
|
||||
inst.componentWillMount();
|
||||
inst.componentWillMount();
|
||||
// When mounting, calls to `setState` by `componentWillMount` will set
|
||||
// `this._pendingStateQueue` without triggering a re-render.
|
||||
if (this._pendingStateQueue) {
|
||||
|
||||
Reference in New Issue
Block a user