Skip to content

Commit

Permalink
update dev dependencies, linting party.
Browse files Browse the repository at this point in the history
  • Loading branch information
hartym committed May 11, 2016
1 parent c729a80 commit 5517f2e
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 39 deletions.
4 changes: 2 additions & 2 deletions config/karma.js
Expand Up @@ -41,8 +41,8 @@ module.exports = function (config) { // eslint-disable-line func-names
]
},

// Load our Karma specific Webpack configuration, that extends the base one.
webpack: require('./webpack/karma'),
// Karma specific Webpack configuration, that extends the base one.
webpack: require('./webpack/karma'), // eslint-disable-line global-require

// TODO: is there any reason for that?
webpackServer: {
Expand Down
2 changes: 2 additions & 0 deletions config/webpack/default.js
Expand Up @@ -62,13 +62,15 @@ const defaultWebpackConfig = {
includePaths: [path.resolve(__dirname, '../node_modules')]
},

/* eslint-disable global-require */
postcss (bundler) {
return [
require('postcss-import')({ addDependencyTo: bundler }),
require('precss')(),
require('autoprefixer')({ browsers: AUTOPREFIXER_BROWSERS })
]
}
/* eslint-enable global-require */
}

export default defaultWebpackConfig
51 changes: 26 additions & 25 deletions package.json
Expand Up @@ -57,34 +57,35 @@
},
"devDependencies": {
"assets-webpack-plugin": "^3.4.0",
"babel-cli": "^6.7.5",
"babel-core": "^6.7.6",
"babel-cli": "^6.8.0",
"babel-core": "^6.8.0",
"babel-istanbul-loader": "^0.1.0",
"babel-loader": "^6.2.4",
"babel-plugin-transform-react-constant-elements": "^6.5.0",
"babel-plugin-transform-react-inline-elements": "^6.6.5",
"babel-plugin-transform-react-remove-prop-types": "^0.2.5",
"babel-plugin-transform-runtime": "^6.7.5",
"babel-polyfill": "^6.7.4",
"babel-plugin-transform-react-constant-elements": "^6.8.0",
"babel-plugin-transform-react-inline-elements": "^6.8.0",
"babel-plugin-transform-react-remove-prop-types": "^0.2.6",
"babel-plugin-transform-runtime": "^6.8.0",
"babel-polyfill": "^6.8.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-node5": "^11.0.1",
"babel-preset-node5": "^11.1.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"babel-register": "^6.7.2",
"babel-register": "^6.8.0",
"bootstrap": "^4.0.0-alpha.2",
"browser-sync": "^2.12.3",
"browser-sync": "^2.12.7",
"compression-webpack-plugin": "^0.3.1",
"coveralls": "^2.11.9",
"css-loader": "^0.23.1",
"del": "^2.2.0",
"eslint": "^2.8.0",
"eslint-config-airbnb": "^7.0.0",
"eslint-config-standard": "^5.1.0",
"eslint-plugin-jsx-a11y": "^0.6.2",
"eslint": "^2.9.0",
"eslint-config-airbnb": "^9.0.1",
"eslint-config-standard": "^5.3.1",
"eslint-plugin-import": "^1.7.0",
"eslint-plugin-jsx-a11y": "^1.2.0",
"eslint-plugin-promise": "^1.1.0",
"eslint-plugin-react": "^4.3.0",
"eslint-plugin-react": "^5.1.1",
"eslint-plugin-standard": "^1.3.2",
"expect": "^1.18.0",
"expect": "^1.20.1",
"extract-text-webpack-plugin": "^1.0.1",
"fastclick": "^1.0.6",
"faucet": "0.0.1",
Expand All @@ -93,27 +94,27 @@
"istanbul": "^0.4.3",
"istanbul-instrumenter-loader": "^0.2.0",
"karma": "^0.13.22",
"karma-chrome-launcher": "^0.2.3",
"karma-cli": "^0.1.2",
"karma-coverage": "^0.5.5",
"karma-firefox-launcher": "^0.1.7",
"karma-chrome-launcher": "^1.0.1",
"karma-cli": "^1.0.0",
"karma-coverage": "^1.0.0",
"karma-firefox-launcher": "^1.0.0",
"karma-tap": "^1.0.4",
"karma-tap-reporter": "0.0.6",
"karma-webpack": "^1.7.0",
"ncp": "^2.0.0",
"node-libs-browser": "^1.0.0",
"node-sass": "^3.4.2",
"nodemon": "^1.9.1",
"postcss-import": "^8.1.0",
"postcss-loader": "^0.8.2",
"node-sass": "^3.7.0",
"nodemon": "^1.9.2",
"postcss-import": "^8.1.2",
"postcss-loader": "^0.9.1",
"postcss-scss": "^0.1.7",
"precss": "^1.4.0",
"react-hot-loader": "^1.3.0",
"replace": "^0.3.0",
"resolve-url-loader": "^1.4.3",
"sass-loader": "^3.2.0",
"sass-resources-loader": "^1.0.2",
"standard": "^6.0.8",
"standard": "^7.0.1",
"style-loader": "^0.13.1",
"tape": "^4.5.1",
"url-loader": "^0.5.7",
Expand Down
4 changes: 3 additions & 1 deletion src/client.js
Expand Up @@ -21,14 +21,16 @@ import configureStore from './store'
require('./styles/index.scss')

// Configure store and browser-friendly history
/* eslint-disable no-underscore-dangle */
const store = configureStore(browserHistory, window.__INITIAL_STATE__)
/* eslint-enable no-underscore-dangle */
const history = syncHistoryWithStore(browserHistory, store)

// Apparently, fat fingers need to go faster on mobiles. Or is it browsers?
FastClick.attach(document.body)

const render = () => {
let routes = require('./routes').default
let routes = require('./routes').default // eslint-disable-line global-require

// Render the client side react component.
ReactDOM.render(
Expand Down
22 changes: 12 additions & 10 deletions src/server.js
Expand Up @@ -5,23 +5,24 @@
*/

import Express from 'express'
import path from 'path'
import Helmet from 'react-helmet'
import React from 'react'
import ReactDOMServer from 'react-dom/server'
import compression from 'compression'
import morgan from 'morgan'
import path from 'path'
import { Provider } from 'react-redux'
import { match, RouterContext, createMemoryHistory } from 'react-router'
import { syncHistoryWithStore } from 'react-router-redux'
import Helmet from 'react-helmet'
import config from '../config'
import routes from './routes'
import configureStore from './store'
import morgan from 'morgan'

function renderElementWithState (store, element) {
const innerHtml = ReactDOMServer.renderToString(element)
const head = Helmet.rewind()

const assets = require('../build/assets')
const assets = require('../build/assets') // eslint-disable-line global-require
const mainJs = assets.main.js
const mainCss = assets.main.css
? `<link href="${assets.main.css}" media="all" rel="stylesheet" />` : ''
Expand All @@ -47,11 +48,10 @@ function renderElementWithState (store, element) {
*/
function render (store, renderProps) {
return renderElementWithState(store, (
<Provider store={store}>
<RouterContext {...renderProps} />
</Provider>
)
)
<Provider store={store}>
<RouterContext {...renderProps} />
</Provider>
))
}

/**
Expand All @@ -63,7 +63,7 @@ function createHandler (baseHandler) {
handler.use(morgan('combined'))
// Add production middlewares
if (!config.DEBUG) {
handler.use(require('compression')())
handler.use(compression())
}

// Static files middleware
Expand Down Expand Up @@ -102,9 +102,11 @@ const defaultHandler = createHandler()
* I'd like to remove it.
*/
if (require.main === module) {
/* eslint-disable global-require */
require('http').createServer(defaultHandler).listen(config.PORT, () => {
console.log(`[http] Server listening to :${config.PORT}`) // eslint-disable-line no-console
})
/* eslint-enable global-require */
}

export default defaultHandler
Expand Down
2 changes: 1 addition & 1 deletion src/store.js
Expand Up @@ -14,7 +14,7 @@ import { routerReducer, routerMiddleware } from 'react-router-redux'
*/
function buildRootReducer () {
return combineReducers({
...require('./reducers').default,
...require('./reducers').default, // eslint-disable-line global-require
routing: routerReducer
})
}
Expand Down

0 comments on commit 5517f2e

Please sign in to comment.