{"action":"created","comment":{"url":"https://api.github.com/repos/eslint/eslint/pulls/comments/48457326","id":48457326,"diff_hunk":"@@ -81,64 +124,139 @@ function findIgnoreFile(cwd) {\n  * IgnoredPaths\n  * @constructor\n  * @class IgnoredPaths\n- * @param {Array} patterns to be matched against file paths\n+ * @param {Object} options object containing 'ignore', 'ignorePath' and 'patterns' properties\n  */\n-function IgnoredPaths(patterns) {\n-    this.patterns = patterns;\n-}\n+function IgnoredPaths(options) {\n \n-/**\n- * IgnoredPaths initializer\n- * @param {Object} options object containing 'ignore' and 'ignorePath' properties\n- * @returns {IgnoredPaths} object, with patterns loaded from the ignore file\n- */\n-IgnoredPaths.load = function(options) {\n-    var patterns;\n+    options = mergeDefaultOptions(options);\n \n-    options = options || {};\n+    /**\n+     * Called when a possible os incompatibility was detected\n+     * @param {string} message Hint to add to the compatibility warning\n+     * @returns {void}\n+     */\n+    function printOsCompatibilityWarning(message) {\n+        if (options.onOsCompatibilityIssue instanceof Function) {\n+            options.onOsCompatibilityIssue([\n+                \"warning: two-globstar ignore pattern is not compatible with OSX.\",\n+                message\n+            ].join(\" \"));\n+        }\n+    }\n \n-    if (options.ignore) {\n-        patterns = loadIgnoreFile(options.ignorePath || findIgnoreFile(options.cwd));\n-    } else {\n-        patterns = [];\n+    /**\n+     * add pattern to node-ignore instance\n+     * @param {object} ig, instance of node-ignore\n+     * @param {string} pattern, pattern do add to ig\n+     * @returns {array} raw ignore rules\n+     */\n+    function addPattern(ig, pattern) {\n+        if (pattern.indexOf(\"**\") !== -1) {\n+            printOsCompatibilityWarning(pattern);\n+        }\n+        return ig.addPattern(pattern);\n     }\n \n-    if (options.ignorePattern) {\n-        patterns = patterns.concat(options.ignorePattern);\n+    /**\n+     * add ignore file to node-ignore instance\n+     * @param {object} ig, instance of node-ignore\n+     * @param {string} filepath, file to add to ig\n+     * @returns {array} raw ignore rules\n+     */\n+    function addIgnoreFile(ig, filepath) {\n+        var fileContent = fs.readFileSync(filepath, \"utf8\");\n+        if (fileContent.indexOf(\"**\") !== -1) {\n+            printOsCompatibilityWarning(\"source: \" + filepath);","path":"lib/ignored-paths.js","position":205,"original_position":204,"commit_id":"21d4ee96d56f406e4986bcb06718870150091536","original_commit_id":"7aa1b63a7f3be90a295c3d04d69d23501407a6ea","user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"body":"Wait. Why is this PR changing the syntax to not require **? I wanted eslintignore to be more like gitignore, not less!!","created_at":"2015-12-27T19:01:06Z","updated_at":"2015-12-27T19:01:06Z","html_url":"https://github.com/eslint/eslint/pull/3948#discussion_r48457326","pull_request_url":"https://api.github.com/repos/eslint/eslint/pulls/3948","_links":{"self":{"href":"https://api.github.com/repos/eslint/eslint/pulls/comments/48457326"},"html":{"href":"https://github.com/eslint/eslint/pull/3948#discussion_r48457326"},"pull_request":{"href":"https://api.github.com/repos/eslint/eslint/pulls/3948"}}},"pull_request":{"url":"https://api.github.com/repos/eslint/eslint/pulls/3948","id":46101351,"html_url":"https://github.com/eslint/eslint/pull/3948","diff_url":"https://github.com/eslint/eslint/pull/3948.diff","patch_url":"https://github.com/eslint/eslint/pull/3948.patch","issue_url":"https://api.github.com/repos/eslint/eslint/issues/3948","number":3948,"state":"open","locked":false,"title":"Breaking: ignore absolute paths relative to .eslintignore (fixes #2365)","user":{"login":"gronke","id":473924,"avatar_url":"https://avatars.githubusercontent.com/u/473924?v=3","gravatar_id":"","url":"https://api.github.com/users/gronke","html_url":"https://github.com/gronke","followers_url":"https://api.github.com/users/gronke/followers","following_url":"https://api.github.com/users/gronke/following{/other_user}","gists_url":"https://api.github.com/users/gronke/gists{/gist_id}","starred_url":"https://api.github.com/users/gronke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gronke/subscriptions","organizations_url":"https://api.github.com/users/gronke/orgs","repos_url":"https://api.github.com/users/gronke/repos","events_url":"https://api.github.com/users/gronke/events{/privacy}","received_events_url":"https://api.github.com/users/gronke/received_events","type":"User","site_admin":false},"body":"fixes #2365 \r\n\r\nWhen a `.eslintignore` file is loaded by `IgnoredPaths` lib the absolute path of the file is stored as `IgnoredPaths.baseDir`, that is later used for absolute path prefix for file matches.","created_at":"2015-09-27T13:47:34Z","updated_at":"2015-12-27T19:01:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa258da86a61473823fa2403872e79705758aed7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eslint/eslint/pulls/3948/commits","review_comments_url":"https://api.github.com/repos/eslint/eslint/pulls/3948/comments","review_comment_url":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/3948/comments","statuses_url":"https://api.github.com/repos/eslint/eslint/statuses/21d4ee96d56f406e4986bcb06718870150091536","head":{"label":"gronke:issue-2365","ref":"issue-2365","sha":"21d4ee96d56f406e4986bcb06718870150091536","user":{"login":"gronke","id":473924,"avatar_url":"https://avatars.githubusercontent.com/u/473924?v=3","gravatar_id":"","url":"https://api.github.com/users/gronke","html_url":"https://github.com/gronke","followers_url":"https://api.github.com/users/gronke/followers","following_url":"https://api.github.com/users/gronke/following{/other_user}","gists_url":"https://api.github.com/users/gronke/gists{/gist_id}","starred_url":"https://api.github.com/users/gronke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gronke/subscriptions","organizations_url":"https://api.github.com/users/gronke/orgs","repos_url":"https://api.github.com/users/gronke/repos","events_url":"https://api.github.com/users/gronke/events{/privacy}","received_events_url":"https://api.github.com/users/gronke/received_events","type":"User","site_admin":false},"repo":{"id":43240256,"name":"eslint","full_name":"gronke/eslint","owner":{"login":"gronke","id":473924,"avatar_url":"https://avatars.githubusercontent.com/u/473924?v=3","gravatar_id":"","url":"https://api.github.com/users/gronke","html_url":"https://github.com/gronke","followers_url":"https://api.github.com/users/gronke/followers","following_url":"https://api.github.com/users/gronke/following{/other_user}","gists_url":"https://api.github.com/users/gronke/gists{/gist_id}","starred_url":"https://api.github.com/users/gronke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gronke/subscriptions","organizations_url":"https://api.github.com/users/gronke/orgs","repos_url":"https://api.github.com/users/gronke/repos","events_url":"https://api.github.com/users/gronke/events{/privacy}","received_events_url":"https://api.github.com/users/gronke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gronke/eslint","description":"A fully pluggable tool for identifying and reporting on patterns in JavaScript.","fork":true,"url":"https://api.github.com/repos/gronke/eslint","forks_url":"https://api.github.com/repos/gronke/eslint/forks","keys_url":"https://api.github.com/repos/gronke/eslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gronke/eslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gronke/eslint/teams","hooks_url":"https://api.github.com/repos/gronke/eslint/hooks","issue_events_url":"https://api.github.com/repos/gronke/eslint/issues/events{/number}","events_url":"https://api.github.com/repos/gronke/eslint/events","assignees_url":"https://api.github.com/repos/gronke/eslint/assignees{/user}","branches_url":"https://api.github.com/repos/gronke/eslint/branches{/branch}","tags_url":"https://api.github.com/repos/gronke/eslint/tags","blobs_url":"https://api.github.com/repos/gronke/eslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gronke/eslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gronke/eslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/gronke/eslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gronke/eslint/statuses/{sha}","languages_url":"https://api.github.com/repos/gronke/eslint/languages","stargazers_url":"https://api.github.com/repos/gronke/eslint/stargazers","contributors_url":"https://api.github.com/repos/gronke/eslint/contributors","subscribers_url":"https://api.github.com/repos/gronke/eslint/subscribers","subscription_url":"https://api.github.com/repos/gronke/eslint/subscription","commits_url":"https://api.github.com/repos/gronke/eslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/gronke/eslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/gronke/eslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/gronke/eslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/gronke/eslint/contents/{+path}","compare_url":"https://api.github.com/repos/gronke/eslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gronke/eslint/merges","archive_url":"https://api.github.com/repos/gronke/eslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gronke/eslint/downloads","issues_url":"https://api.github.com/repos/gronke/eslint/issues{/number}","pulls_url":"https://api.github.com/repos/gronke/eslint/pulls{/number}","milestones_url":"https://api.github.com/repos/gronke/eslint/milestones{/number}","notifications_url":"https://api.github.com/repos/gronke/eslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gronke/eslint/labels{/name}","releases_url":"https://api.github.com/repos/gronke/eslint/releases{/id}","created_at":"2015-09-27T08:57:13Z","updated_at":"2015-09-27T08:57:16Z","pushed_at":"2015-12-27T15:09:55Z","git_url":"git://github.com/gronke/eslint.git","ssh_url":"git@github.com:gronke/eslint.git","clone_url":"https://github.com/gronke/eslint.git","svn_url":"https://github.com/gronke/eslint","homepage":"http://eslint.org","size":8677,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eslint:master","ref":"master","sha":"6a607bd0a2ca455b16cb3bbf42443c5a5146eb71","user":{"login":"eslint","id":6019716,"avatar_url":"https://avatars.githubusercontent.com/u/6019716?v=3","gravatar_id":"","url":"https://api.github.com/users/eslint","html_url":"https://github.com/eslint","followers_url":"https://api.github.com/users/eslint/followers","following_url":"https://api.github.com/users/eslint/following{/other_user}","gists_url":"https://api.github.com/users/eslint/gists{/gist_id}","starred_url":"https://api.github.com/users/eslint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eslint/subscriptions","organizations_url":"https://api.github.com/users/eslint/orgs","repos_url":"https://api.github.com/users/eslint/repos","events_url":"https://api.github.com/users/eslint/events{/privacy}","received_events_url":"https://api.github.com/users/eslint/received_events","type":"Organization","site_admin":false},"repo":{"id":11061773,"name":"eslint","full_name":"eslint/eslint","owner":{"login":"eslint","id":6019716,"avatar_url":"https://avatars.githubusercontent.com/u/6019716?v=3","gravatar_id":"","url":"https://api.github.com/users/eslint","html_url":"https://github.com/eslint","followers_url":"https://api.github.com/users/eslint/followers","following_url":"https://api.github.com/users/eslint/following{/other_user}","gists_url":"https://api.github.com/users/eslint/gists{/gist_id}","starred_url":"https://api.github.com/users/eslint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eslint/subscriptions","organizations_url":"https://api.github.com/users/eslint/orgs","repos_url":"https://api.github.com/users/eslint/repos","events_url":"https://api.github.com/users/eslint/events{/privacy}","received_events_url":"https://api.github.com/users/eslint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eslint/eslint","description":"A fully pluggable tool for identifying and reporting on patterns in JavaScript.","fork":false,"url":"https://api.github.com/repos/eslint/eslint","forks_url":"https://api.github.com/repos/eslint/eslint/forks","keys_url":"https://api.github.com/repos/eslint/eslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eslint/eslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eslint/eslint/teams","hooks_url":"https://api.github.com/repos/eslint/eslint/hooks","issue_events_url":"https://api.github.com/repos/eslint/eslint/issues/events{/number}","events_url":"https://api.github.com/repos/eslint/eslint/events","assignees_url":"https://api.github.com/repos/eslint/eslint/assignees{/user}","branches_url":"https://api.github.com/repos/eslint/eslint/branches{/branch}","tags_url":"https://api.github.com/repos/eslint/eslint/tags","blobs_url":"https://api.github.com/repos/eslint/eslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eslint/eslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eslint/eslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/eslint/eslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eslint/eslint/statuses/{sha}","languages_url":"https://api.github.com/repos/eslint/eslint/languages","stargazers_url":"https://api.github.com/repos/eslint/eslint/stargazers","contributors_url":"https://api.github.com/repos/eslint/eslint/contributors","subscribers_url":"https://api.github.com/repos/eslint/eslint/subscribers","subscription_url":"https://api.github.com/repos/eslint/eslint/subscription","commits_url":"https://api.github.com/repos/eslint/eslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/eslint/eslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/eslint/eslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/eslint/eslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/eslint/eslint/contents/{+path}","compare_url":"https://api.github.com/repos/eslint/eslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eslint/eslint/merges","archive_url":"https://api.github.com/repos/eslint/eslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eslint/eslint/downloads","issues_url":"https://api.github.com/repos/eslint/eslint/issues{/number}","pulls_url":"https://api.github.com/repos/eslint/eslint/pulls{/number}","milestones_url":"https://api.github.com/repos/eslint/eslint/milestones{/number}","notifications_url":"https://api.github.com/repos/eslint/eslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eslint/eslint/labels{/name}","releases_url":"https://api.github.com/repos/eslint/eslint/releases{/id}","created_at":"2013-06-29T23:59:48Z","updated_at":"2015-12-27T18:56:20Z","pushed_at":"2015-12-27T18:09:22Z","git_url":"git://github.com/eslint/eslint.git","ssh_url":"git@github.com:eslint/eslint.git","clone_url":"https://github.com/eslint/eslint.git","svn_url":"https://github.com/eslint/eslint","homepage":"http://eslint.org","size":11756,"stargazers_count":3665,"watchers_count":3665,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":701,"mirror_url":null,"open_issues_count":168,"forks":701,"open_issues":168,"watchers":3665,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eslint/eslint/pulls/3948"},"html":{"href":"https://github.com/eslint/eslint/pull/3948"},"issue":{"href":"https://api.github.com/repos/eslint/eslint/issues/3948"},"comments":{"href":"https://api.github.com/repos/eslint/eslint/issues/3948/comments"},"review_comments":{"href":"https://api.github.com/repos/eslint/eslint/pulls/3948/comments"},"review_comment":{"href":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eslint/eslint/pulls/3948/commits"},"statuses":{"href":"https://api.github.com/repos/eslint/eslint/statuses/21d4ee96d56f406e4986bcb06718870150091536"}}}}