Skip to content

Commit

Permalink
chore(deps): update eslint
Browse files Browse the repository at this point in the history
Remove JSCS and JSHint.
  • Loading branch information
dustinspecker committed Feb 24, 2016
1 parent 7a930e2 commit 7bd66a0
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 157 deletions.
101 changes: 0 additions & 101 deletions .jscsrc

This file was deleted.

22 changes: 0 additions & 22 deletions .jshintrc

This file was deleted.

7 changes: 0 additions & 7 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import del from 'del';
import eslint from 'gulp-eslint';
import gulp from 'gulp';
import istanbul from 'gulp-istanbul';
import jscs from 'gulp-jscs';
import jshint from 'gulp-jshint';
import mocha from 'gulp-mocha';

const srcFiles = 'src/*.js'
Expand All @@ -19,12 +17,7 @@ gulp.task('clean', () => del(destDir));
gulp.task('lint', () => {
return gulp.src([srcFiles, testFiles])
.pipe(eslint())
.pipe(eslint.formatEach('./node_modules/eslint-path-formatter'))
.pipe(eslint.failOnError())
.pipe(jscs())
.pipe(jscs.reporter('fail'))
.pipe(jscs.reporter())
.pipe(jshint());
});

gulp.task('compile', ['clean', 'lint'], () => {
Expand Down
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,15 @@
"babel-preset-es2015": "^6.0.12",
"coveralls": "^2.11.1",
"del": "^2.0.2",
"eslint-config-dustinspecker": "^0.1.0",
"eslint-path-formatter": "^0.1.1",
"eslint-config-dustinspecker": "^0.4.1",
"eslint-plugin-new-with-error": "^1.1.0",
"eslint-plugin-no-use-extend-native": "^0.3.1",
"gulp": "^3.9.0",
"gulp-babel": "^6.0.0",
"gulp-eslint": "^1.0.0",
"gulp-eslint": "^2.0.0",
"gulp-istanbul": "^0.10.0",
"gulp-jscs": "^3.0.1",
"gulp-jshint": "^2.0.0",
"gulp-mocha": "^2.0.0",
"istanbul": "^0.4.0",
"jshint": "^2.8.0",
"mocha": "^2.0.0"
}
}
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
'use strict'

/**
* Returns if dependency is listed in app's dependencies
Expand All @@ -7,6 +7,6 @@
* @return {Boolean} - dependency is included
*/
module.exports = function (fileContents, dependency) {
const regex = new RegExp(`[.]module[^$]*'[^$]*', \\[[^$]*'${dependency}'[^$]*\\]`);
return regex.test(fileContents);
};
const regex = new RegExp(`[.]module[^$]*'[^$]*', \\[[^$]*'${dependency}'[^$]*\\]`)
return regex.test(fileContents)
}
34 changes: 17 additions & 17 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
/* global describe, beforeEach, it */
'use strict';
import assert from 'assert';
import {EOL} from 'os';
import ngModHasDep from './lib/';
'use strict'
import assert from 'assert'
import {EOL} from 'os'
import ngModHasDep from './lib/'

describe('ng-mod-has-dep', () => {
let fileContents;
let fileContents

beforeEach(() => {
fileContents = [
`angular${EOL}`,
` .module('module', [${EOL}`,
` 'test'${EOL}`,
` ]);`
].join('');
});
fileContents = `
angular${EOL}
.module('module', [${EOL}
'test'${EOL}
])
`
})

it('should have test dep', () => {
assert(ngModHasDep(fileContents, 'test') === true);
});
assert(ngModHasDep(fileContents, 'test') === true)
})

it('should not have test1 dep', () => {
assert(ngModHasDep(fileContents, 'test1') === false);
});
});
assert(ngModHasDep(fileContents, 'test1') === false)
})
})

0 comments on commit 7bd66a0

Please sign in to comment.