Skip to content

Commit

Permalink
fix new linter violations
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemmarsh committed May 12, 2016
1 parent e0a124e commit 8369047
Show file tree
Hide file tree
Showing 23 changed files with 37 additions and 40 deletions.
2 changes: 1 addition & 1 deletion app/js/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ class App extends React.Component {

App.propTypes = propTypes;

export default App;
export default App;
2 changes: 1 addition & 1 deletion app/js/actions/CurrentUserActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ const CurrentUserActions = Reflux.createActions([

]);

export default CurrentUserActions;
export default CurrentUserActions;
2 changes: 1 addition & 1 deletion app/js/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ class Footer extends React.Component{

}

export default Footer;
export default Footer;
2 changes: 1 addition & 1 deletion app/js/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ class Header extends React.Component {

}

export default Header;
export default Header;
2 changes: 1 addition & 1 deletion app/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ if ( process.env.NODE_ENV !== 'production' ) {
window.React = React;
}

ReactDOM.render(Routes, document.getElementById('app'));
ReactDOM.render(Routes, document.getElementById('app'));
2 changes: 1 addition & 1 deletion app/js/pages/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ class HomePage extends React.Component {

HomePage.propTypes = propTypes;

export default HomePage;
export default HomePage;
2 changes: 1 addition & 1 deletion app/js/pages/NotFoundPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ class NotFoundPage extends React.Component {

NotFoundPage.propTypes = propTypes;

export default NotFoundPage;
export default NotFoundPage;
2 changes: 1 addition & 1 deletion app/js/pages/SearchPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ class SearchPage extends React.Component {

SearchPage.propTypes = propTypes;

export default SearchPage;
export default SearchPage;
2 changes: 1 addition & 1 deletion app/js/utils/AuthAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ const AuthAPI = {

};

export default AuthAPI;
export default AuthAPI;
11 changes: 6 additions & 5 deletions gulp/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
'use strict';

var fs = require('fs');
var onlyScripts = require('./util/script-filter');
var tasks = fs.readdirSync('./gulp/tasks/').filter(onlyScripts);
import fs from 'fs';
import onlyScripts from './util/script-filter';

tasks.forEach(function(task) {
const TASKS = fs.readdirSync('./gulp/tasks/').filter(onlyScripts);

TASKS.forEach(function(task) {
require('./tasks/' + task);
});
});
4 changes: 2 additions & 2 deletions gulp/tasks/browserSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ gulp.task('browserSync', function() {
server: {
baseDir: config.buildDir,
middleware: function(req, res, next) {
let fileHref = url.parse(req.url).href;
const fileHref = url.parse(req.url).href;

if ( !ASSET_EXTENSION_REGEX.test(fileHref)) {
req.url = '/' + DEFAULT_FILE;
Expand All @@ -32,4 +32,4 @@ gulp.task('browserSync', function() {
}
});

});
});
4 changes: 2 additions & 2 deletions gulp/tasks/browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import config from '../config';
// Based on: http://blog.avisi.nl/2014/04/25/how-to-keep-a-fast-build-with-browserify-and-reactjs/
function buildScript(file, watch) {

var bundler = browserify({
let bundler = browserify({
entries: [config.sourceDir + 'js/' + file],
debug: !global.isProd,
cache: {},
Expand All @@ -36,7 +36,7 @@ function buildScript(file, watch) {
bundler.transform(debowerify);

function rebundle() {
let stream = bundler.bundle();
const stream = bundler.bundle();

gutil.log('Rebundle...');

Expand Down
2 changes: 1 addition & 1 deletion gulp/tasks/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ gulp.task('clean', function() {

return del([config.buildDir]);

});
});
1 change: 0 additions & 1 deletion gulp/tasks/copyIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import config from '../config';

gulp.task('copyIcons', function() {

// Copy icons from root directory to build/
return gulp.src(['./*.png', './favicon.ico'])
.pipe(gulp.dest(config.buildDir));

Expand Down
2 changes: 1 addition & 1 deletion gulp/tasks/copyIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ gulp.task('copyIndex', function() {

gulp.src(config.sourceDir + 'index.html').pipe(gulp.dest(config.buildDir));

});
});
3 changes: 1 addition & 2 deletions gulp/tasks/deploy.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
'use strict';

import gulp from 'gulp';
//import config from '../config';

gulp.task('deploy', ['prod'], function() {

// Deploy to hosting environment

});
});
3 changes: 1 addition & 2 deletions gulp/tasks/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ gulp.task('dev', ['clean'], function(cb) {

global.isProd = false;

// Run all tasks once
return runSequence(['sass', 'imagemin', 'browserify', 'copyFonts', 'copyIndex', 'copyIcons'], 'watch', cb);

});
});
3 changes: 1 addition & 2 deletions gulp/tasks/imagemin.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import config from '../config';

gulp.task('imagemin', function() {

// Run imagemin task on all images
return gulp.src(config.images.src)
.pipe(gulpif(global.isProd, imagemin()))
.pipe(gulp.dest(config.images.dest))
.pipe(gulpif(browserSync.active, browserSync.reload({ stream: true, once: true })));

});
});
2 changes: 1 addition & 1 deletion gulp/tasks/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ gulp.task('prod', ['clean'], function(cb) {

runSequence(['sass', 'imagemin', 'browserify', 'copyFonts', 'copyIndex', 'copyIcons'], cb);

});
});
8 changes: 4 additions & 4 deletions gulp/tasks/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import config from '../config';
gulp.task('watch', ['browserSync'], function() {

// Scripts are automatically watched by Watchify inside Browserify task
gulp.watch(config.styles.src, ['sass']);
gulp.watch(config.images.src, ['imagemin']);
gulp.watch(config.sourceDir + 'index.html', ['copyIndex']);
gulp.watch(config.styles.src, ['sass']);
gulp.watch(config.images.src, ['imagemin']);
gulp.watch(config.sourceDir + 'index.html', ['copyIndex']);

});
});
8 changes: 4 additions & 4 deletions gulp/util/handle-errors.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict';

var notify = require('gulp-notify');
import notify from 'gulp-notify';

module.exports = function(error) {
export default function(error) {

if( !global.isProd ) {

var args = Array.prototype.slice.call(arguments);
const args = Array.prototype.slice.call(arguments);

// Send error to notification center with gulp-notify
notify.onError({
Expand All @@ -24,4 +24,4 @@ module.exports = function(error) {
process.exit(1);
}

};
};
6 changes: 3 additions & 3 deletions gulp/util/script-filter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

var path = require('path');
import path from 'path';

// Filters out non .coffee and .js files. Prevents
// accidental inclusion of possible hidden files
module.exports = function(name) {
export default function(name) {
return /(\.(js|coffee)$)/i.test(path.extname(name));
};
};
2 changes: 1 addition & 1 deletion tests/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ beforeEach(function() {

afterEach(function() {
global.sandbox.restore();
});
});

0 comments on commit 8369047

Please sign in to comment.