{"action":"created","comment":{"url":"https://api.github.com/repos/sasstools/sass-lint/pulls/comments/44476581","id":44476581,"diff_hunk":"@@ -0,0 +1,54 @@\n+'use strict';\n+\n+var helpers = require('../helpers');\n+\n+module.exports = {\n+  'name': 'property-units',\n+  'defaults': {\n+    'unitsAllowedForProperties': {},\n+    'globallyAllowedUnits': []\n+  },\n+  'detect': function (ast, parser) {\n+    var result = [];\n+    var globallyAllowedUnits = parser.options.globallyAllowedUnits;\n+    var unitsAllowedForProperties = parser.options.unitsAllowedForProperties;\n+\n+    ast.traverseByType('declaration', function (declaration) {\n+      var declarationType = declaration.content[0].content[0].type,\n+          propertyName = declaration.content[0].content[0].content,\n+          valueNode = declaration.content\n+            .filter(function (node) {\n+              return node.type === 'value';\n+            })[0];\n+      if (declarationType === 'ident' && valueNode.content[0].type === 'dimension') {\n+        var dimensionNode = valueNode.content[0];\n+        var unitType = dimensionNode.content[1].content;","path":"lib/rules/property-units.js","position":25,"original_position":25,"commit_id":"b8b006cf786a84d55be8d093910cc6a9bee20965","original_commit_id":"b8b006cf786a84d55be8d093910cc6a9bee20965","user":{"login":"DanPurdy","id":1386054,"avatar_url":"https://avatars.githubusercontent.com/u/1386054?v=3","gravatar_id":"","url":"https://api.github.com/users/DanPurdy","html_url":"https://github.com/DanPurdy","followers_url":"https://api.github.com/users/DanPurdy/followers","following_url":"https://api.github.com/users/DanPurdy/following{/other_user}","gists_url":"https://api.github.com/users/DanPurdy/gists{/gist_id}","starred_url":"https://api.github.com/users/DanPurdy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanPurdy/subscriptions","organizations_url":"https://api.github.com/users/DanPurdy/orgs","repos_url":"https://api.github.com/users/DanPurdy/repos","events_url":"https://api.github.com/users/DanPurdy/events{/privacy}","received_events_url":"https://api.github.com/users/DanPurdy/received_events","type":"User","site_admin":false},"body":"Same as above, multiple var declarations instead of trailing commas.","created_at":"2015-11-10T22:38:19Z","updated_at":"2015-11-10T22:38:19Z","html_url":"https://github.com/sasstools/sass-lint/pull/387#discussion_r44476581","pull_request_url":"https://api.github.com/repos/sasstools/sass-lint/pulls/387","_links":{"self":{"href":"https://api.github.com/repos/sasstools/sass-lint/pulls/comments/44476581"},"html":{"href":"https://github.com/sasstools/sass-lint/pull/387#discussion_r44476581"},"pull_request":{"href":"https://api.github.com/repos/sasstools/sass-lint/pulls/387"}}},"pull_request":{"url":"https://api.github.com/repos/sasstools/sass-lint/pulls/387","id":50313957,"html_url":"https://github.com/sasstools/sass-lint/pull/387","diff_url":"https://github.com/sasstools/sass-lint/pull/387.diff","patch_url":"https://github.com/sasstools/sass-lint/pull/387.patch","issue_url":"https://api.github.com/repos/sasstools/sass-lint/issues/387","number":387,"state":"open","locked":false,"title":"Add feature to allow only certain units to be used in a property","user":{"login":"donabrams","id":447032,"avatar_url":"https://avatars.githubusercontent.com/u/447032?v=3","gravatar_id":"","url":"https://api.github.com/users/donabrams","html_url":"https://github.com/donabrams","followers_url":"https://api.github.com/users/donabrams/followers","following_url":"https://api.github.com/users/donabrams/following{/other_user}","gists_url":"https://api.github.com/users/donabrams/gists{/gist_id}","starred_url":"https://api.github.com/users/donabrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donabrams/subscriptions","organizations_url":"https://api.github.com/users/donabrams/orgs","repos_url":"https://api.github.com/users/donabrams/repos","events_url":"https://api.github.com/users/donabrams/events{/privacy}","received_events_url":"https://api.github.com/users/donabrams/received_events","type":"User","site_admin":false},"body":"As per https://github.com/sasstools/sass-lint/issues/371, I migrated https://github.com/brigade/scss-lint/blob/master/lib/scss_lint/linter/README.md#propertyunits over. \r\n\r\nDCO 1.1 Signed-off-by: Donald Abrams <donabrams@gmail.com>","created_at":"2015-11-10T21:30:52Z","updated_at":"2015-11-10T22:38:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2950fedd0ad35fae1af0255865506cf44d2700da","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sasstools/sass-lint/pulls/387/commits","review_comments_url":"https://api.github.com/repos/sasstools/sass-lint/pulls/387/comments","review_comment_url":"https://api.github.com/repos/sasstools/sass-lint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sasstools/sass-lint/issues/387/comments","statuses_url":"https://api.github.com/repos/sasstools/sass-lint/statuses/b8b006cf786a84d55be8d093910cc6a9bee20965","head":{"label":"donabrams:feature/property-units","ref":"feature/property-units","sha":"b8b006cf786a84d55be8d093910cc6a9bee20965","user":{"login":"donabrams","id":447032,"avatar_url":"https://avatars.githubusercontent.com/u/447032?v=3","gravatar_id":"","url":"https://api.github.com/users/donabrams","html_url":"https://github.com/donabrams","followers_url":"https://api.github.com/users/donabrams/followers","following_url":"https://api.github.com/users/donabrams/following{/other_user}","gists_url":"https://api.github.com/users/donabrams/gists{/gist_id}","starred_url":"https://api.github.com/users/donabrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donabrams/subscriptions","organizations_url":"https://api.github.com/users/donabrams/orgs","repos_url":"https://api.github.com/users/donabrams/repos","events_url":"https://api.github.com/users/donabrams/events{/privacy}","received_events_url":"https://api.github.com/users/donabrams/received_events","type":"User","site_admin":false},"repo":{"id":45865832,"name":"sass-lint","full_name":"donabrams/sass-lint","owner":{"login":"donabrams","id":447032,"avatar_url":"https://avatars.githubusercontent.com/u/447032?v=3","gravatar_id":"","url":"https://api.github.com/users/donabrams","html_url":"https://github.com/donabrams","followers_url":"https://api.github.com/users/donabrams/followers","following_url":"https://api.github.com/users/donabrams/following{/other_user}","gists_url":"https://api.github.com/users/donabrams/gists{/gist_id}","starred_url":"https://api.github.com/users/donabrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donabrams/subscriptions","organizations_url":"https://api.github.com/users/donabrams/orgs","repos_url":"https://api.github.com/users/donabrams/repos","events_url":"https://api.github.com/users/donabrams/events{/privacy}","received_events_url":"https://api.github.com/users/donabrams/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/donabrams/sass-lint","description":"Pure Node.js Sass linting","fork":true,"url":"https://api.github.com/repos/donabrams/sass-lint","forks_url":"https://api.github.com/repos/donabrams/sass-lint/forks","keys_url":"https://api.github.com/repos/donabrams/sass-lint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/donabrams/sass-lint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/donabrams/sass-lint/teams","hooks_url":"https://api.github.com/repos/donabrams/sass-lint/hooks","issue_events_url":"https://api.github.com/repos/donabrams/sass-lint/issues/events{/number}","events_url":"https://api.github.com/repos/donabrams/sass-lint/events","assignees_url":"https://api.github.com/repos/donabrams/sass-lint/assignees{/user}","branches_url":"https://api.github.com/repos/donabrams/sass-lint/branches{/branch}","tags_url":"https://api.github.com/repos/donabrams/sass-lint/tags","blobs_url":"https://api.github.com/repos/donabrams/sass-lint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/donabrams/sass-lint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/donabrams/sass-lint/git/refs{/sha}","trees_url":"https://api.github.com/repos/donabrams/sass-lint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/donabrams/sass-lint/statuses/{sha}","languages_url":"https://api.github.com/repos/donabrams/sass-lint/languages","stargazers_url":"https://api.github.com/repos/donabrams/sass-lint/stargazers","contributors_url":"https://api.github.com/repos/donabrams/sass-lint/contributors","subscribers_url":"https://api.github.com/repos/donabrams/sass-lint/subscribers","subscription_url":"https://api.github.com/repos/donabrams/sass-lint/subscription","commits_url":"https://api.github.com/repos/donabrams/sass-lint/commits{/sha}","git_commits_url":"https://api.github.com/repos/donabrams/sass-lint/git/commits{/sha}","comments_url":"https://api.github.com/repos/donabrams/sass-lint/comments{/number}","issue_comment_url":"https://api.github.com/repos/donabrams/sass-lint/issues/comments{/number}","contents_url":"https://api.github.com/repos/donabrams/sass-lint/contents/{+path}","compare_url":"https://api.github.com/repos/donabrams/sass-lint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/donabrams/sass-lint/merges","archive_url":"https://api.github.com/repos/donabrams/sass-lint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/donabrams/sass-lint/downloads","issues_url":"https://api.github.com/repos/donabrams/sass-lint/issues{/number}","pulls_url":"https://api.github.com/repos/donabrams/sass-lint/pulls{/number}","milestones_url":"https://api.github.com/repos/donabrams/sass-lint/milestones{/number}","notifications_url":"https://api.github.com/repos/donabrams/sass-lint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/donabrams/sass-lint/labels{/name}","releases_url":"https://api.github.com/repos/donabrams/sass-lint/releases{/id}","created_at":"2015-11-09T20:48:54Z","updated_at":"2015-11-09T20:48:55Z","pushed_at":"2015-11-10T21:26:36Z","git_url":"git://github.com/donabrams/sass-lint.git","ssh_url":"git@github.com:donabrams/sass-lint.git","clone_url":"https://github.com/donabrams/sass-lint.git","svn_url":"https://github.com/donabrams/sass-lint","homepage":"","size":2475,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"sasstools:develop","ref":"develop","sha":"d5bee80dbc878c8b8afc9bf524c36801b6821416","user":{"login":"sasstools","id":11896310,"avatar_url":"https://avatars.githubusercontent.com/u/11896310?v=3","gravatar_id":"","url":"https://api.github.com/users/sasstools","html_url":"https://github.com/sasstools","followers_url":"https://api.github.com/users/sasstools/followers","following_url":"https://api.github.com/users/sasstools/following{/other_user}","gists_url":"https://api.github.com/users/sasstools/gists{/gist_id}","starred_url":"https://api.github.com/users/sasstools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sasstools/subscriptions","organizations_url":"https://api.github.com/users/sasstools/orgs","repos_url":"https://api.github.com/users/sasstools/repos","events_url":"https://api.github.com/users/sasstools/events{/privacy}","received_events_url":"https://api.github.com/users/sasstools/received_events","type":"Organization","site_admin":false},"repo":{"id":30891787,"name":"sass-lint","full_name":"sasstools/sass-lint","owner":{"login":"sasstools","id":11896310,"avatar_url":"https://avatars.githubusercontent.com/u/11896310?v=3","gravatar_id":"","url":"https://api.github.com/users/sasstools","html_url":"https://github.com/sasstools","followers_url":"https://api.github.com/users/sasstools/followers","following_url":"https://api.github.com/users/sasstools/following{/other_user}","gists_url":"https://api.github.com/users/sasstools/gists{/gist_id}","starred_url":"https://api.github.com/users/sasstools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sasstools/subscriptions","organizations_url":"https://api.github.com/users/sasstools/orgs","repos_url":"https://api.github.com/users/sasstools/repos","events_url":"https://api.github.com/users/sasstools/events{/privacy}","received_events_url":"https://api.github.com/users/sasstools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sasstools/sass-lint","description":"Pure Node.js Sass linting","fork":false,"url":"https://api.github.com/repos/sasstools/sass-lint","forks_url":"https://api.github.com/repos/sasstools/sass-lint/forks","keys_url":"https://api.github.com/repos/sasstools/sass-lint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sasstools/sass-lint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sasstools/sass-lint/teams","hooks_url":"https://api.github.com/repos/sasstools/sass-lint/hooks","issue_events_url":"https://api.github.com/repos/sasstools/sass-lint/issues/events{/number}","events_url":"https://api.github.com/repos/sasstools/sass-lint/events","assignees_url":"https://api.github.com/repos/sasstools/sass-lint/assignees{/user}","branches_url":"https://api.github.com/repos/sasstools/sass-lint/branches{/branch}","tags_url":"https://api.github.com/repos/sasstools/sass-lint/tags","blobs_url":"https://api.github.com/repos/sasstools/sass-lint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sasstools/sass-lint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sasstools/sass-lint/git/refs{/sha}","trees_url":"https://api.github.com/repos/sasstools/sass-lint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sasstools/sass-lint/statuses/{sha}","languages_url":"https://api.github.com/repos/sasstools/sass-lint/languages","stargazers_url":"https://api.github.com/repos/sasstools/sass-lint/stargazers","contributors_url":"https://api.github.com/repos/sasstools/sass-lint/contributors","subscribers_url":"https://api.github.com/repos/sasstools/sass-lint/subscribers","subscription_url":"https://api.github.com/repos/sasstools/sass-lint/subscription","commits_url":"https://api.github.com/repos/sasstools/sass-lint/commits{/sha}","git_commits_url":"https://api.github.com/repos/sasstools/sass-lint/git/commits{/sha}","comments_url":"https://api.github.com/repos/sasstools/sass-lint/comments{/number}","issue_comment_url":"https://api.github.com/repos/sasstools/sass-lint/issues/comments{/number}","contents_url":"https://api.github.com/repos/sasstools/sass-lint/contents/{+path}","compare_url":"https://api.github.com/repos/sasstools/sass-lint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sasstools/sass-lint/merges","archive_url":"https://api.github.com/repos/sasstools/sass-lint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sasstools/sass-lint/downloads","issues_url":"https://api.github.com/repos/sasstools/sass-lint/issues{/number}","pulls_url":"https://api.github.com/repos/sasstools/sass-lint/pulls{/number}","milestones_url":"https://api.github.com/repos/sasstools/sass-lint/milestones{/number}","notifications_url":"https://api.github.com/repos/sasstools/sass-lint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sasstools/sass-lint/labels{/name}","releases_url":"https://api.github.com/repos/sasstools/sass-lint/releases{/id}","created_at":"2015-02-16T22:33:34Z","updated_at":"2015-11-10T14:17:29Z","pushed_at":"2015-11-10T21:30:52Z","git_url":"git://github.com/sasstools/sass-lint.git","ssh_url":"git@github.com:sasstools/sass-lint.git","clone_url":"https://github.com/sasstools/sass-lint.git","svn_url":"https://github.com/sasstools/sass-lint","homepage":"","size":2475,"stargazers_count":285,"watchers_count":285,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":60,"forks":30,"open_issues":60,"watchers":285,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/sasstools/sass-lint/pulls/387"},"html":{"href":"https://github.com/sasstools/sass-lint/pull/387"},"issue":{"href":"https://api.github.com/repos/sasstools/sass-lint/issues/387"},"comments":{"href":"https://api.github.com/repos/sasstools/sass-lint/issues/387/comments"},"review_comments":{"href":"https://api.github.com/repos/sasstools/sass-lint/pulls/387/comments"},"review_comment":{"href":"https://api.github.com/repos/sasstools/sass-lint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sasstools/sass-lint/pulls/387/commits"},"statuses":{"href":"https://api.github.com/repos/sasstools/sass-lint/statuses/b8b006cf786a84d55be8d093910cc6a9bee20965"}}}}