@samitouri / QOS-React-2 / commits / 7e078d6a92

Fix lint rules

The typeof one is a bit strange because the disable rule gets moved.

Sebastian Markbage committed Mar 14, 2017 at 14:12 UTC 7e078d6a923783bc4914c16ad90cc6fb1c93274d
3 files changed +5 -5
.eslintrc.js
+3 -2
@@ -23,7 +23,7 @@ module.exports = {
23 'dot-notation': ERROR,
24 'eol-last': ERROR,
25 'eqeqeq': [ERROR, 'allow-null'],
26 - 'indent': [ERROR, 2, {SwitchCase: 1}],
26 + 'indent': OFF,
27 'jsx-quotes': [ERROR, 'prefer-double'],
28 'keyword-spacing': [ERROR, {after: true, before: true}],
29 'no-bitwise': OFF,
@@ -33,9 +33,10 @@ module.exports = {
33 'no-shadow': ERROR,
34 'no-unused-expressions': ERROR,
35 'no-unused-vars': [ERROR, {args: 'none'}],
36 + 'no-useless-concat': OFF,
37 'quotes': [ERROR, 'single', {avoidEscape: true, allowTemplateLiterals: true }],
38 'space-before-blocks': ERROR,
38 - 'space-before-function-paren': [ERROR, {anonymous: 'never', named: 'never'}],
39 + 'space-before-function-paren': OFF,
40
41 // React & JSX
42 // Our transforms set this automatically
src/renderers/shared/shared/event/SyntheticEvent.js
+2 -2
@@ -9,6 +9,8 @@
9 * @providesModule SyntheticEvent
10 */
11
12 +/* eslint valid-typeof: 0 */
13 +
14 'use strict';
15
16 var PooledClass = require('PooledClass');
@@ -126,7 +128,6 @@ Object.assign(SyntheticEvent.prototype, {
128 if (event.preventDefault) {
129 event.preventDefault();
130 } else if (typeof event.returnValue !== 'unknown') {
129 - // eslint-disable-line valid-typeof
131 event.returnValue = false;
132 }
133 this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
@@ -141,7 +142,6 @@ Object.assign(SyntheticEvent.prototype, {
142 if (event.stopPropagation) {
143 event.stopPropagation();
144 } else if (typeof event.cancelBubble !== 'unknown') {
144 - // eslint-disable-line valid-typeof
145 // The ChangeEventPlugin registers a "propertychange" event for
146 // IE. This event does not support bubbling or cancelling, and
147 // any references to cancelBubble throw "Member not found". A
src/renderers/shared/stack/reconciler/Transaction.js
-1
@@ -132,7 +132,6 @@ var TransactionImpl = {
132 e: E,
133 f: F,
134 ) => G>(method: T, scope: any, a: A, b: B, c: C, d: D, e: E, f: F): G {
135 - // eslint-disable-line space-before-function-paren
135 invariant(
136 !this.isInTransaction(),
137 'Transaction.perform(...): Cannot initialize a transaction when there ' +