{"action":"created","comment":{"url":"https://api.github.com/repos/palantir/tslint/pulls/comments/45685489","id":45685489,"diff_hunk":"@@ -57,26 +57,40 @@ export function findRule(name: string, rulesDirectory?: string) {\n         return Rule;\n     }\n \n-    // then check for rules within the first level of rulesDirectory\n-    if (rulesDirectory) {\n-        Rule = loadRule(rulesDirectory, camelizedName);\n-        if (Rule) {\n-            return Rule;\n+    // normalize the rulesDirectories argument\n+    let directories: Array<string> = [];\n+\n+    if (rulesDirectories) {\n+        if (typeof rulesDirectories === \"string\") {\n+            directories.push(rulesDirectories);\n+        } else {\n+            directories.push(...rulesDirectories);\n         }\n     }\n \n-    // finally check for rules within the first level of directories,\n-    // using dash prefixes as the sub-directory names\n-    if (rulesDirectory) {\n-        const subDirectory = strLeft(rulesDirectory, \"-\");\n-        const ruleName = strRight(rulesDirectory, \"-\");\n-        if (subDirectory !== rulesDirectory && ruleName !== rulesDirectory) {\n-            camelizedName = transformName(ruleName);\n-            Rule = loadRule(rulesDirectory, subDirectory, camelizedName);\n+    // loop through the custom directories\n+    for (let rulesDirectory of directories) {\n+        // then check for rules within the first level of rulesDirectory\n+        if (rulesDirectory) {\n+            Rule = loadRule(rulesDirectory, camelizedName);\n             if (Rule) {","path":"src/ruleLoader.ts","position":57,"original_position":57,"commit_id":"91467526c4cf4a179dc50c79398a485821e0166c","original_commit_id":"91467526c4cf4a179dc50c79398a485821e0166c","user":{"login":"adidahiya","id":723999,"avatar_url":"https://avatars.githubusercontent.com/u/723999?v=3","gravatar_id":"","url":"https://api.github.com/users/adidahiya","html_url":"https://github.com/adidahiya","followers_url":"https://api.github.com/users/adidahiya/followers","following_url":"https://api.github.com/users/adidahiya/following{/other_user}","gists_url":"https://api.github.com/users/adidahiya/gists{/gist_id}","starred_url":"https://api.github.com/users/adidahiya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adidahiya/subscriptions","organizations_url":"https://api.github.com/users/adidahiya/orgs","repos_url":"https://api.github.com/users/adidahiya/repos","events_url":"https://api.github.com/users/adidahiya/events{/privacy}","received_events_url":"https://api.github.com/users/adidahiya/received_events","type":"User","site_admin":false},"body":"`Rule != null`","created_at":"2015-11-24T01:06:43Z","updated_at":"2015-11-24T01:06:43Z","html_url":"https://github.com/palantir/tslint/pull/800#discussion_r45685489","pull_request_url":"https://api.github.com/repos/palantir/tslint/pulls/800","_links":{"self":{"href":"https://api.github.com/repos/palantir/tslint/pulls/comments/45685489"},"html":{"href":"https://github.com/palantir/tslint/pull/800#discussion_r45685489"},"pull_request":{"href":"https://api.github.com/repos/palantir/tslint/pulls/800"}}},"pull_request":{"url":"https://api.github.com/repos/palantir/tslint/pulls/800","id":50736970,"html_url":"https://github.com/palantir/tslint/pull/800","diff_url":"https://github.com/palantir/tslint/pull/800.diff","patch_url":"https://github.com/palantir/tslint/pull/800.patch","issue_url":"https://api.github.com/repos/palantir/tslint/issues/800","number":800,"state":"open","locked":false,"title":"Fixes #795 - adds the optional rulesDirectory property to tslint.json","user":{"login":"buzinas","id":7298695,"avatar_url":"https://avatars.githubusercontent.com/u/7298695?v=3","gravatar_id":"","url":"https://api.github.com/users/buzinas","html_url":"https://github.com/buzinas","followers_url":"https://api.github.com/users/buzinas/followers","following_url":"https://api.github.com/users/buzinas/following{/other_user}","gists_url":"https://api.github.com/users/buzinas/gists{/gist_id}","starred_url":"https://api.github.com/users/buzinas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buzinas/subscriptions","organizations_url":"https://api.github.com/users/buzinas/orgs","repos_url":"https://api.github.com/users/buzinas/repos","events_url":"https://api.github.com/users/buzinas/events{/privacy}","received_events_url":"https://api.github.com/users/buzinas/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-15T01:23:38Z","updated_at":"2015-11-24T01:06:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51d23b7cd0dd57207ddd4169bf37c9f4c4b2d3ec","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/palantir/tslint/pulls/800/commits","review_comments_url":"https://api.github.com/repos/palantir/tslint/pulls/800/comments","review_comment_url":"https://api.github.com/repos/palantir/tslint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/palantir/tslint/issues/800/comments","statuses_url":"https://api.github.com/repos/palantir/tslint/statuses/91467526c4cf4a179dc50c79398a485821e0166c","head":{"label":"buzinas:master","ref":"master","sha":"91467526c4cf4a179dc50c79398a485821e0166c","user":{"login":"buzinas","id":7298695,"avatar_url":"https://avatars.githubusercontent.com/u/7298695?v=3","gravatar_id":"","url":"https://api.github.com/users/buzinas","html_url":"https://github.com/buzinas","followers_url":"https://api.github.com/users/buzinas/followers","following_url":"https://api.github.com/users/buzinas/following{/other_user}","gists_url":"https://api.github.com/users/buzinas/gists{/gist_id}","starred_url":"https://api.github.com/users/buzinas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buzinas/subscriptions","organizations_url":"https://api.github.com/users/buzinas/orgs","repos_url":"https://api.github.com/users/buzinas/repos","events_url":"https://api.github.com/users/buzinas/events{/privacy}","received_events_url":"https://api.github.com/users/buzinas/received_events","type":"User","site_admin":false},"repo":{"id":46197679,"name":"tslint","full_name":"buzinas/tslint","owner":{"login":"buzinas","id":7298695,"avatar_url":"https://avatars.githubusercontent.com/u/7298695?v=3","gravatar_id":"","url":"https://api.github.com/users/buzinas","html_url":"https://github.com/buzinas","followers_url":"https://api.github.com/users/buzinas/followers","following_url":"https://api.github.com/users/buzinas/following{/other_user}","gists_url":"https://api.github.com/users/buzinas/gists{/gist_id}","starred_url":"https://api.github.com/users/buzinas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buzinas/subscriptions","organizations_url":"https://api.github.com/users/buzinas/orgs","repos_url":"https://api.github.com/users/buzinas/repos","events_url":"https://api.github.com/users/buzinas/events{/privacy}","received_events_url":"https://api.github.com/users/buzinas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/buzinas/tslint","description":"A linter for the TypeScript language.","fork":true,"url":"https://api.github.com/repos/buzinas/tslint","forks_url":"https://api.github.com/repos/buzinas/tslint/forks","keys_url":"https://api.github.com/repos/buzinas/tslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/buzinas/tslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/buzinas/tslint/teams","hooks_url":"https://api.github.com/repos/buzinas/tslint/hooks","issue_events_url":"https://api.github.com/repos/buzinas/tslint/issues/events{/number}","events_url":"https://api.github.com/repos/buzinas/tslint/events","assignees_url":"https://api.github.com/repos/buzinas/tslint/assignees{/user}","branches_url":"https://api.github.com/repos/buzinas/tslint/branches{/branch}","tags_url":"https://api.github.com/repos/buzinas/tslint/tags","blobs_url":"https://api.github.com/repos/buzinas/tslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/buzinas/tslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/buzinas/tslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/buzinas/tslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/buzinas/tslint/statuses/{sha}","languages_url":"https://api.github.com/repos/buzinas/tslint/languages","stargazers_url":"https://api.github.com/repos/buzinas/tslint/stargazers","contributors_url":"https://api.github.com/repos/buzinas/tslint/contributors","subscribers_url":"https://api.github.com/repos/buzinas/tslint/subscribers","subscription_url":"https://api.github.com/repos/buzinas/tslint/subscription","commits_url":"https://api.github.com/repos/buzinas/tslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/buzinas/tslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/buzinas/tslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/buzinas/tslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/buzinas/tslint/contents/{+path}","compare_url":"https://api.github.com/repos/buzinas/tslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/buzinas/tslint/merges","archive_url":"https://api.github.com/repos/buzinas/tslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/buzinas/tslint/downloads","issues_url":"https://api.github.com/repos/buzinas/tslint/issues{/number}","pulls_url":"https://api.github.com/repos/buzinas/tslint/pulls{/number}","milestones_url":"https://api.github.com/repos/buzinas/tslint/milestones{/number}","notifications_url":"https://api.github.com/repos/buzinas/tslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/buzinas/tslint/labels{/name}","releases_url":"https://api.github.com/repos/buzinas/tslint/releases{/id}","created_at":"2015-11-15T00:15:38Z","updated_at":"2015-11-15T00:15:41Z","pushed_at":"2015-11-15T01:21:50Z","git_url":"git://github.com/buzinas/tslint.git","ssh_url":"git@github.com:buzinas/tslint.git","clone_url":"https://github.com/buzinas/tslint.git","svn_url":"https://github.com/buzinas/tslint","homepage":null,"size":13560,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"palantir:master","ref":"master","sha":"46f8df75d82cd20e5b3642b15484b3c93e09697e","user":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":11672345,"name":"tslint","full_name":"palantir/tslint","owner":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/palantir/tslint","description":"A linter for the TypeScript language.","fork":false,"url":"https://api.github.com/repos/palantir/tslint","forks_url":"https://api.github.com/repos/palantir/tslint/forks","keys_url":"https://api.github.com/repos/palantir/tslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/tslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/tslint/teams","hooks_url":"https://api.github.com/repos/palantir/tslint/hooks","issue_events_url":"https://api.github.com/repos/palantir/tslint/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/tslint/events","assignees_url":"https://api.github.com/repos/palantir/tslint/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/tslint/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/tslint/tags","blobs_url":"https://api.github.com/repos/palantir/tslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/tslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/tslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/tslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/tslint/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/tslint/languages","stargazers_url":"https://api.github.com/repos/palantir/tslint/stargazers","contributors_url":"https://api.github.com/repos/palantir/tslint/contributors","subscribers_url":"https://api.github.com/repos/palantir/tslint/subscribers","subscription_url":"https://api.github.com/repos/palantir/tslint/subscription","commits_url":"https://api.github.com/repos/palantir/tslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/tslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/tslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/tslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/palantir/tslint/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/tslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/tslint/merges","archive_url":"https://api.github.com/repos/palantir/tslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/tslint/downloads","issues_url":"https://api.github.com/repos/palantir/tslint/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/tslint/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/tslint/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/tslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/tslint/labels{/name}","releases_url":"https://api.github.com/repos/palantir/tslint/releases{/id}","created_at":"2013-07-25T22:19:18Z","updated_at":"2015-11-23T08:59:16Z","pushed_at":"2015-11-23T22:26:38Z","git_url":"git://github.com/palantir/tslint.git","ssh_url":"git@github.com:palantir/tslint.git","clone_url":"https://github.com/palantir/tslint.git","svn_url":"https://github.com/palantir/tslint","homepage":null,"size":10092,"stargazers_count":452,"watchers_count":452,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":115,"mirror_url":null,"open_issues_count":153,"forks":115,"open_issues":153,"watchers":452,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/palantir/tslint/pulls/800"},"html":{"href":"https://github.com/palantir/tslint/pull/800"},"issue":{"href":"https://api.github.com/repos/palantir/tslint/issues/800"},"comments":{"href":"https://api.github.com/repos/palantir/tslint/issues/800/comments"},"review_comments":{"href":"https://api.github.com/repos/palantir/tslint/pulls/800/comments"},"review_comment":{"href":"https://api.github.com/repos/palantir/tslint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/palantir/tslint/pulls/800/commits"},"statuses":{"href":"https://api.github.com/repos/palantir/tslint/statuses/91467526c4cf4a179dc50c79398a485821e0166c"}}}}