ff-stream-web

git clone git://archive.git.mtrnord.blog/MTRNord/ff-stream-web.git
Log | Files | Refs | README | LICENSE

commit de49fbb53268afabb8215e2d74383e0983485d9e
parent 3167037e8338008f84385c9634ab0b61660f6c8b
Author: Konstantin Tarkus <hello@tarkus.me>
Date:   Tue, 14 Apr 2015 17:30:36 +0300

Remove "use strict" directive from the source files and style guide

See https://babeljs.io/docs/usage/transformers/other/strict/

Diffstat:
Mdocs/react-style-guide.md | 4----
Msrc/actions/AppActions.js | 2--
Msrc/app.js | 2--
Msrc/components/App/App.js | 4+---
Msrc/components/App/setViewport.js | 2--
Msrc/components/ContentPage/ContentPage.js | 4+---
Msrc/components/HomePage/HomePage.js | 4+---
Msrc/components/Navbar/Navbar.js | 2--
Msrc/components/NotFoundPage/NotFoundPage.js | 5+----
Msrc/components/TextBox/TextBox.js | 6++----
Msrc/constants/ActionTypes.js | 2--
Msrc/constants/PayloadSources.js | 2--
Msrc/core/Dispatcher.js | 2--
Msrc/server.js | 2--
Msrc/stores/AppStore.js | 2--
15 files changed, 6 insertions(+), 39 deletions(-)

diff --git a/docs/react-style-guide.md b/docs/react-style-guide.md @@ -94,8 +94,6 @@ Use [BEM](https://bem.info/) approach for naming CSS classes. See also [SUIT CSS ##### React component example: ```js -'use strict'; - import './SampleComponent.less'; import React, { Component } from 'react'; @@ -139,8 +137,6 @@ Put custom methods and properties at the bottom of the file, after the render() ##### Higher-order React component example: ```js -'use strict'; - import React, { Component } from 'react'; import { canUseDOM } from 'react/lib/ExecutionEnvironment'; diff --git a/src/actions/AppActions.js b/src/actions/AppActions.js @@ -6,8 +6,6 @@ * LICENSE.txt file in the root directory of this source tree. */ -'use strict'; - import Dispatcher from '../core/Dispatcher'; import ActionTypes from '../constants/ActionTypes'; import ExecutionEnvironment from 'react/lib/ExecutionEnvironment'; diff --git a/src/app.js b/src/app.js @@ -6,8 +6,6 @@ * LICENSE.txt file in the root directory of this source tree. */ -'use strict'; - import 'babel/polyfill'; import React from 'react/addons'; diff --git a/src/components/App/App.js b/src/components/App/App.js @@ -6,8 +6,6 @@ * LICENSE.txt file in the root directory of this source tree. */ -'use strict'; - import './App.less'; import React, { PropTypes } from 'react'; import invariant from 'react/lib/invariant'; @@ -26,7 +24,7 @@ class App { onSetTitle: PropTypes.func.isRequired, onSetMeta: PropTypes.func.isRequired, onPageNotFound: PropTypes.func.isRequired - } + }; componentDidMount() { window.addEventListener('popstate', this.handlePopState); diff --git a/src/components/App/setViewport.js b/src/components/App/setViewport.js @@ -6,8 +6,6 @@ * LICENSE.txt file in the root directory of this source tree. */ -'use strict'; - import React, { Component } from 'react'; import { canUseDOM } from 'react/lib/ExecutionEnvironment'; diff --git a/src/components/ContentPage/ContentPage.js b/src/components/ContentPage/ContentPage.js @@ -6,8 +6,6 @@ * LICENSE.txt file in the root directory of this source tree. */ -'use strict'; - import './ContentPage.less'; import React, { PropTypes } from 'react'; @@ -15,7 +13,7 @@ class ContentPage { static propTypes = { body: PropTypes.string.isRequired - } + }; render() { var { className, body, other } = this.props; diff --git a/src/components/HomePage/HomePage.js b/src/components/HomePage/HomePage.js @@ -6,8 +6,6 @@ * LICENSE.txt file in the root directory of this source tree. */ -'use strict'; - import './HomePage.less'; import React, { PropTypes } from 'react'; @@ -15,7 +13,7 @@ class HomePage { static propTypes = { body: PropTypes.string.isRequired - } + }; render() { return ( diff --git a/src/components/Navbar/Navbar.js b/src/components/Navbar/Navbar.js @@ -6,8 +6,6 @@ * LICENSE.txt file in the root directory of this source tree. */ -'use strict'; - import React, { Component } from 'react'; class Navbar extends Component { diff --git a/src/components/NotFoundPage/NotFoundPage.js b/src/components/NotFoundPage/NotFoundPage.js @@ -6,10 +6,7 @@ * LICENSE.txt file in the root directory of this source tree. */ -'use strict'; - -//require('./NotFoundPage.less'); - +//import './NotFoundPage.less'; import React, { Component } from 'react'; class NotFoundPage extends Component { diff --git a/src/components/TextBox/TextBox.js b/src/components/TextBox/TextBox.js @@ -6,8 +6,6 @@ * LICENSE.txt file in the root directory of this source tree. */ -'use strict'; - import './TextBox.less'; import React, { PropTypes } from 'react'; @@ -15,11 +13,11 @@ class TextBox { static propTypes = { maxLines: PropTypes.number - } + }; static defaultProps = { maxLines: 1 - } + }; render() { return ( diff --git a/src/constants/ActionTypes.js b/src/constants/ActionTypes.js @@ -6,8 +6,6 @@ * LICENSE.txt file in the root directory of this source tree. */ -'use strict'; - import keyMirror from 'react/lib/keyMirror'; export default keyMirror({ diff --git a/src/constants/PayloadSources.js b/src/constants/PayloadSources.js @@ -6,8 +6,6 @@ * LICENSE.txt file in the root directory of this source tree. */ -'use strict'; - import keyMirror from 'react/lib/keyMirror'; export default keyMirror({ diff --git a/src/core/Dispatcher.js b/src/core/Dispatcher.js @@ -6,8 +6,6 @@ * LICENSE.txt file in the root directory of this source tree. */ -'use strict'; - import Flux from 'flux'; import PayloadSources from '../constants/PayloadSources'; import assign from 'react/lib/Object.assign'; diff --git a/src/server.js b/src/server.js @@ -6,8 +6,6 @@ * LICENSE.txt file in the root directory of this source tree. */ -'use strict'; - import _ from 'lodash'; import fs from 'fs'; import path from 'path'; diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js @@ -6,8 +6,6 @@ * LICENSE.txt file in the root directory of this source tree. */ -'use strict'; - import Dispatcher from '../core/Dispatcher'; import ActionTypes from '../constants/ActionTypes'; import PayloadSources from '../constants/PayloadSources';