Articles of jscs

Node / NPM / Grunt在jscs上失败(grunt-jscs)

我有一个在JS代码基础上运行JSCS的grunt任务,它一直在工作,直到与使用最新,稳定版本的grunt,npm / node的构build服务器集成为止。 在npm 1.XX.X下全部运行正常,但在升级到2.XX.X后, 我尝试了最新的3.XX.X,并且以与2.XX.X相同的方式失败。 我认为所需的相关部分是 cli输出: $ node -v v5.2.0 $ npm -v 3.3.12 $ grunt –version grunt-cli v0.1.13 grunt v0.4.5 $ grunt jscs Loading "jscs.js" tasks…ERROR >> TypeError: fn.call is not a function Warning: Task "jscs" not found. Use –force to continue. Aborted due to warnings. 的package.json: { "name": "Javascript", "version": "1.0.0", […]

gulp-jscs Object.keys在非对象上调用

我是一个新手,尝试玩弄它。 我尝试使用gulp-jscs时出现此错误 'default' errored after 98 ms [16:58:00] TypeError: Object.keys called on non-object at Function.keys (native) at NodeConfiguration.Configuration._throwNonCamelCaseErrorIfNeeded (/home/kbadr/Node_Projects/demo/membership/node_modules/gulp-jscs/node_modules/jscs/lib/config/configuration.js:440:12) at NodeConfiguration.Configuration.load (/home/kbadr/Node_Projects/demo/membership/node_modules/gulp-jscs/node_modules/jscs/lib/config/configuration.js:51:10) at StringChecker.configure (/home/kbadr/Node_Projects/demo/membership/node_modules/gulp-jscs/node_modules/jscs/lib/string-checker.js:66:29) at Checker.configure (/home/kbadr/Node_Projects/demo/membership/node_modules/gulp-jscs/node_modules/jscs/lib/checker.js:26:39) at module.exports (/home/kbadr/Node_Projects/demo/membership/node_modules/gulp-jscs/index.js:31:11) at Gulp.<anonymous> (/home/kbadr/Node_Projects/demo/membership/gulpfile.js:22:15) at module.exports (/home/kbadr/Node_Projects/demo/membership/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7) at Gulp.Orchestrator._runTask (/home/kbadr/Node_Projects/demo/membership/node_modules/gulp/node_modules/orchestrator/index.js:273:3) at Gulp.Orchestrator._runStep (/home/kbadr/Node_Projects/demo/membership/node_modules/gulp/node_modules/orchestrator/index.js:214:10 这是我的大gulpfile var gulp = require('gulp'); var jscs = require('gulp-jscs'); gulp.task('default', function () […]