mirror of
https://github.com/openstf/stf
synced 2025-10-04 02:09:32 +02:00
Added JSCS style checking.
However, there are thousands of errors: it may need some rule relaxing. Still needs to check for JSHint overlap. Heated rules left out: "disallowAnonymousFunctions": true, "disallowCommaBeforeLineBreak": true "requireCommaBeforeLineBreak": true, "disallowKeywordsOnNewLine": true, "requireKeywordsOnNewLine": true
This commit is contained in:
parent
883fce71ea
commit
2445b179ee
3 changed files with 115 additions and 12 deletions
14
gulpfile.js
14
gulpfile.js
|
@ -15,6 +15,7 @@ var protractorConfig = './res/test/protractor.conf'
|
|||
var karma = require('karma').server
|
||||
var karmaConfig = '/res/test/karma.conf.js'
|
||||
var stream = require('stream')
|
||||
var jscs = require('gulp-jscs')
|
||||
|
||||
gulp.task('jshint', function () {
|
||||
return gulp.src([
|
||||
|
@ -34,6 +35,15 @@ gulp.task('jsonlint', function () {
|
|||
.pipe(jsonlint.reporter())
|
||||
})
|
||||
|
||||
gulp.task('jscs', function () {
|
||||
return gulp.src([
|
||||
'lib/**/*.js', 'res/app/**/*.js', 'res/auth-ldap/**/*.js',
|
||||
'res/auth-mock/**/*.js', 'res/common/**/*.js', 'res/test/**/*.js',
|
||||
'*.js'
|
||||
])
|
||||
.pipe(jscs())
|
||||
});
|
||||
|
||||
gulp.task('lint', ['jshint', 'jsonlint'])
|
||||
gulp.task('test', ['lint', 'protractor'])
|
||||
gulp.task('build', ['translate', 'webpack:build'])
|
||||
|
@ -65,7 +75,7 @@ gulp.task('protractor-explorer', function (callback) {
|
|||
}, callback)
|
||||
})
|
||||
|
||||
gulp.task('protractor', ['webdriver-update'],function (callback) {
|
||||
gulp.task('protractor', ['webdriver-update'], function (callback) {
|
||||
gulp.src(["./res/test/e2e/**/*.js"])
|
||||
.pipe(protractor.protractor({
|
||||
configFile: protractorConfig,
|
||||
|
@ -162,7 +172,7 @@ gulp.task('jade', function (cb) {
|
|||
locals: {
|
||||
// So res/views/docs.jade doesn't complain
|
||||
markdownFile: {
|
||||
parseContent: function() {
|
||||
parseContent: function () {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue