Questions tagged [gulp-jscs]

Gulp plugin for checking javascript code style with jscs

gulp-jscs is a gulp plugin for checking javascript code style with jscs.

https://github.com/jscs-dev/gulp-jscs

JSCS is a code style linter for programmatically enforcing your style guide. You can configure JSCS for your project in detail using over 90 validation rules, including presets from popular style guides like jQuery, Airbnb, Google, and more.

http://jscs.info/

19 questions
8
votes
3 answers

gulp-jscs Object.keys called on non-object

I'm a novice at gulp, and trying to play with it. I get this error when I try to use gulp-jscs 'default' errored after 98 ms [16:58:00] TypeError: Object.keys called on non-object at Function.keys (native) at…
Khaled Karam
  • 173
  • 1
  • 4
  • 13
7
votes
1 answer

gulp-jscs autofix doesn't work

I have the following code in my gulpfile.js gulp.src(['server.js']) .pipe(jscs({fix: true})) .pipe(gulp.dest('prod-app')); But in prod-app/server.js is the same file as server.js. Without any fixes. How to fix it?
Gregory Leleytner
  • 159
  • 1
  • 1
  • 7
4
votes
1 answer

Gulp Jscs - TypeError: Cannot convert undefined or null to object

I wanted to use gulp-jscs in my project, so I've installed it according the documentation: npm install --save-dev gulp-jscs But when I try to run the gulp file, I'm getting this error: TypeError: Cannot convert undefined or null to object at…
ToTa
  • 3,304
  • 2
  • 19
  • 39
4
votes
1 answer

How to get gulp-jshint to ignore folders

I have the following folder structure within a solution that I have inherited .\gulp.config.js .\gulpfile.js .\.jscsrc .\.jshintrc .\default.js .\Resources\js\main.js .\Resources\js\modules\ various user created js files .\Resources\js\vendor\ …
Darren Guy
  • 1,123
  • 2
  • 13
  • 39
3
votes
1 answer

GULP: Modify a watched file in place without causing an infinite loop

Im trying to use gulp and jscs to prevent code smell. I also want to use watch so that this happens when ever a change is made. The problem I'm running into is jscs is modify the source file that is being watched. This causes gulp to go into an…
2
votes
0 answers

Using gulp-jscs for multiple sources with multiple destinations

Assuming my structure looks like this: - app.js - .jscsrc - gulpfile.babel.js …
Harrys Kavan
  • 741
  • 9
  • 28
2
votes
1 answer

Infinite watch loop with gulp on auto-updated / auto-generated files

I am attempting to use some gulp plugins ( jscs, csscomb ) to style my code on the fly during dev time. I'm having a problem with the gulp process running an infinite loop with the format task. What's I believe to be happening: start a serve task…
geschwe1
  • 323
  • 3
  • 14
2
votes
1 answer

Can't get gulp-jscs to write fixed files over originals

No problems running the gulp-jscs plugin to analyze my code using the following task. However when I add fix:true, nothing changes in the files and JSCS now acts like it isn't running at all... when I remove the object passed into the JSCS plugin…
Andrew Connell
  • 4,939
  • 5
  • 30
  • 42
2
votes
1 answer

gulpjs merge css and less

I'm trying to take my less files and convert them into css files, then take other css files and combine the two sets together to form one css file. I don't get any errors but the css file is never created. Is there a way to combine two different…
Corey Witherow
  • 2,472
  • 2
  • 26
  • 37
1
vote
0 answers

Unable to load JSCS config file

I new in "Gulp". I see this error when I start task with use gulp-jscs (v3.0.0) TypeError: Unable to load JSCS config file Unable to load JSCS config file at Function.keys (native) at copyConfiguration…
1
vote
1 answer

gulp-jscs save report to file

Is there a possibility to run jscs check and using gulp and save report it produces to a file? I want junit style xml files reports saved somewhere. I can do this using direct command line call with > but how to do it using proper gulp?
David
  • 3,190
  • 8
  • 25
  • 31
1
vote
0 answers

Making a custom reporter for JSCS results in Gulp4

Please correct me where I'm wrong (still learning Gulp, Streams, etc.) I'd like to create a custom reporter for my gulp-jscs results. For example, let's say I have 3 files in my gulp.src() stream. To my knowledge, each is piped one at a time through…
Aaron Martone
  • 61
  • 1
  • 6
1
vote
1 answer

How to create a JSCS config file on windows

When I try to create a JSCS config file: C:\Blog\BlogWeb>jscs --auto-configure "C:\Blog\BlogWeb\temp.jscs" I get the following error: safeContextKeyword option requires string or array value What parameter am I supposed to pass? What is a…
Hoppe
  • 6,508
  • 17
  • 60
  • 114
0
votes
2 answers

Getting: SyntaxError: missing ) after argument list but can't find out whats wrong with hulpfile.js

Hi I'm getting an error starting 'gulp default' with the following gulp file. I cannot figure out whats wrong with the file. var gulp = require('gulp'); var sass = require('gulp-sass'); var sourcemaps = require('gulp-sourcemaps'); var autoprefixer =…
0
votes
1 answer

IntelliJ IDEA displaying JavaScript files with errors

I am new to IntelliJ Idea. When viewing .js files through the IDE it will display an issue with pink color in the header saying JSCS: Cannot find 'jscs' script file under JSCS package directory. I have tried to solve it by configuring JSCS…
A.Wen
  • 223
  • 1
  • 5
  • 23
1
2