diff --git a/.eslintrc b/.eslintrc index c5e2030bdb..ed6e9c70c0 100644 --- a/.eslintrc +++ b/.eslintrc @@ -19,14 +19,19 @@ rules: dot-notation: 2 eol-last: 2 indent: [2, 2, {SwitchCase: 1}] + jsx-quotes: [2, prefer-double] no-bitwise: 0 + no-dupe-class-members: 2 no-multi-spaces: 2 + no-restricted-syntax: [2, WithStatement] no-shadow: 2 no-unused-expressions: 2 no-unused-vars: [2, {args: none}] quotes: [2, single, avoid-escape] space-after-keywords: 2 space-before-blocks: 2 + # TODO: enable this rule after https://github.com/eslint/eslint/pull/3768 lands + space-before-keywords: 0 strict: [2, global] # JSX @@ -34,7 +39,6 @@ rules: react/display-name: 0 react/jsx-boolean-value: [2, always] react/jsx-no-undef: 2 - react/jsx-quotes: [2, double] # We don't care to do this react/jsx-sort-prop-types: 0 react/jsx-sort-props: 0 diff --git a/package.json b/package.json index e727c1eac7..e5f6b1de46 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "del": "^1.2.0", "derequire": "^2.0.0", "envify": "^3.0.0", - "eslint": "^1.1.0", - "eslint-plugin-react": "^3.2.1", + "eslint": "^1.4.3", + "eslint-plugin-react": "^3.4.0", "eslint-plugin-react-internal": "file:eslint-rules", "fbjs": "^0.2.0", "fbjs-scripts": "^0.2.0", diff --git a/src/renderers/dom/client/__tests__/ReactMount-test.js b/src/renderers/dom/client/__tests__/ReactMount-test.js index 0849ad3f39..7dfc305110 100644 --- a/src/renderers/dom/client/__tests__/ReactMount-test.js +++ b/src/renderers/dom/client/__tests__/ReactMount-test.js @@ -25,7 +25,7 @@ describe('ReactMount', function() { if (WebComponents === undefined && typeof jest !== 'undefined') { WebComponents = require('WebComponents'); } - } catch(e) { + } catch (e) { // Parse error expected on engines that don't support setters // or otherwise aren't supportable by the polyfill. // Leave WebComponents undefined. diff --git a/src/shared/utils/ReactErrorUtils.js b/src/shared/utils/ReactErrorUtils.js index e3f1ed5903..a4fdf8ce9d 100644 --- a/src/shared/utils/ReactErrorUtils.js +++ b/src/shared/utils/ReactErrorUtils.js @@ -26,7 +26,7 @@ var ReactErrorUtils = { invokeGuardedCallback: function(name, func, a, b) { try { return func(a, b); - } catch(x) { + } catch (x) { if (caughtError === null) { caughtError = x; }