diff --git a/karma.conf.js b/karma.conf.js index 9d79e9e..0fdc36c 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -32,16 +32,16 @@ module.exports = function(config) { webpack: { module: { - preLoaders: [ - { test: /\.jsx?$/, loader: 'isparta', exclude: /\/(spec|node_modules)\// }, - { test: /\.jsx?$/, loader: 'eslint', exclude: /(node_modules)/ } - ], - loaders: [ - { test: /\.jsx?$/, loader: 'babel', exclude: /(node_modules)/ }, - { test: /\.css$/, loaders: ['style', 'css'], exclude: /(node_modules)/ }, - { test: /\.scss$/, loaders: ['style', 'css', 'sass'], exclude: /(node_modules)/ } - ] - } + preLoaders: [ + { test: /\.jsx?$/, loader: 'isparta', exclude: /\/(spec|node_modules)\// }, + { test: /\.jsx?$/, loader: 'eslint', exclude: /(node_modules)/ } + ], + loaders: [ + { test: /\.jsx?$/, loader: 'babel', exclude: /(node_modules)/ }, + { test: /\.css$/, loaders: ['style', 'css'], exclude: /(node_modules)/ }, + { test: /\.scss$/, loaders: ['style', 'css', 'sass'], exclude: /(node_modules)/ } + ] + } }, @@ -80,5 +80,5 @@ module.exports = function(config) { // Continuous Integration mode // if true, Karma captures browsers, runs the tests and exits singleRun: false - }) -} + }); +}; diff --git a/spec/section_spec.js b/spec/section_spec.js index cba9e5a..a509b5b 100644 --- a/spec/section_spec.js +++ b/spec/section_spec.js @@ -1,8 +1,8 @@ import 'core-js/es5'; import React from 'react/addons'; -import Section from '../src/book/section.jsx' -import Heading from '../src/book/heading.jsx' -import Description from '../src/book/description.jsx' +import Section from '../src/book/section.jsx'; // eslint-disable-line no-unused-vars +import Heading from '../src/book/heading.jsx'; +import Description from '../src/book/description.jsx'; describe('Section', function() { let sectionComponent; @@ -15,25 +15,25 @@ describe('Section', function() { sectionComponent = shallowRenderer.getRenderOutput(); }); - it('is wrapped in
element',function() { + it('is wrapped in
element', function() { expect( sectionComponent.type ).to.equal( 'section' ); }); - describe('checks if children exist regardless of their order',function() { + describe('checks if children exist regardless of their order', function() { let children; before(function() { children = sectionComponent.props.children; }); - it('includes Heading component',function() { + it('includes Heading component', function() { let childHeading = children.filter( component => component.type === Heading ); expect( childHeading.length ).to.be.ok; }); - it('includes Description component',function() { + it('includes Description component', function() { let childDescription = children.filter( component => component.type === Description ); @@ -42,7 +42,7 @@ describe('Section', function() { }); // An alternative to the two tests above - it('includes Heading and Description components in particular order',function() { + it('includes Heading and Description components in particular order', function() { expect( sectionComponent.props.children ).to.eql( [ , diff --git a/src/book/section.jsx b/src/book/section.jsx index 6981a2e..746a2da 100644 --- a/src/book/section.jsx +++ b/src/book/section.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import Heading from './heading.jsx'; -import Description from './description.jsx'; +import Heading from './heading.jsx'; // eslint-disable-line no-unused-vars +import Description from './description.jsx'; // eslint-disable-line no-unused-vars export default class extends React.Component { render() { @@ -9,6 +9,6 @@ export default class extends React.Component {
- ) + ); } } diff --git a/webpack-dev-server.js b/webpack-dev-server.js index e2d8567..d0038dd 100644 --- a/webpack-dev-server.js +++ b/webpack-dev-server.js @@ -7,10 +7,10 @@ new WebpackDevServer(webpack(config), { hot: true, headers: { 'Access-Control-Allow-Origin': '*' }, historyApiFallback: true -}).listen(5000, 'localhost', function (err, result) { - if (err) { - console.log(err); +}).listen(5000, 'localhost', function(error) { + if (error) { + console.log(error); } console.log('Listening at localhost:5000'); -}); \ No newline at end of file +});