{"action":"created","comment":{"url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/pulls/comments/38809742","id":38809742,"diff_hunk":"@@ -0,0 +1,97 @@\n+'use strict';\n+\n+module.exports = function(context) {\n+    var utils = require('./utils/utils');\n+\n+    var options = context.options[0] || {};\n+    var restrictOpt = options.restrict || 'AE';\n+    var explicitRestrict = options.explicit === 'always';\n+    var restrictChars = [];\n+\n+    restrictOpt.split('').forEach(function(char) {\n+        if ('ACEM'.indexOf(char) === -1) {","path":"rules/directive-restrict.js","position":12,"original_position":12,"commit_id":"2a891200f27cc46e00f3b0147c0a1a011c752d21","original_commit_id":"2a891200f27cc46e00f3b0147c0a1a011c752d21","user":{"login":"remcohaszing","id":779047,"avatar_url":"https://avatars.githubusercontent.com/u/779047?v=3","gravatar_id":"","url":"https://api.github.com/users/remcohaszing","html_url":"https://github.com/remcohaszing","followers_url":"https://api.github.com/users/remcohaszing/followers","following_url":"https://api.github.com/users/remcohaszing/following{/other_user}","gists_url":"https://api.github.com/users/remcohaszing/gists{/gist_id}","starred_url":"https://api.github.com/users/remcohaszing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remcohaszing/subscriptions","organizations_url":"https://api.github.com/users/remcohaszing/orgs","repos_url":"https://api.github.com/users/remcohaszing/repos","events_url":"https://api.github.com/users/remcohaszing/events{/privacy}","received_events_url":"https://api.github.com/users/remcohaszing/received_events","type":"User","site_admin":false},"body":"I figured users could potentially misconfigure the acceptible restrict as for example `AEA`. I don't know how to check this using just a pattern. Should I just assume users won't do this?","created_at":"2015-09-05T10:53:20Z","updated_at":"2015-09-05T10:53:20Z","html_url":"https://github.com/Gillespie59/eslint-plugin-angular/pull/211#discussion_r38809742","pull_request_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/pulls/211","_links":{"self":{"href":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/pulls/comments/38809742"},"html":{"href":"https://github.com/Gillespie59/eslint-plugin-angular/pull/211#discussion_r38809742"},"pull_request":{"href":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/pulls/211"}}},"pull_request":{"url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/pulls/211","id":44253373,"html_url":"https://github.com/Gillespie59/eslint-plugin-angular/pull/211","diff_url":"https://github.com/Gillespie59/eslint-plugin-angular/pull/211.diff","patch_url":"https://github.com/Gillespie59/eslint-plugin-angular/pull/211.patch","issue_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/issues/211","number":211,"state":"open","locked":false,"title":"Add rule for enforcing directive restrictions","user":{"login":"remcohaszing","id":779047,"avatar_url":"https://avatars.githubusercontent.com/u/779047?v=3","gravatar_id":"","url":"https://api.github.com/users/remcohaszing","html_url":"https://github.com/remcohaszing","followers_url":"https://api.github.com/users/remcohaszing/followers","following_url":"https://api.github.com/users/remcohaszing/following{/other_user}","gists_url":"https://api.github.com/users/remcohaszing/gists{/gist_id}","starred_url":"https://api.github.com/users/remcohaszing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remcohaszing/subscriptions","organizations_url":"https://api.github.com/users/remcohaszing/orgs","repos_url":"https://api.github.com/users/remcohaszing/repos","events_url":"https://api.github.com/users/remcohaszing/events{/privacy}","received_events_url":"https://api.github.com/users/remcohaszing/received_events","type":"User","site_admin":false},"body":"There are some corner cases. For example when setting a property named `restrict` to another object inside of a directive declaration. I think this is rare though.\r\n\r\nCloses #23 ","created_at":"2015-09-04T19:29:57Z","updated_at":"2015-09-05T10:53:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f6698891b0facc02f9e41bbafaafb60ebca82fc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/pulls/211/commits","review_comments_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/pulls/211/comments","review_comment_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/issues/211/comments","statuses_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/statuses/2a891200f27cc46e00f3b0147c0a1a011c752d21","head":{"label":"remcohaszing:directive-restrict","ref":"directive-restrict","sha":"2a891200f27cc46e00f3b0147c0a1a011c752d21","user":{"login":"remcohaszing","id":779047,"avatar_url":"https://avatars.githubusercontent.com/u/779047?v=3","gravatar_id":"","url":"https://api.github.com/users/remcohaszing","html_url":"https://github.com/remcohaszing","followers_url":"https://api.github.com/users/remcohaszing/followers","following_url":"https://api.github.com/users/remcohaszing/following{/other_user}","gists_url":"https://api.github.com/users/remcohaszing/gists{/gist_id}","starred_url":"https://api.github.com/users/remcohaszing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remcohaszing/subscriptions","organizations_url":"https://api.github.com/users/remcohaszing/orgs","repos_url":"https://api.github.com/users/remcohaszing/repos","events_url":"https://api.github.com/users/remcohaszing/events{/privacy}","received_events_url":"https://api.github.com/users/remcohaszing/received_events","type":"User","site_admin":false},"repo":{"id":41112953,"name":"eslint-plugin-angular","full_name":"remcohaszing/eslint-plugin-angular","owner":{"login":"remcohaszing","id":779047,"avatar_url":"https://avatars.githubusercontent.com/u/779047?v=3","gravatar_id":"","url":"https://api.github.com/users/remcohaszing","html_url":"https://github.com/remcohaszing","followers_url":"https://api.github.com/users/remcohaszing/followers","following_url":"https://api.github.com/users/remcohaszing/following{/other_user}","gists_url":"https://api.github.com/users/remcohaszing/gists{/gist_id}","starred_url":"https://api.github.com/users/remcohaszing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remcohaszing/subscriptions","organizations_url":"https://api.github.com/users/remcohaszing/orgs","repos_url":"https://api.github.com/users/remcohaszing/repos","events_url":"https://api.github.com/users/remcohaszing/events{/privacy}","received_events_url":"https://api.github.com/users/remcohaszing/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/remcohaszing/eslint-plugin-angular","description":"ESLint plugin for AngularJS applications","fork":true,"url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular","forks_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/forks","keys_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/teams","hooks_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/hooks","issue_events_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/issues/events{/number}","events_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/events","assignees_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/assignees{/user}","branches_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/branches{/branch}","tags_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/tags","blobs_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/statuses/{sha}","languages_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/languages","stargazers_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/stargazers","contributors_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/contributors","subscribers_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/subscribers","subscription_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/subscription","commits_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/contents/{+path}","compare_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/merges","archive_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/downloads","issues_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/issues{/number}","pulls_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/pulls{/number}","milestones_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/milestones{/number}","notifications_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/labels{/name}","releases_url":"https://api.github.com/repos/remcohaszing/eslint-plugin-angular/releases{/id}","created_at":"2015-08-20T18:41:55Z","updated_at":"2015-08-20T18:41:55Z","pushed_at":"2015-09-04T19:25:49Z","git_url":"git://github.com/remcohaszing/eslint-plugin-angular.git","ssh_url":"git@github.com:remcohaszing/eslint-plugin-angular.git","clone_url":"https://github.com/remcohaszing/eslint-plugin-angular.git","svn_url":"https://github.com/remcohaszing/eslint-plugin-angular","homepage":"https://www.npmjs.com/package/eslint-plugin-angular","size":473,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"Gillespie59:development","ref":"development","sha":"0b69ce95117d3d502202660a79cc2466ef480e22","user":{"login":"Gillespie59","id":555768,"avatar_url":"https://avatars.githubusercontent.com/u/555768?v=3","gravatar_id":"","url":"https://api.github.com/users/Gillespie59","html_url":"https://github.com/Gillespie59","followers_url":"https://api.github.com/users/Gillespie59/followers","following_url":"https://api.github.com/users/Gillespie59/following{/other_user}","gists_url":"https://api.github.com/users/Gillespie59/gists{/gist_id}","starred_url":"https://api.github.com/users/Gillespie59/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gillespie59/subscriptions","organizations_url":"https://api.github.com/users/Gillespie59/orgs","repos_url":"https://api.github.com/users/Gillespie59/repos","events_url":"https://api.github.com/users/Gillespie59/events{/privacy}","received_events_url":"https://api.github.com/users/Gillespie59/received_events","type":"User","site_admin":false},"repo":{"id":29874861,"name":"eslint-plugin-angular","full_name":"Gillespie59/eslint-plugin-angular","owner":{"login":"Gillespie59","id":555768,"avatar_url":"https://avatars.githubusercontent.com/u/555768?v=3","gravatar_id":"","url":"https://api.github.com/users/Gillespie59","html_url":"https://github.com/Gillespie59","followers_url":"https://api.github.com/users/Gillespie59/followers","following_url":"https://api.github.com/users/Gillespie59/following{/other_user}","gists_url":"https://api.github.com/users/Gillespie59/gists{/gist_id}","starred_url":"https://api.github.com/users/Gillespie59/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gillespie59/subscriptions","organizations_url":"https://api.github.com/users/Gillespie59/orgs","repos_url":"https://api.github.com/users/Gillespie59/repos","events_url":"https://api.github.com/users/Gillespie59/events{/privacy}","received_events_url":"https://api.github.com/users/Gillespie59/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Gillespie59/eslint-plugin-angular","description":"ESLint plugin for AngularJS applications","fork":false,"url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular","forks_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/forks","keys_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/teams","hooks_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/hooks","issue_events_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/issues/events{/number}","events_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/events","assignees_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/assignees{/user}","branches_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/branches{/branch}","tags_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/tags","blobs_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/statuses/{sha}","languages_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/languages","stargazers_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/stargazers","contributors_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/contributors","subscribers_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/subscribers","subscription_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/subscription","commits_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/contents/{+path}","compare_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/merges","archive_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/downloads","issues_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/issues{/number}","pulls_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/pulls{/number}","milestones_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/milestones{/number}","notifications_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/labels{/name}","releases_url":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/releases{/id}","created_at":"2015-01-26T18:22:06Z","updated_at":"2015-09-03T06:10:02Z","pushed_at":"2015-09-04T19:29:57Z","git_url":"git://github.com/Gillespie59/eslint-plugin-angular.git","ssh_url":"git@github.com:Gillespie59/eslint-plugin-angular.git","clone_url":"https://github.com/Gillespie59/eslint-plugin-angular.git","svn_url":"https://github.com/Gillespie59/eslint-plugin-angular","homepage":"https://www.npmjs.com/package/eslint-plugin-angular","size":1418,"stargazers_count":186,"watchers_count":186,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":29,"mirror_url":null,"open_issues_count":39,"forks":29,"open_issues":39,"watchers":186,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/pulls/211"},"html":{"href":"https://github.com/Gillespie59/eslint-plugin-angular/pull/211"},"issue":{"href":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/issues/211"},"comments":{"href":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/issues/211/comments"},"review_comments":{"href":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/pulls/211/comments"},"review_comment":{"href":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/pulls/211/commits"},"statuses":{"href":"https://api.github.com/repos/Gillespie59/eslint-plugin-angular/statuses/2a891200f27cc46e00f3b0147c0a1a011c752d21"}}}}