{"action":"created","issue":{"url":"https://api.github.com/repos/okonet/lint-staged/issues/201","repository_url":"https://api.github.com/repos/okonet/lint-staged","labels_url":"https://api.github.com/repos/okonet/lint-staged/issues/201/labels{/name}","comments_url":"https://api.github.com/repos/okonet/lint-staged/issues/201/comments","events_url":"https://api.github.com/repos/okonet/lint-staged/issues/201/events","html_url":"https://github.com/okonet/lint-staged/issues/201","id":237496555,"number":201,"title":"Feature: Allow passing arrays of globs","user":{"login":"okonet","id":11071,"avatar_url":"https://avatars3.githubusercontent.com/u/11071?v=4","gravatar_id":"","url":"https://api.github.com/users/okonet","html_url":"https://github.com/okonet","followers_url":"https://api.github.com/users/okonet/followers","following_url":"https://api.github.com/users/okonet/following{/other_user}","gists_url":"https://api.github.com/users/okonet/gists{/gist_id}","starred_url":"https://api.github.com/users/okonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okonet/subscriptions","organizations_url":"https://api.github.com/users/okonet/orgs","repos_url":"https://api.github.com/users/okonet/repos","events_url":"https://api.github.com/users/okonet/events{/privacy}","received_events_url":"https://api.github.com/users/okonet/received_events","type":"User","site_admin":false},"labels":[{"id":311716181,"url":"https://api.github.com/repos/okonet/lint-staged/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"okonet","id":11071,"avatar_url":"https://avatars3.githubusercontent.com/u/11071?v=4","gravatar_id":"","url":"https://api.github.com/users/okonet","html_url":"https://github.com/okonet","followers_url":"https://api.github.com/users/okonet/followers","following_url":"https://api.github.com/users/okonet/following{/other_user}","gists_url":"https://api.github.com/users/okonet/gists{/gist_id}","starred_url":"https://api.github.com/users/okonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okonet/subscriptions","organizations_url":"https://api.github.com/users/okonet/orgs","repos_url":"https://api.github.com/users/okonet/repos","events_url":"https://api.github.com/users/okonet/events{/privacy}","received_events_url":"https://api.github.com/users/okonet/received_events","type":"User","site_admin":false},"assignees":[{"login":"okonet","id":11071,"avatar_url":"https://avatars3.githubusercontent.com/u/11071?v=4","gravatar_id":"","url":"https://api.github.com/users/okonet","html_url":"https://github.com/okonet","followers_url":"https://api.github.com/users/okonet/followers","following_url":"https://api.github.com/users/okonet/following{/other_user}","gists_url":"https://api.github.com/users/okonet/gists{/gist_id}","starred_url":"https://api.github.com/users/okonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okonet/subscriptions","organizations_url":"https://api.github.com/users/okonet/orgs","repos_url":"https://api.github.com/users/okonet/repos","events_url":"https://api.github.com/users/okonet/events{/privacy}","received_events_url":"https://api.github.com/users/okonet/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-06-21T11:04:57Z","updated_at":"2017-09-07T07:54:48Z","closed_at":null,"author_association":"OWNER","body":"Sometimes it's desired to pass an array of globs instead of just one glob to simplify negation, for example. Right now this isn't possible since glob is the object key in the JSON notation and making it an array will lead to malformed JSON.\r\n\r\nThere is a proposed solution https://github.com/okonet/lint-staged/pull/188 to create a special syntax to split strings but IMO syntax isn't very user-friendly.\r\n\r\nIn order to make this change, we'll need to update the config format which will be a breaking change. But before we do that, I'd really like to implement better config validation.\r\n\r\nWe should use https://github.com/micromatch/micromatch for this one"},"comment":{"url":"https://api.github.com/repos/okonet/lint-staged/issues/comments/327719740","html_url":"https://github.com/okonet/lint-staged/issues/201#issuecomment-327719740","issue_url":"https://api.github.com/repos/okonet/lint-staged/issues/201","id":327719740,"user":{"login":"sudo-suhas","id":22251956,"avatar_url":"https://avatars2.githubusercontent.com/u/22251956?v=4","gravatar_id":"","url":"https://api.github.com/users/sudo-suhas","html_url":"https://github.com/sudo-suhas","followers_url":"https://api.github.com/users/sudo-suhas/followers","following_url":"https://api.github.com/users/sudo-suhas/following{/other_user}","gists_url":"https://api.github.com/users/sudo-suhas/gists{/gist_id}","starred_url":"https://api.github.com/users/sudo-suhas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudo-suhas/subscriptions","organizations_url":"https://api.github.com/users/sudo-suhas/orgs","repos_url":"https://api.github.com/users/sudo-suhas/repos","events_url":"https://api.github.com/users/sudo-suhas/events{/privacy}","received_events_url":"https://api.github.com/users/sudo-suhas/received_events","type":"User","site_admin":false},"created_at":"2017-09-07T07:54:48Z","updated_at":"2017-09-07T07:54:48Z","author_association":"COLLABORATOR","body":"@okonet I think it is possible to support this feature without a backward incompatible config structure change:\r\n```js\r\n[\r\n  { \r\n    \"globs\": [\"*.js\", \"!*ignore.js\"],\r\n    \"scripts\": [\"eslint --fix\", \"git add\"] // or a string\r\n  }\r\n]\r\n```\r\n\r\nWe can easily convert the current structure to this."}}
{"actor":{"display_login":"sudo-suhas"}}