{"action":"created","comment":{"url":"https://api.github.com/repos/ecomfe/htmlcs/pulls/comments/31888003","id":31888003,"diff_hunk":"@@ -0,0 +1,63 @@\n+/**\n+ * @file rule: indent-char\n+ * @author nighca<nighca@live.cn>\n+ */\n+\n+module.exports = {\n+\n+    name: 'indent-char',\n+\n+    desc: 'Line should indent with space(2/4) or tab.',\n+\n+    target: 'parser',\n+\n+    lint: function (getCfg, register, reporter) {\n+        var cfgMap = {\n+            'tab': {\n+                name: 'tab',\n+                pattern: /^\\t*(\\S+|$)/","path":"lib/rules/indent-char.js","position":18,"original_position":18,"commit_id":"bb832e1fe5afd307e5fdfb1788321c6f1d500351","original_commit_id":"fa4111559df12cf145a5e3163880cacb5c83c395","user":{"login":"nighca","id":1492263,"avatar_url":"https://avatars.githubusercontent.com/u/1492263?v=3","gravatar_id":"","url":"https://api.github.com/users/nighca","html_url":"https://github.com/nighca","followers_url":"https://api.github.com/users/nighca/followers","following_url":"https://api.github.com/users/nighca/following{/other_user}","gists_url":"https://api.github.com/users/nighca/gists{/gist_id}","starred_url":"https://api.github.com/users/nighca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nighca/subscriptions","organizations_url":"https://api.github.com/users/nighca/orgs","repos_url":"https://api.github.com/users/nighca/repos","events_url":"https://api.github.com/users/nighca/events{/privacy}","received_events_url":"https://api.github.com/users/nighca/received_events","type":"User","site_admin":false},"body":"学习了！","created_at":"2015-06-08T05:42:05Z","updated_at":"2015-06-08T05:42:05Z","html_url":"https://github.com/ecomfe/htmlcs/pull/30#discussion_r31888003","pull_request_url":"https://api.github.com/repos/ecomfe/htmlcs/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/ecomfe/htmlcs/pulls/comments/31888003"},"html":{"href":"https://github.com/ecomfe/htmlcs/pull/30#discussion_r31888003"},"pull_request":{"href":"https://api.github.com/repos/ecomfe/htmlcs/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/ecomfe/htmlcs/pulls/30","id":36918705,"html_url":"https://github.com/ecomfe/htmlcs/pull/30","diff_url":"https://github.com/ecomfe/htmlcs/pull/30.diff","patch_url":"https://github.com/ecomfe/htmlcs/pull/30.patch","issue_url":"https://api.github.com/repos/ecomfe/htmlcs/issues/30","number":30,"state":"open","locked":false,"title":"注释配置 & script/style 内容检查","user":{"login":"nighca","id":1492263,"avatar_url":"https://avatars.githubusercontent.com/u/1492263?v=3","gravatar_id":"","url":"https://api.github.com/users/nighca","html_url":"https://github.com/nighca","followers_url":"https://api.github.com/users/nighca/followers","following_url":"https://api.github.com/users/nighca/following{/other_user}","gists_url":"https://api.github.com/users/nighca/gists{/gist_id}","starred_url":"https://api.github.com/users/nighca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nighca/subscriptions","organizations_url":"https://api.github.com/users/nighca/orgs","repos_url":"https://api.github.com/users/nighca/repos","events_url":"https://api.github.com/users/nighca/events{/privacy}","received_events_url":"https://api.github.com/users/nighca/received_events","type":"User","site_admin":false},"body":"* 修改disable、enable的实现，配置方法不变\r\n\r\n* 添加对注释中配置规则的支持\r\n\r\n    ```html\r\n    <!-- htmlcs \"attr-value-double-quotes\": false -->\r\n    ```\r\n\r\n* debug规则`space-tab-mixed-disabled`，改为`indent-char`，可选配置值包括：`\"tab\"`, `\"space-2\"`, `\"space-4\"`，配置为`true`时默认使用`\"space-4\"`\r\n\r\n* 添加对`script`/`style`内容检查的支持，检查方法通过配置中的`linters`传入，通过规则`script-content`及`style-content`进行行为控制\r\n\r\n    ```javascript\r\n    {\r\n        \"script-content\": true,                 // true: Content of <script> must meet standard\r\n        \"style-content\": true,                  // true: Content of <style> must meet standard\r\n        \"linters\": {\r\n            \"style\": function (content, pos, element) {},\r\n            \"script\": function (content, pos, element) {}\r\n        },                          // extra linters ('scipt', 'style')\r\n        ...\r\n    }\r\n    ````\r\n\r\n* 其他细节改动\r\n","created_at":"2015-06-04T09:54:07Z","updated_at":"2015-06-08T05:42:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"15f46bee55965a7240af890be10508c76608431e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ecomfe/htmlcs/pulls/30/commits","review_comments_url":"https://api.github.com/repos/ecomfe/htmlcs/pulls/30/comments","review_comment_url":"https://api.github.com/repos/ecomfe/htmlcs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ecomfe/htmlcs/issues/30/comments","statuses_url":"https://api.github.com/repos/ecomfe/htmlcs/statuses/bb832e1fe5afd307e5fdfb1788321c6f1d500351","head":{"label":"nighca:comment-config","ref":"comment-config","sha":"bb832e1fe5afd307e5fdfb1788321c6f1d500351","user":{"login":"nighca","id":1492263,"avatar_url":"https://avatars.githubusercontent.com/u/1492263?v=3","gravatar_id":"","url":"https://api.github.com/users/nighca","html_url":"https://github.com/nighca","followers_url":"https://api.github.com/users/nighca/followers","following_url":"https://api.github.com/users/nighca/following{/other_user}","gists_url":"https://api.github.com/users/nighca/gists{/gist_id}","starred_url":"https://api.github.com/users/nighca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nighca/subscriptions","organizations_url":"https://api.github.com/users/nighca/orgs","repos_url":"https://api.github.com/users/nighca/repos","events_url":"https://api.github.com/users/nighca/events{/privacy}","received_events_url":"https://api.github.com/users/nighca/received_events","type":"User","site_admin":false},"repo":{"id":27066392,"name":"htmlcs","full_name":"nighca/htmlcs","owner":{"login":"nighca","id":1492263,"avatar_url":"https://avatars.githubusercontent.com/u/1492263?v=3","gravatar_id":"","url":"https://api.github.com/users/nighca","html_url":"https://github.com/nighca","followers_url":"https://api.github.com/users/nighca/followers","following_url":"https://api.github.com/users/nighca/following{/other_user}","gists_url":"https://api.github.com/users/nighca/gists{/gist_id}","starred_url":"https://api.github.com/users/nighca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nighca/subscriptions","organizations_url":"https://api.github.com/users/nighca/orgs","repos_url":"https://api.github.com/users/nighca/repos","events_url":"https://api.github.com/users/nighca/events{/privacy}","received_events_url":"https://api.github.com/users/nighca/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nighca/htmlcs","description":"HTML Code Style","fork":true,"url":"https://api.github.com/repos/nighca/htmlcs","forks_url":"https://api.github.com/repos/nighca/htmlcs/forks","keys_url":"https://api.github.com/repos/nighca/htmlcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nighca/htmlcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nighca/htmlcs/teams","hooks_url":"https://api.github.com/repos/nighca/htmlcs/hooks","issue_events_url":"https://api.github.com/repos/nighca/htmlcs/issues/events{/number}","events_url":"https://api.github.com/repos/nighca/htmlcs/events","assignees_url":"https://api.github.com/repos/nighca/htmlcs/assignees{/user}","branches_url":"https://api.github.com/repos/nighca/htmlcs/branches{/branch}","tags_url":"https://api.github.com/repos/nighca/htmlcs/tags","blobs_url":"https://api.github.com/repos/nighca/htmlcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nighca/htmlcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nighca/htmlcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/nighca/htmlcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nighca/htmlcs/statuses/{sha}","languages_url":"https://api.github.com/repos/nighca/htmlcs/languages","stargazers_url":"https://api.github.com/repos/nighca/htmlcs/stargazers","contributors_url":"https://api.github.com/repos/nighca/htmlcs/contributors","subscribers_url":"https://api.github.com/repos/nighca/htmlcs/subscribers","subscription_url":"https://api.github.com/repos/nighca/htmlcs/subscription","commits_url":"https://api.github.com/repos/nighca/htmlcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/nighca/htmlcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/nighca/htmlcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/nighca/htmlcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/nighca/htmlcs/contents/{+path}","compare_url":"https://api.github.com/repos/nighca/htmlcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nighca/htmlcs/merges","archive_url":"https://api.github.com/repos/nighca/htmlcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nighca/htmlcs/downloads","issues_url":"https://api.github.com/repos/nighca/htmlcs/issues{/number}","pulls_url":"https://api.github.com/repos/nighca/htmlcs/pulls{/number}","milestones_url":"https://api.github.com/repos/nighca/htmlcs/milestones{/number}","notifications_url":"https://api.github.com/repos/nighca/htmlcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nighca/htmlcs/labels{/name}","releases_url":"https://api.github.com/repos/nighca/htmlcs/releases{/id}","created_at":"2014-11-24T07:59:59Z","updated_at":"2015-03-26T11:11:23Z","pushed_at":"2015-06-07T15:38:06Z","git_url":"git://github.com/nighca/htmlcs.git","ssh_url":"git@github.com:nighca/htmlcs.git","clone_url":"https://github.com/nighca/htmlcs.git","svn_url":"https://github.com/nighca/htmlcs","homepage":null,"size":595,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"master"}},"base":{"label":"ecomfe:master","ref":"master","sha":"31c2994559fd50be064b907f8ed28cb506e0e231","user":{"login":"ecomfe","id":2268460,"avatar_url":"https://avatars.githubusercontent.com/u/2268460?v=3","gravatar_id":"","url":"https://api.github.com/users/ecomfe","html_url":"https://github.com/ecomfe","followers_url":"https://api.github.com/users/ecomfe/followers","following_url":"https://api.github.com/users/ecomfe/following{/other_user}","gists_url":"https://api.github.com/users/ecomfe/gists{/gist_id}","starred_url":"https://api.github.com/users/ecomfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecomfe/subscriptions","organizations_url":"https://api.github.com/users/ecomfe/orgs","repos_url":"https://api.github.com/users/ecomfe/repos","events_url":"https://api.github.com/users/ecomfe/events{/privacy}","received_events_url":"https://api.github.com/users/ecomfe/received_events","type":"Organization","site_admin":false},"repo":{"id":27064365,"name":"htmlcs","full_name":"ecomfe/htmlcs","owner":{"login":"ecomfe","id":2268460,"avatar_url":"https://avatars.githubusercontent.com/u/2268460?v=3","gravatar_id":"","url":"https://api.github.com/users/ecomfe","html_url":"https://github.com/ecomfe","followers_url":"https://api.github.com/users/ecomfe/followers","following_url":"https://api.github.com/users/ecomfe/following{/other_user}","gists_url":"https://api.github.com/users/ecomfe/gists{/gist_id}","starred_url":"https://api.github.com/users/ecomfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecomfe/subscriptions","organizations_url":"https://api.github.com/users/ecomfe/orgs","repos_url":"https://api.github.com/users/ecomfe/repos","events_url":"https://api.github.com/users/ecomfe/events{/privacy}","received_events_url":"https://api.github.com/users/ecomfe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ecomfe/htmlcs","description":"HTML Code Style","fork":false,"url":"https://api.github.com/repos/ecomfe/htmlcs","forks_url":"https://api.github.com/repos/ecomfe/htmlcs/forks","keys_url":"https://api.github.com/repos/ecomfe/htmlcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ecomfe/htmlcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ecomfe/htmlcs/teams","hooks_url":"https://api.github.com/repos/ecomfe/htmlcs/hooks","issue_events_url":"https://api.github.com/repos/ecomfe/htmlcs/issues/events{/number}","events_url":"https://api.github.com/repos/ecomfe/htmlcs/events","assignees_url":"https://api.github.com/repos/ecomfe/htmlcs/assignees{/user}","branches_url":"https://api.github.com/repos/ecomfe/htmlcs/branches{/branch}","tags_url":"https://api.github.com/repos/ecomfe/htmlcs/tags","blobs_url":"https://api.github.com/repos/ecomfe/htmlcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ecomfe/htmlcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ecomfe/htmlcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ecomfe/htmlcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ecomfe/htmlcs/statuses/{sha}","languages_url":"https://api.github.com/repos/ecomfe/htmlcs/languages","stargazers_url":"https://api.github.com/repos/ecomfe/htmlcs/stargazers","contributors_url":"https://api.github.com/repos/ecomfe/htmlcs/contributors","subscribers_url":"https://api.github.com/repos/ecomfe/htmlcs/subscribers","subscription_url":"https://api.github.com/repos/ecomfe/htmlcs/subscription","commits_url":"https://api.github.com/repos/ecomfe/htmlcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ecomfe/htmlcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ecomfe/htmlcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ecomfe/htmlcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ecomfe/htmlcs/contents/{+path}","compare_url":"https://api.github.com/repos/ecomfe/htmlcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ecomfe/htmlcs/merges","archive_url":"https://api.github.com/repos/ecomfe/htmlcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ecomfe/htmlcs/downloads","issues_url":"https://api.github.com/repos/ecomfe/htmlcs/issues{/number}","pulls_url":"https://api.github.com/repos/ecomfe/htmlcs/pulls{/number}","milestones_url":"https://api.github.com/repos/ecomfe/htmlcs/milestones{/number}","notifications_url":"https://api.github.com/repos/ecomfe/htmlcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ecomfe/htmlcs/labels{/name}","releases_url":"https://api.github.com/repos/ecomfe/htmlcs/releases{/id}","created_at":"2014-11-24T06:47:42Z","updated_at":"2015-05-07T02:53:37Z","pushed_at":"2015-06-07T15:38:06Z","git_url":"git://github.com/ecomfe/htmlcs.git","ssh_url":"git@github.com:ecomfe/htmlcs.git","clone_url":"https://github.com/ecomfe/htmlcs.git","svn_url":"https://github.com/ecomfe/htmlcs","homepage":null,"size":666,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":14,"forks":2,"open_issues":14,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ecomfe/htmlcs/pulls/30"},"html":{"href":"https://github.com/ecomfe/htmlcs/pull/30"},"issue":{"href":"https://api.github.com/repos/ecomfe/htmlcs/issues/30"},"comments":{"href":"https://api.github.com/repos/ecomfe/htmlcs/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/ecomfe/htmlcs/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/ecomfe/htmlcs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ecomfe/htmlcs/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/ecomfe/htmlcs/statuses/bb832e1fe5afd307e5fdfb1788321c6f1d500351"}}}}