Questions tagged [jscs]

JSCS is a code style checker for JavaScript.

JSCS — JavaScript Code Style.

Notice that lately, it was announced that JSCS is merging with ESLInt.

is a code style checker. You can configure for your project in detail using over 90 validation rules, including presets from popular style guides like jQuery.

Presets

Friendly packages

Extensions

77 questions
4
votes
0 answers

How do you override a linter-jscs preset?

I'd like to override the disallowMultipleVarDecl property in linter-jscs. I tried doing the following in .jscsrc: { "preset": "airbnb", "esnext": true, "requireTrailingComma": null, "disallowMultipleVarDecl": false } I've quit (not…
Adam Zerner
  • 17,797
  • 15
  • 90
  • 156
4
votes
1 answer

jscs validateIndentation with spaces .editorconfig

Having this .editorconfig: # editorconfig.org root = true [*] indent_style = space indent_size = 4 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.md] trim_trailing_whitespace = false what's the…
Whisher
  • 31,320
  • 32
  • 120
  • 201
4
votes
1 answer

Get VSCode to use JSCS formatting rules

Is there a way to integrate VSCode with JSCS? By that I mean: change the default indentation amount of spaces, make the format option (Alt+Shift+F) format the JavaScript code using .jscsrc rules and presets?
4
votes
1 answer

How can I suppress the JSHint "JSCS: Illegal Space" warnings in Visual Studio 2013?

We're using JSHint in a Visual Studio 2013 solution. When building, we are seeing some formatting warnings for items that break style warnings, but are functionally valid. Specifically, I would like to suppress the "Illegal Space" warnings. I…
Ken Palmer
  • 2,355
  • 5
  • 37
  • 57
3
votes
0 answers

How to set a default custom preset for linter-jscs to use with Atom Editor?

Using linter-jscs for Atom Editor, is there a way to set a default custom jscs preset for all projects? After reading the docs, I tried editing the file .atom/packages/linter-jscs/.jscsrc with the following code but it seemed to be ignored: { …
Loque
  • 241
  • 1
  • 9
3
votes
1 answer

JSHint and JSCS inline ignore for the same next line

Is it possible to somehow make JSHint and JSCS play along nicely on inline ignore for the same next line? I would like to do something like: /* jshint camelcase: false, jscs requireCamelCaseOrUpperCaseIdentifiers: false */ I tried a couple of…
tkit
  • 8,082
  • 6
  • 40
  • 71
3
votes
1 answer

How to select a custom .jscsrc file

We have multiple projects with various .jscsrc files. I'd like to use one that I defined, which is stricter than most projects. In my case its ~/.jscsrc. How can I configure sublime-linter to use that file for jscs? Thanks!
Ben
  • 10,020
  • 21
  • 94
  • 157
3
votes
0 answers

Atom Jscs linter for embedded JavaScript in HTML

I am trying Atom as new editor for my Polymer project, currently I use Sublime Text 3. Two of the most usefull features I frequently use are Jscs and Jshint so I succesfully installed AtomLinter linter-jshint and linter-jscs…
Simone
  • 31
  • 2
3
votes
1 answer

How to replace deprecated JSHint options with JSCS rules?

The JSHint option reference lists some options as deprecated with the following notice. Warning This option has been deprecated and will be removed in the next major release of JSHint. JSHint is limiting its scope to issues of code correctness.…
GOTO 0
  • 42,323
  • 22
  • 125
  • 158
2
votes
1 answer

Exclude files in jscs vscode

There is a .jscsrc file in the root directory of the project and it has settings set by other people and I want to add my own options but only on my own vscode. Like excluding gulpfile.js. I currently have the snippet below in my…
Dev
  • 1,592
  • 2
  • 22
  • 45
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

Atom Editor / Sublime Text - Code formatter that respect .editorconfig and .jscsrc

Is there any code formatter plugin for Atom Editor & Sublime Text that respect .editorconfig & .jscsrc files? For example, if my .editorconfig has the following settings # 4 space indentation [*.js] indent_style = space indent_size = 4 and .jscsrc…
Sarbbottam
  • 5,410
  • 4
  • 30
  • 41
2
votes
2 answers

Gulp: Jscs with parameter

does anybody know how to run JSCS from gulp with parameter ? I want to add -x options which autoformats script (see https://twitter.com/jscs_dev). Orginally, I can type in console: jscs my_Path -x I want do do the same, just in gulp. My gulp code…
TMachna
  • 279
  • 1
  • 2
  • 10
2
votes
2 answers

How to disable JSCS validation for a specific part of code: Line must be at most 120 characters

In a specific part of my code I need to allow a string to longer that 120 characters. I would like to disable for that line of code JSCS validation. At the moment I get JSCS: Line must be at most 120 characters How to do it?
GibboK
  • 71,848
  • 143
  • 435
  • 658