{"action":"created","issue":{"url":"https://api.github.com/repos/prettier/prettier/issues/4912","repository_url":"https://api.github.com/repos/prettier/prettier","labels_url":"https://api.github.com/repos/prettier/prettier/issues/4912/labels{/name}","comments_url":"https://api.github.com/repos/prettier/prettier/issues/4912/comments","events_url":"https://api.github.com/repos/prettier/prettier/issues/4912/events","html_url":"https://github.com/prettier/prettier/issues/4912","id":345799273,"node_id":"MDU6SXNzdWUzNDU3OTkyNzM=","number":4912,"title":".prettierignore doesn't support negations in glob pattern","user":{"login":"TheHolyWaffle","id":787914,"node_id":"MDQ6VXNlcjc4NzkxNA==","avatar_url":"https://avatars1.githubusercontent.com/u/787914?v=4","gravatar_id":"","url":"https://api.github.com/users/TheHolyWaffle","html_url":"https://github.com/TheHolyWaffle","followers_url":"https://api.github.com/users/TheHolyWaffle/followers","following_url":"https://api.github.com/users/TheHolyWaffle/following{/other_user}","gists_url":"https://api.github.com/users/TheHolyWaffle/gists{/gist_id}","starred_url":"https://api.github.com/users/TheHolyWaffle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheHolyWaffle/subscriptions","organizations_url":"https://api.github.com/users/TheHolyWaffle/orgs","repos_url":"https://api.github.com/users/TheHolyWaffle/repos","events_url":"https://api.github.com/users/TheHolyWaffle/events{/privacy}","received_events_url":"https://api.github.com/users/TheHolyWaffle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-30T15:07:43Z","updated_at":"2018-07-30T15:52:02Z","closed_at":null,"author_association":"NONE","body":"**Environments:**\r\n- Prettier Version: 1.14.0\r\n- Running Prettier via: CLI\r\n- Runtime: Node 8\r\n- Operating System: Windows\r\n\r\n**Steps to reproduce:**\r\nI have 2 files sitting at:\r\n```\r\n- weblibs/mycompany/mymodule/1.0.0/index.js\r\n- weblibs/mycompany/mymodule/snapshot/index.js\r\n```\r\nI would like to ignore the index.js in folder '1.0.0' so I have the following .prettierignore sitting at my project root\r\n```\r\nweblibs/mycompany/mymodule/!(snapshot)/**/*.js\r\n```\r\n\r\nAfter that I run prettier on my folder with: `yarn run prettier \"**/*.js\" --write`\r\n\r\n**Expected behavior:**\r\n\r\nOnly index.js in folder 'snapshot' is prettified, while the '1.0.0' folder is ignored.\r\n\r\n**Actual behavior:**\r\nNo files are ignored, and both files are 'prettified'. It looks like prettier doesn't understand the negation pattern of the glob."},"comment":{"url":"https://api.github.com/repos/prettier/prettier/issues/comments/408912967","html_url":"https://github.com/prettier/prettier/issues/4912#issuecomment-408912967","issue_url":"https://api.github.com/repos/prettier/prettier/issues/4912","id":408912967,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODkxMjk2Nw==","user":{"login":"ikatyang","id":8341033,"node_id":"MDQ6VXNlcjgzNDEwMzM=","avatar_url":"https://avatars1.githubusercontent.com/u/8341033?v=4","gravatar_id":"","url":"https://api.github.com/users/ikatyang","html_url":"https://github.com/ikatyang","followers_url":"https://api.github.com/users/ikatyang/followers","following_url":"https://api.github.com/users/ikatyang/following{/other_user}","gists_url":"https://api.github.com/users/ikatyang/gists{/gist_id}","starred_url":"https://api.github.com/users/ikatyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikatyang/subscriptions","organizations_url":"https://api.github.com/users/ikatyang/orgs","repos_url":"https://api.github.com/users/ikatyang/repos","events_url":"https://api.github.com/users/ikatyang/events{/privacy}","received_events_url":"https://api.github.com/users/ikatyang/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T15:52:02Z","updated_at":"2018-07-30T15:52:02Z","author_association":"MEMBER","body":"Per [.gitignore spec](https://git-scm.com/docs/gitignore), negate pattern should start with `!`:\r\n\r\n```\r\nweblibs/mycompany/mymodule/**/*.js\r\n!weblibs/mycompany/mymodule/snapshot/**/*.js\r\n```"}}
{"actor":{"display_login":"ikatyang"}}