From 847357e42e5267b04dd6e297219eaa125ab2f9f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Thu, 25 Dec 2014 14:33:51 -0500 Subject: [PATCH] [lint] Fix reasonable lines to 80 I don't agree with 80 on principal but it's what we have for now. This fixes the reasonable cases. Most of the long lines are in docblocks with long type information or containing links. --- src/browser/server/ReactServerRendering.js | 3 ++- src/browser/ui/dom/HTMLDOMPropertyConfig.js | 17 +++++++++++------ src/core/ReactCompositeComponent.js | 2 +- src/core/shouldUpdateReactComponent.js | 9 ++++++--- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/browser/server/ReactServerRendering.js b/src/browser/server/ReactServerRendering.js index 1504a7be21..c5e291e9e6 100644 --- a/src/browser/server/ReactServerRendering.js +++ b/src/browser/server/ReactServerRendering.js @@ -38,7 +38,8 @@ function renderToString(element) { return transaction.perform(function() { var componentInstance = instantiateReactComponent(element, null); - var markup = componentInstance.mountComponent(id, transaction, emptyObject); + var markup = + componentInstance.mountComponent(id, transaction, emptyObject); return ReactMarkupChecksum.addChecksumToMarkup(markup); }, null); } finally { diff --git a/src/browser/ui/dom/HTMLDOMPropertyConfig.js b/src/browser/ui/dom/HTMLDOMPropertyConfig.js index 0a5eb61f3c..468a8a8c8f 100644 --- a/src/browser/ui/dom/HTMLDOMPropertyConfig.js +++ b/src/browser/ui/dom/HTMLDOMPropertyConfig.js @@ -160,12 +160,17 @@ var HTMLDOMPropertyConfig = { /** * Non-standard Properties */ - autoCapitalize: null, // Supported in Mobile Safari for keyboard hints - autoCorrect: null, // Supported in Mobile Safari for keyboard hints - itemProp: MUST_USE_ATTRIBUTE, // Microdata: http://schema.org/docs/gs.html - itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, // Microdata: http://schema.org/docs/gs.html - itemType: MUST_USE_ATTRIBUTE, // Microdata: http://schema.org/docs/gs.html - property: null // Supports OG in meta tags + // autoCapitalize and autoCorrect are supported in Mobile Safari for + // keyboard hints. + autoCapitalize: null, + autoCorrect: null, + // itemProp, itemScope, itemType are for Microdata support. See + // http://schema.org/docs/gs.html + itemProp: MUST_USE_ATTRIBUTE, + itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, + itemType: MUST_USE_ATTRIBUTE, + // property is supported for OpenGraph in meta tags. + property: null }, DOMAttributeNames: { acceptCharset: 'accept-charset', diff --git a/src/core/ReactCompositeComponent.js b/src/core/ReactCompositeComponent.js index 1c5112a439..5f818729c6 100644 --- a/src/core/ReactCompositeComponent.js +++ b/src/core/ReactCompositeComponent.js @@ -935,7 +935,7 @@ var ReactCompositeComponentMixin = assign({}, var refs = this.getPublicInstance().refs; delete refs[ref]; }, - + /** * Get a text description of the component that can be used to identify it * in error messages. diff --git a/src/core/shouldUpdateReactComponent.js b/src/core/shouldUpdateReactComponent.js index 4538d56d68..0bfd40ef21 100644 --- a/src/core/shouldUpdateReactComponent.js +++ b/src/core/shouldUpdateReactComponent.js @@ -44,14 +44,17 @@ function shouldUpdateReactComponent(prevElement, nextElement) { if (prevElement._owner != null && prevElement._owner.getPublicInstance() != null && prevElement._owner.getPublicInstance().constructor != null) { - prevName = prevElement._owner.getPublicInstance().constructor.displayName; + prevName = + prevElement._owner.getPublicInstance().constructor.displayName; } if (nextElement._owner != null && nextElement._owner.getPublicInstance() != null && nextElement._owner.getPublicInstance().constructor != null) { - nextName = nextElement._owner.getPublicInstance().constructor.displayName; + nextName = + nextElement._owner.getPublicInstance().constructor.displayName; } - if (nextElement.type != null && nextElement.type.displayName != null) { + if (nextElement.type != null && + nextElement.type.displayName != null) { nextDisplayName = nextElement.type.displayName; } monitorCodeUse(