Skip to content

Commit

Permalink
CodeClimate & ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen committed Mar 5, 2016
1 parent eb717a7 commit 073e2ba
Show file tree
Hide file tree
Showing 12 changed files with 269 additions and 259 deletions.
6 changes: 6 additions & 0 deletions .codeclimate.yml
@@ -0,0 +1,6 @@
engines:
eslint:
enabled: true
ratings:
paths:
- "src/**/*"
19 changes: 19 additions & 0 deletions .eslintrc
@@ -0,0 +1,19 @@
{
"extends": "eslint:recommended",
"globals": {
"angular": false,
"module": false,
"inject": false,
"describe": false,
"beforeEach": false,
"afterEach": false,
"expect": false,
"fail": false,
"it": false,
"require": false,
"toObject": false
},
"rules":{
"comma-dangle": [ 0, "always-multiline" ]
}
}
10 changes: 9 additions & 1 deletion Gulpfile.js
Expand Up @@ -5,7 +5,8 @@ var gulp = require('gulp')
, jshint = require('gulp-jshint') , jshint = require('gulp-jshint')
, gulpUtil = require('gulp-util') , gulpUtil = require('gulp-util')
, angularFilesort = require('gulp-angular-filesort') , angularFilesort = require('gulp-angular-filesort')
, karma = require('karma'); , karma = require('karma')
, eslint = require('gulp-eslint');


gulp.task('default', [ gulp.task('default', [
'compress', 'compress',
Expand All @@ -26,6 +27,7 @@ gulp.task('watch', function() {
gulp.task('test', [ gulp.task('test', [
'karma', 'karma',
'jshint', 'jshint',
'eslint',
]); ]);


gulp.task('compress', [ gulp.task('compress', [
Expand Down Expand Up @@ -55,6 +57,12 @@ gulp.task('jshint', function() {
.pipe(jshint.reporter('jshint-stylish')); .pipe(jshint.reporter('jshint-stylish'));
}); });


gulp.task('eslint', function() {
return gulp.src([__dirname + '/src/**/*.js', __dirname + '/test/**/*.js'])
.pipe(eslint())
.pipe(eslint.format());
});

gulp.task( gulp.task(
'karma', 'karma',
[ [
Expand Down

0 comments on commit 073e2ba

Please sign in to comment.