{"action":"created","issue":{"url":"https://api.github.com/repos/jscs-dev/gulp-jscs/issues/83","labels_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/issues/83/comments","events_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/issues/83/events","html_url":"https://github.com/jscs-dev/gulp-jscs/issues/83","id":70106095,"number":83,"title":"Adding option \"fix\" also requires you to specify \"configPath\"","user":{"login":"simonauner","id":1343979,"avatar_url":"https://avatars.githubusercontent.com/u/1343979?v=3","gravatar_id":"","url":"https://api.github.com/users/simonauner","html_url":"https://github.com/simonauner","followers_url":"https://api.github.com/users/simonauner/followers","following_url":"https://api.github.com/users/simonauner/following{/other_user}","gists_url":"https://api.github.com/users/simonauner/gists{/gist_id}","starred_url":"https://api.github.com/users/simonauner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonauner/subscriptions","organizations_url":"https://api.github.com/users/simonauner/orgs","repos_url":"https://api.github.com/users/simonauner/repos","events_url":"https://api.github.com/users/simonauner/events{/privacy}","received_events_url":"https://api.github.com/users/simonauner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-22T11:59:00Z","updated_at":"2015-04-22T12:02:49Z","closed_at":null,"body":"I love the fact that the plugin now supports `fix` - great job!\r\n\r\nHowever, when I added the `fix` option gulp-jscs no longer uses my own `.jscsrc` file.\r\n\r\nI would expect the following to still default to using `./.jscsrc`.\r\n```\r\nreturn gulp.src('app.js')\r\n        .pipe(plugins.jscs({\r\n            fix: true\r\n        }))\r\n        .pipe(gulp.dest('./src'));\r\n```\r\n But it doesn't. I have to specify \r\n```\r\nreturn gulp.src('app.js')\r\n        .pipe(plugins.jscs({\r\n            configPath: '.jscsrc',\r\n            fix: true\r\n        }))\r\n        .pipe(gulp.dest('./src'));\r\n```\r\n\r\n\r\nLikewise I expect\r\n```\r\nreturn gulp.src('app.js')\r\n        .pipe(plugins.jscs({}))\r\n        .pipe(gulp.dest('./src'));\r\n```\r\n\r\nto equal\r\n\r\n```\r\nreturn gulp.src('app.js')\r\n        .pipe(plugins.jscs())\r\n        .pipe(gulp.dest('./src'));\r\n```"},"comment":{"url":"https://api.github.com/repos/jscs-dev/gulp-jscs/issues/comments/95149851","html_url":"https://github.com/jscs-dev/gulp-jscs/issues/83#issuecomment-95149851","issue_url":"https://api.github.com/repos/jscs-dev/gulp-jscs/issues/83","id":95149851,"user":{"login":"simonauner","id":1343979,"avatar_url":"https://avatars.githubusercontent.com/u/1343979?v=3","gravatar_id":"","url":"https://api.github.com/users/simonauner","html_url":"https://github.com/simonauner","followers_url":"https://api.github.com/users/simonauner/followers","following_url":"https://api.github.com/users/simonauner/following{/other_user}","gists_url":"https://api.github.com/users/simonauner/gists{/gist_id}","starred_url":"https://api.github.com/users/simonauner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonauner/subscriptions","organizations_url":"https://api.github.com/users/simonauner/orgs","repos_url":"https://api.github.com/users/simonauner/repos","events_url":"https://api.github.com/users/simonauner/events{/privacy}","received_events_url":"https://api.github.com/users/simonauner/received_events","type":"User","site_admin":false},"created_at":"2015-04-22T12:02:49Z","updated_at":"2015-04-22T12:02:49Z","body":"I think I know how to solve it and be backwards-compatible and I'll file a PR as soon as I get time to, if anyone gets around to before me I think I have a solution below.\r\n\r\nCulprit:\r\n```\r\noptions = options || '.jscsrc';\r\n\r\nif (typeof options === 'string') {\r\n    options = {configPath: options};\r\n}\r\n```\r\nReplacing it with \r\n```\r\noptions = options || {};\r\n\r\nif (!options.configPath) {\r\n    options.configPath = '.jscsrc'\r\n}\r\n```"}}