{"action":"created","comment":{"url":"https://api.github.com/repos/eggjs/eslint-config-egg/pulls/comments/67832172","id":67832172,"diff_hunk":"@@ -0,0 +1,641 @@\n+'use strict';\n+\n+module.exports = {\n+  rules: {\n+    /**\n+     * 不强制要求 getter/setter 成对出现\n+     * @see http://eslint.org/docs/rules/accessor-pairs\n+     */\n+    'accessor-pairs': 0,\n+\n+    /**\n+     * 校验下列方法的回调中是否有 `return`\n+     *\n+     * ```js\n+     * Array.from\n+     * Array.prototype.every\n+     * Array.prototype.filter\n+     * Array.prototype.find\n+     * Array.prototype.findIndex\n+     * Array.prototype.map\n+     * Array.prototype.reduce\n+     * Array.prototype.reduceRight\n+     * Array.prototype.some\n+     * Array.prototype.sort\n+     * ```\n+     * @see http://eslint.org/docs/rules/array-callback-return\n+     */\n+    'array-callback-return': 2,\n+\n+    /**\n+     * 不允许在 block scope 内使用 var 声明变量\n+     * @see http://eslint.org/docs/rules/block-scoped-var\n+     * @since 3.0.0\n+     */\n+    'block-scoped-var': 2,\n+\n+    /**\n+     * 条件判断最多允许 11 条路径\n+     * @see http://eslint.org/docs/rules/complexity\n+     */\n+    complexity: [0, 11],\n+\n+    /**\n+     * 如果方法中的某条逻辑路径最终有 `return` 语句，其它逻辑路径不强制有 `return` 语句\n+     * @see http://eslint.org/docs/rules/consistent-return\n+     * @example\n+     *\n+     * ```js\n+     * // 正确\n+     * function doSomething(condition) {\n+     *   if (condition) {\n+     *     return true;\n+     *   }\n+     * }\n+     * ```\n+     */\n+    'consistent-return': 0,\n+\n+    /**\n+     * 花括号使用习惯\n+     *\n+     * 1. 只有一行的 `if`, `else if`, `else`, `for`, `while`, `do` 声明可以不用花括号\n+     *\n+     * @see http://eslint.org/docs/rules/curly\n+     * @example\n+     *\n+     * ```js\n+     * // 错误\n+     * if (foo)\n+     *   doSomething();\n+     * else\n+     *   doSomethingElse();\n+     *\n+     * // 正确\n+     * if (foo) doSomething();\n+     *\n+     * if (foo) doSomething();\n+     * else doSomethingElse();\n+     *\n+     * do something();\n+     * while (foo);\n+     * ```\n+     */\n+    curly: [2, 'multi-line'],\n+\n+    /**\n+     * `switch` 声明必须有 `default` 处理，可以使用 `no default` 跳过验证\n+     * @see http://eslint.org/docs/rules/default-case\n+     * @since 3.0.0\n+     * @example\n+     *\n+     * ```js\n+     * // 正确\n+     * switch (foo) {\n+     *   case 1:\n+     *     doSomething();\n+     *     break;\n+     *\n+     *   case 2:\n+     *     doSomething();\n+     *     break;\n+     *\n+     *   // no default\n+     * }\n+     * ```\n+     */\n+    'default-case': [2, { commentPattern: '^no default$' }],\n+\n+    /**\n+     * 能够随意使用 `foo.bar` 或 `foo['bar']`\n+     * @see http://eslint.org/docs/rules/dot-notation\n+     */\n+    'dot-notation': 0,","path":"rules/best-practices.js","position":113,"original_position":113,"commit_id":"99d35a3da8db9313f15d359c4d2f0828a7225315","original_commit_id":"3ba4553d56b417a84246d85ce7a128f01533b2e2","user":{"login":"fengmk2","id":156269,"avatar_url":"https://avatars.githubusercontent.com/u/156269?v=3","gravatar_id":"","url":"https://api.github.com/users/fengmk2","html_url":"https://github.com/fengmk2","followers_url":"https://api.github.com/users/fengmk2/followers","following_url":"https://api.github.com/users/fengmk2/following{/other_user}","gists_url":"https://api.github.com/users/fengmk2/gists{/gist_id}","starred_url":"https://api.github.com/users/fengmk2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fengmk2/subscriptions","organizations_url":"https://api.github.com/users/fengmk2/orgs","repos_url":"https://api.github.com/users/fengmk2/repos","events_url":"https://api.github.com/users/fengmk2/events{/privacy}","received_events_url":"https://api.github.com/users/fengmk2/received_events","type":"User","site_admin":false},"body":"@geekdada 那就 `'dot-notation': [2, { 'allowKeywords': true }],`","created_at":"2016-06-21T09:01:50Z","updated_at":"2016-06-21T09:01:50Z","html_url":"https://github.com/eggjs/eslint-config-egg/pull/11#discussion_r67832172","pull_request_url":"https://api.github.com/repos/eggjs/eslint-config-egg/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/eggjs/eslint-config-egg/pulls/comments/67832172"},"html":{"href":"https://github.com/eggjs/eslint-config-egg/pull/11#discussion_r67832172"},"pull_request":{"href":"https://api.github.com/repos/eggjs/eslint-config-egg/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/eggjs/eslint-config-egg/pulls/11","id":72333007,"html_url":"https://github.com/eggjs/eslint-config-egg/pull/11","diff_url":"https://github.com/eggjs/eslint-config-egg/pull/11.diff","patch_url":"https://github.com/eggjs/eslint-config-egg/pull/11.patch","issue_url":"https://api.github.com/repos/eggjs/eslint-config-egg/issues/11","number":11,"state":"open","locked":false,"title":"根据 2.x 规则和 Airbnb base 规则进行修改，规范规则","user":{"login":"geekdada","id":3274850,"avatar_url":"https://avatars.githubusercontent.com/u/3274850?v=3","gravatar_id":"","url":"https://api.github.com/users/geekdada","html_url":"https://github.com/geekdada","followers_url":"https://api.github.com/users/geekdada/followers","following_url":"https://api.github.com/users/geekdada/following{/other_user}","gists_url":"https://api.github.com/users/geekdada/gists{/gist_id}","starred_url":"https://api.github.com/users/geekdada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geekdada/subscriptions","organizations_url":"https://api.github.com/users/geekdada/orgs","repos_url":"https://api.github.com/users/geekdada/repos","events_url":"https://api.github.com/users/geekdada/events{/privacy}","received_events_url":"https://api.github.com/users/geekdada/received_events","type":"User","site_admin":false},"body":"对规则增加了注释，`@since 3.0.0` 代表原来未定义或者定义有修改的规则。在规则修改上较尊重 Airbnb 的规则，不过在有差异的地方会根据现有 egg 的代码进行权衡。","created_at":"2016-06-02T11:51:35Z","updated_at":"2016-06-21T09:01:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c99d423ebcc3aafc511de46f2b7b697ca99771ea","assignee":{"login":"fengmk2","id":156269,"avatar_url":"https://avatars.githubusercontent.com/u/156269?v=3","gravatar_id":"","url":"https://api.github.com/users/fengmk2","html_url":"https://github.com/fengmk2","followers_url":"https://api.github.com/users/fengmk2/followers","following_url":"https://api.github.com/users/fengmk2/following{/other_user}","gists_url":"https://api.github.com/users/fengmk2/gists{/gist_id}","starred_url":"https://api.github.com/users/fengmk2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fengmk2/subscriptions","organizations_url":"https://api.github.com/users/fengmk2/orgs","repos_url":"https://api.github.com/users/fengmk2/repos","events_url":"https://api.github.com/users/fengmk2/events{/privacy}","received_events_url":"https://api.github.com/users/fengmk2/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/eggjs/eslint-config-egg/pulls/11/commits","review_comments_url":"https://api.github.com/repos/eggjs/eslint-config-egg/pulls/11/comments","review_comment_url":"https://api.github.com/repos/eggjs/eslint-config-egg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eggjs/eslint-config-egg/issues/11/comments","statuses_url":"https://api.github.com/repos/eggjs/eslint-config-egg/statuses/99d35a3da8db9313f15d359c4d2f0828a7225315","head":{"label":"geekdada:revamp","ref":"revamp","sha":"99d35a3da8db9313f15d359c4d2f0828a7225315","user":{"login":"geekdada","id":3274850,"avatar_url":"https://avatars.githubusercontent.com/u/3274850?v=3","gravatar_id":"","url":"https://api.github.com/users/geekdada","html_url":"https://github.com/geekdada","followers_url":"https://api.github.com/users/geekdada/followers","following_url":"https://api.github.com/users/geekdada/following{/other_user}","gists_url":"https://api.github.com/users/geekdada/gists{/gist_id}","starred_url":"https://api.github.com/users/geekdada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geekdada/subscriptions","organizations_url":"https://api.github.com/users/geekdada/orgs","repos_url":"https://api.github.com/users/geekdada/repos","events_url":"https://api.github.com/users/geekdada/events{/privacy}","received_events_url":"https://api.github.com/users/geekdada/received_events","type":"User","site_admin":false},"repo":{"id":60053593,"name":"eslint-config-egg","full_name":"geekdada/eslint-config-egg","owner":{"login":"geekdada","id":3274850,"avatar_url":"https://avatars.githubusercontent.com/u/3274850?v=3","gravatar_id":"","url":"https://api.github.com/users/geekdada","html_url":"https://github.com/geekdada","followers_url":"https://api.github.com/users/geekdada/followers","following_url":"https://api.github.com/users/geekdada/following{/other_user}","gists_url":"https://api.github.com/users/geekdada/gists{/gist_id}","starred_url":"https://api.github.com/users/geekdada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geekdada/subscriptions","organizations_url":"https://api.github.com/users/geekdada/orgs","repos_url":"https://api.github.com/users/geekdada/repos","events_url":"https://api.github.com/users/geekdada/events{/privacy}","received_events_url":"https://api.github.com/users/geekdada/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/geekdada/eslint-config-egg","description":"Node Style Guide for Egg.","fork":true,"url":"https://api.github.com/repos/geekdada/eslint-config-egg","forks_url":"https://api.github.com/repos/geekdada/eslint-config-egg/forks","keys_url":"https://api.github.com/repos/geekdada/eslint-config-egg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geekdada/eslint-config-egg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geekdada/eslint-config-egg/teams","hooks_url":"https://api.github.com/repos/geekdada/eslint-config-egg/hooks","issue_events_url":"https://api.github.com/repos/geekdada/eslint-config-egg/issues/events{/number}","events_url":"https://api.github.com/repos/geekdada/eslint-config-egg/events","assignees_url":"https://api.github.com/repos/geekdada/eslint-config-egg/assignees{/user}","branches_url":"https://api.github.com/repos/geekdada/eslint-config-egg/branches{/branch}","tags_url":"https://api.github.com/repos/geekdada/eslint-config-egg/tags","blobs_url":"https://api.github.com/repos/geekdada/eslint-config-egg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geekdada/eslint-config-egg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geekdada/eslint-config-egg/git/refs{/sha}","trees_url":"https://api.github.com/repos/geekdada/eslint-config-egg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geekdada/eslint-config-egg/statuses/{sha}","languages_url":"https://api.github.com/repos/geekdada/eslint-config-egg/languages","stargazers_url":"https://api.github.com/repos/geekdada/eslint-config-egg/stargazers","contributors_url":"https://api.github.com/repos/geekdada/eslint-config-egg/contributors","subscribers_url":"https://api.github.com/repos/geekdada/eslint-config-egg/subscribers","subscription_url":"https://api.github.com/repos/geekdada/eslint-config-egg/subscription","commits_url":"https://api.github.com/repos/geekdada/eslint-config-egg/commits{/sha}","git_commits_url":"https://api.github.com/repos/geekdada/eslint-config-egg/git/commits{/sha}","comments_url":"https://api.github.com/repos/geekdada/eslint-config-egg/comments{/number}","issue_comment_url":"https://api.github.com/repos/geekdada/eslint-config-egg/issues/comments{/number}","contents_url":"https://api.github.com/repos/geekdada/eslint-config-egg/contents/{+path}","compare_url":"https://api.github.com/repos/geekdada/eslint-config-egg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geekdada/eslint-config-egg/merges","archive_url":"https://api.github.com/repos/geekdada/eslint-config-egg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geekdada/eslint-config-egg/downloads","issues_url":"https://api.github.com/repos/geekdada/eslint-config-egg/issues{/number}","pulls_url":"https://api.github.com/repos/geekdada/eslint-config-egg/pulls{/number}","milestones_url":"https://api.github.com/repos/geekdada/eslint-config-egg/milestones{/number}","notifications_url":"https://api.github.com/repos/geekdada/eslint-config-egg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geekdada/eslint-config-egg/labels{/name}","releases_url":"https://api.github.com/repos/geekdada/eslint-config-egg/releases{/id}","deployments_url":"https://api.github.com/repos/geekdada/eslint-config-egg/deployments","created_at":"2016-05-31T02:53:07Z","updated_at":"2016-05-31T02:53:09Z","pushed_at":"2016-06-21T04:18:34Z","git_url":"git://github.com/geekdada/eslint-config-egg.git","ssh_url":"git@github.com:geekdada/eslint-config-egg.git","clone_url":"https://github.com/geekdada/eslint-config-egg.git","svn_url":"https://github.com/geekdada/eslint-config-egg","homepage":"http://egg.express","size":39,"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":"master"}},"base":{"label":"eggjs:master","ref":"master","sha":"aa3a93251806c48eece3994fb69a323942a73d95","user":{"login":"eggjs","id":15833670,"avatar_url":"https://avatars.githubusercontent.com/u/15833670?v=3","gravatar_id":"","url":"https://api.github.com/users/eggjs","html_url":"https://github.com/eggjs","followers_url":"https://api.github.com/users/eggjs/followers","following_url":"https://api.github.com/users/eggjs/following{/other_user}","gists_url":"https://api.github.com/users/eggjs/gists{/gist_id}","starred_url":"https://api.github.com/users/eggjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggjs/subscriptions","organizations_url":"https://api.github.com/users/eggjs/orgs","repos_url":"https://api.github.com/users/eggjs/repos","events_url":"https://api.github.com/users/eggjs/events{/privacy}","received_events_url":"https://api.github.com/users/eggjs/received_events","type":"Organization","site_admin":false},"repo":{"id":46123862,"name":"eslint-config-egg","full_name":"eggjs/eslint-config-egg","owner":{"login":"eggjs","id":15833670,"avatar_url":"https://avatars.githubusercontent.com/u/15833670?v=3","gravatar_id":"","url":"https://api.github.com/users/eggjs","html_url":"https://github.com/eggjs","followers_url":"https://api.github.com/users/eggjs/followers","following_url":"https://api.github.com/users/eggjs/following{/other_user}","gists_url":"https://api.github.com/users/eggjs/gists{/gist_id}","starred_url":"https://api.github.com/users/eggjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggjs/subscriptions","organizations_url":"https://api.github.com/users/eggjs/orgs","repos_url":"https://api.github.com/users/eggjs/repos","events_url":"https://api.github.com/users/eggjs/events{/privacy}","received_events_url":"https://api.github.com/users/eggjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eggjs/eslint-config-egg","description":"Node Style Guide for Egg.","fork":false,"url":"https://api.github.com/repos/eggjs/eslint-config-egg","forks_url":"https://api.github.com/repos/eggjs/eslint-config-egg/forks","keys_url":"https://api.github.com/repos/eggjs/eslint-config-egg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eggjs/eslint-config-egg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eggjs/eslint-config-egg/teams","hooks_url":"https://api.github.com/repos/eggjs/eslint-config-egg/hooks","issue_events_url":"https://api.github.com/repos/eggjs/eslint-config-egg/issues/events{/number}","events_url":"https://api.github.com/repos/eggjs/eslint-config-egg/events","assignees_url":"https://api.github.com/repos/eggjs/eslint-config-egg/assignees{/user}","branches_url":"https://api.github.com/repos/eggjs/eslint-config-egg/branches{/branch}","tags_url":"https://api.github.com/repos/eggjs/eslint-config-egg/tags","blobs_url":"https://api.github.com/repos/eggjs/eslint-config-egg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eggjs/eslint-config-egg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eggjs/eslint-config-egg/git/refs{/sha}","trees_url":"https://api.github.com/repos/eggjs/eslint-config-egg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eggjs/eslint-config-egg/statuses/{sha}","languages_url":"https://api.github.com/repos/eggjs/eslint-config-egg/languages","stargazers_url":"https://api.github.com/repos/eggjs/eslint-config-egg/stargazers","contributors_url":"https://api.github.com/repos/eggjs/eslint-config-egg/contributors","subscribers_url":"https://api.github.com/repos/eggjs/eslint-config-egg/subscribers","subscription_url":"https://api.github.com/repos/eggjs/eslint-config-egg/subscription","commits_url":"https://api.github.com/repos/eggjs/eslint-config-egg/commits{/sha}","git_commits_url":"https://api.github.com/repos/eggjs/eslint-config-egg/git/commits{/sha}","comments_url":"https://api.github.com/repos/eggjs/eslint-config-egg/comments{/number}","issue_comment_url":"https://api.github.com/repos/eggjs/eslint-config-egg/issues/comments{/number}","contents_url":"https://api.github.com/repos/eggjs/eslint-config-egg/contents/{+path}","compare_url":"https://api.github.com/repos/eggjs/eslint-config-egg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eggjs/eslint-config-egg/merges","archive_url":"https://api.github.com/repos/eggjs/eslint-config-egg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eggjs/eslint-config-egg/downloads","issues_url":"https://api.github.com/repos/eggjs/eslint-config-egg/issues{/number}","pulls_url":"https://api.github.com/repos/eggjs/eslint-config-egg/pulls{/number}","milestones_url":"https://api.github.com/repos/eggjs/eslint-config-egg/milestones{/number}","notifications_url":"https://api.github.com/repos/eggjs/eslint-config-egg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eggjs/eslint-config-egg/labels{/name}","releases_url":"https://api.github.com/repos/eggjs/eslint-config-egg/releases{/id}","deployments_url":"https://api.github.com/repos/eggjs/eslint-config-egg/deployments","created_at":"2015-11-13T13:35:16Z","updated_at":"2016-04-09T02:46:33Z","pushed_at":"2016-06-21T04:18:35Z","git_url":"git://github.com/eggjs/eslint-config-egg.git","ssh_url":"git@github.com:eggjs/eslint-config-egg.git","clone_url":"https://github.com/eggjs/eslint-config-egg.git","svn_url":"https://github.com/eggjs/eslint-config-egg","homepage":"http://egg.express","size":13,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eggjs/eslint-config-egg/pulls/11"},"html":{"href":"https://github.com/eggjs/eslint-config-egg/pull/11"},"issue":{"href":"https://api.github.com/repos/eggjs/eslint-config-egg/issues/11"},"comments":{"href":"https://api.github.com/repos/eggjs/eslint-config-egg/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/eggjs/eslint-config-egg/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/eggjs/eslint-config-egg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eggjs/eslint-config-egg/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/eggjs/eslint-config-egg/statuses/99d35a3da8db9313f15d359c4d2f0828a7225315"}}}}
{"actor":{"display_login":"fengmk2"}}