Skip to content

Commit 7269978

Browse files
committed
Merge pull request #165 from jakemmarsh/eslint
Finish setting up eslint, replace jshint
2 parents 04395ed + 1403653 commit 7269978

File tree

14 files changed

+41
-53
lines changed

14 files changed

+41
-53
lines changed

.eslintrc

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
{
2-
"env" : {
3-
"es6" : true
2+
"parser": "babel-eslint",
3+
"ecmaFeatures": {
4+
"modules": true
5+
},
6+
"env": {
7+
"browser": true,
8+
"node": true,
9+
"es6": true
10+
},
11+
"rules": {
12+
"quotes": [2, "single"],
13+
"eol-last": 0,
14+
"no-debugger": 1,
15+
"no-mixed-requires": 0,
16+
"no-underscore-dangle": 0,
17+
"no-multi-spaces": 0,
18+
"no-trailing-spaces": 0,
19+
"no-extra-boolean-cast": 0,
20+
"no-unused-vars": 2,
21+
"new-cap": 0,
22+
"camelcase": 2
423
}
5-
}
24+
}

.jshintrc

Lines changed: 0 additions & 20 deletions
This file was deleted.

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ node_js:
44
sudo: false
55

66
script:
7-
- ./node_modules/.bin/gulp lint test
7+
- ./node_modules/.bin/gulp eslint
8+
- ./node_modules/.bin/gulp test
89

910
cache:
1011
directories:

gulp/config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export default {
1717

1818
scripts: {
1919
src: 'app/js/**/*.js',
20-
dest: 'build/js'
20+
dest: 'build/js',
21+
test: 'test/**/*.js'
2122
},
2223

2324
images: {

gulp/tasks/eslint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import eslint from 'gulp-eslint';
77
gulp.task('eslint', () => {
88
// Be sure to return the stream from the task;
99
// Otherwise, the task may end before the stream has finished.
10-
return gulp.src([config.scripts.src, '!app/js/templates.js'])
10+
return gulp.src([config.scripts.src, '!app/js/templates.js', config.scripts.test])
1111
// eslint() attaches the lint output to the "eslint" property
1212
// of the file object so it can be used by other modules.
1313
.pipe(eslint())

gulp/tasks/lint.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

gulp/tasks/watch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gulp.task('watch', ['browserSync'], function() {
88
global.isWatching = true;
99

1010
// Scripts are automatically watched and rebundled by Watchify inside Browserify task
11-
gulp.watch(config.scripts.src, ['lint']);
11+
gulp.watch(config.scripts.src, ['eslint']);
1212
gulp.watch(config.styles.src, ['styles']);
1313
gulp.watch(config.images.src, ['images']);
1414
gulp.watch(config.fonts.src, ['fonts']);

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angularjs-gulp-browserify-boilerplate",
3-
"version": "1.5.2",
3+
"version": "1.5.3",
44
"author": "Jake Marsh <[email protected]>",
55
"description": "Boilerplate using AngularJS, SASS, Gulp, and Browserify while also utilizing best practices.",
66
"repository": {
@@ -27,6 +27,7 @@
2727
"angular-mocks": "^1.3.15",
2828
"angular-ui-router": "^0.2.13",
2929
"babel-core": "^6.3.26",
30+
"babel-eslint": "^5.0.0",
3031
"babel-preset-es2015": "^6.3.13",
3132
"babel-register": "^6.5.2",
3233
"babelify": "^7.2.0",
@@ -39,17 +40,16 @@
3940
"bulkify": "^1.1.1",
4041
"debowerify": "^1.3.1",
4142
"del": "^2.1.0",
42-
"eslint": "^1.10.3",
43+
"eslint": "^2.2.0",
4344
"express": "^4.13.3",
4445
"gulp": "^3.9.0",
4546
"gulp-angular-templatecache": "^1.3.0",
4647
"gulp-autoprefixer": "^3.1.0",
4748
"gulp-changed": "^1.0.0",
48-
"gulp-eslint": "^1.1.1",
49+
"gulp-eslint": "^2.0.0",
4950
"gulp-gzip": "^1.2.0",
5051
"gulp-if": "^2.0.0",
5152
"gulp-imagemin": "^2.4.0",
52-
"gulp-jshint": "^2.0.0",
5353
"gulp-notify": "^2.0.0",
5454
"gulp-protractor": "^2.1.0",
5555
"gulp-rename": "^1.2.0",
@@ -60,8 +60,6 @@
6060
"gulp-util": "^3.0.1",
6161
"imagemin-pngcrush": "^4.1.0",
6262
"isparta": "^4.0.0",
63-
"jshint": "^2.9.1",
64-
"jshint-stylish": "^2.1.0",
6563
"karma": "^0.13.21",
6664
"karma-browserify": "^5.0.2",
6765
"karma-chrome-launcher": "^0.2.1",

test/.eslintrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"env": {
3+
"jasmine": true
4+
},
5+
"globals": {
6+
"angular": true
7+
}
8+
}

test/unit/constants_spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/*global angular */
2-
31
'use strict';
42

53
describe('Unit: Constants', function() {

test/unit/controllers/example_spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/*global angular */
2-
31
'use strict';
42

53
describe('Unit: ExampleCtrl', function() {

test/unit/directives/example_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*global angular, module, browser*/
1+
/* global module */
22

33
'use strict';
44

test/unit/filters/example_spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/*global angular */
2-
31
'use strict';
42

53
describe('Unit: ExampleFilter', function() {

test/unit/services/example_spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/*global angular */
2-
31
'use strict';
42

53
describe('Unit: ExampleService', function() {

0 commit comments

Comments
 (0)