{"action":"closed","issue":{"url":"https://api.github.com/repos/jscs-dev/grunt-jscs/issues/94","labels_url":"https://api.github.com/repos/jscs-dev/grunt-jscs/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/jscs-dev/grunt-jscs/issues/94/comments","events_url":"https://api.github.com/repos/jscs-dev/grunt-jscs/issues/94/events","html_url":"https://github.com/jscs-dev/grunt-jscs/issues/94","id":102125017,"number":94,"title":"disabling rule when using config file and multiple targets","user":{"login":"djusv","id":2742119,"avatar_url":"https://avatars.githubusercontent.com/u/2742119?v=3","gravatar_id":"","url":"https://api.github.com/users/djusv","html_url":"https://github.com/djusv","followers_url":"https://api.github.com/users/djusv/followers","following_url":"https://api.github.com/users/djusv/following{/other_user}","gists_url":"https://api.github.com/users/djusv/gists{/gist_id}","starred_url":"https://api.github.com/users/djusv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djusv/subscriptions","organizations_url":"https://api.github.com/users/djusv/orgs","repos_url":"https://api.github.com/users/djusv/repos","events_url":"https://api.github.com/users/djusv/events{/privacy}","received_events_url":"https://api.github.com/users/djusv/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-20T12:10:14Z","updated_at":"2015-08-27T18:49:20Z","closed_at":"2015-08-27T18:49:20Z","body":"I'm currently working on a project where I'm happily using grunt-jscs.\r\nOnly today I might have found a little issue with inline options.\r\n\r\nWhen I have a config file with a specific rule and I want disable/ignore it in specific target\r\nit doesn't work for me. See example setup below\r\n\r\n```js\r\n// jscs config file\r\n{\r\n    \"preset\": \"google\",\r\n    \"disallowDanglingUnderscores\": true\r\n}\r\n\r\n// gruntfile\r\njscs: {\r\n    main: [ \"path/to/files/*.js\" ],\r\n    options: {\r\n        config: \".jscs\",\r\n    },\r\n    secondary: {    \r\n        files: {\r\n            src: [ \"path/to/more/files/**/*.js\", \"my-plugin.js\" ]\r\n        }\r\n    },\r\n    ternary: {\r\n        options: {\r\n            disallowDanglingUnderscores: null\r\n        },\r\n        files: {\r\n            src: \"happy-hippo.js\"\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nI found a working workaround for me:\r\n\r\n```js\r\n// jscs.js\r\nJSCS.prototype.getOptions = function() {\r\n.......\r\n    if ( !~taskOptions.indexOf( option ) ) {\r\n      var value = this.options[ option ];\r\n      _options[ option ] = value === false ? null : value;\r\n     }\r\n```\r\nThis allowed me to do the following\r\n```js\r\n    ternary: {\r\n        options: {\r\n            disallowDanglingUnderscores: false\r\n         }\r\n```"}}