jscs

JSCS checks for ngdocs?

左心房为你撑大大i 提交于 2020-01-15 19:12:45
问题 Wondering if there are any JSCS checks for ngdocs? Alternatively which documentation framework do you suggest for AngularJS code and the possibility to check if code is documented well? maybe related to this: A 'documentation coverage' of grunt-ngdocs 回答1: I managed to get this working with the following .jscsrc: { "preset": "google", "maximumLineLength": 120, "disallowMultipleVarDecl": false, "jsDoc": { "checkAnnotations": { "preset": "jsdoc3", "extra": { "ngdoc": "some", "methodOf": "some"

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

旧街凉风 提交于 2019-12-12 11:29:00
问题 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 consider warnings like this in the build error list visual chaff: JSCS: Illegal space before opening curly brace JSCS: Illegal space before opening round brace Here's why. I'm a fan of using the Visual Studio auto-formatting feature (Ctrl+K+D). In a

disallowTrailingComma does not work in jscs

陌路散爱 提交于 2019-12-12 06:07:14
问题 I am using http://jscs.info. I need to get a warning if my app has left trailing comma, example, using: var x = { prop1: 10, prop2: 20, }; I should get a warning. With the following settings: disallowTrailingComma true requireTrailingComma true I cannot get the warning. What I am doing wrong here? { "disallowCommaBeforeLineBreak": null, "disallowDanglingUnderscores": true, "disallowEmptyBlocks": true, "disallowImplicitTypeConversion": [ "string" ], "disallowKeywordsOnNewLine": [ "else" ],

gulp-jscs autofix doesn't work

 ̄綄美尐妖づ 提交于 2019-12-10 12:59:13
问题 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? 回答1: You can read about base option to modify a lot of scripts together here and use it like this: gulp.task('lint-jscs-fix', function() { return gulp.src(quantumArtScripts, { base: './' }) .pipe(jscs({ fix: true })) .pipe(jscs.reporter()) // log all errors that should be fixed

How can I integrate jscs autofix feature into vim?

不问归期 提交于 2019-12-08 16:03:29
问题 I'm trying to get a command I can run within vim to get jscs auto correct formatting issues in my code. So far I've come up with : :nmap <F5> :!jscs -x .<CR> which is ok, but it runs it on the entire directory and I need to confirm to vim that I want to reload the buffer. Is there a way to get vim to fix the current file only and didsplay the changes without reloading? 回答1: This will pipe the current file through jscs's fix mode whenever you save the file (your mileage may vary using this in

How can I disable JSCS in Web Essentials for Visual Studio 2013?

天涯浪子 提交于 2019-12-05 11:59:31
问题 How might I disable JSCS in the latest version of Web Essentials for Visual Studio 2013? I was unable to find a relevant option in the menu. I tried setting the JSCS configuration to ignore all files. This caused it to occasionally generate messages that wouldn't leave my Error List panel until I cleaned the solution. 回答1: Web Essentials 2013 for Update 4 supports a .weignore file where you can disable JSCS, or other linters and compilers, independently of each other. See https://github.com

Linting Promises in Javascript

試著忘記壹切 提交于 2019-12-01 17:54:20
问题 I am looking to standardize the use of Q promises in my team's codebase. Are there any good jscs extensions (or other linters) to help enforce style when it comes to promises? We would like our promises to follow this form: promise() .then() .catch() .done(); And would like a linter to catch any .then() in our code that is missing a .catch() Advice for other stylistic tips when it comes to promises is welcome too. 回答1: @Jeff that approach looks as total overkill. Neither of this functions

How can I configure Web Essentials 2013 to ignore files?

痞子三分冷 提交于 2019-11-30 13:40:04
问题 I have a fresh MVC 5.1 web app project in VS 2013 (Update 1) w/ Web Essential 2013 (latest as of today) installed. After building the project, Web Essentials scans for javascript files and post messages to the output window for any issues it finds. For a brand new MVC 5.1 project, it generates over 11,000 messages - not really useful. I've tried two methods to get it to ignore the offending javascript files that are included with new MVC 5 projects by default: Used the Web Essentials > Edit