{"action":"created","issue":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/1513","repository_url":"https://api.github.com/repos/ant-design/ant-design","labels_url":"https://api.github.com/repos/ant-design/ant-design/issues/1513/labels{/name}","comments_url":"https://api.github.com/repos/ant-design/ant-design/issues/1513/comments","events_url":"https://api.github.com/repos/ant-design/ant-design/issues/1513/events","html_url":"https://github.com/ant-design/ant-design/pull/1513","id":151033048,"number":1513,"title":"fix lint","user":{"login":"superRaytin","id":2723376,"avatar_url":"https://avatars.githubusercontent.com/u/2723376?v=3","gravatar_id":"","url":"https://api.github.com/users/superRaytin","html_url":"https://github.com/superRaytin","followers_url":"https://api.github.com/users/superRaytin/followers","following_url":"https://api.github.com/users/superRaytin/following{/other_user}","gists_url":"https://api.github.com/users/superRaytin/gists{/gist_id}","starred_url":"https://api.github.com/users/superRaytin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superRaytin/subscriptions","organizations_url":"https://api.github.com/users/superRaytin/orgs","repos_url":"https://api.github.com/users/superRaytin/repos","events_url":"https://api.github.com/users/superRaytin/events{/privacy}","received_events_url":"https://api.github.com/users/superRaytin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-26T03:44:23Z","updated_at":"2016-04-26T06:09:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ant-design/ant-design/pulls/1513","html_url":"https://github.com/ant-design/ant-design/pull/1513","diff_url":"https://github.com/ant-design/ant-design/pull/1513.diff","patch_url":"https://github.com/ant-design/ant-design/pull/1513.patch"},"body":"扫了一下全部的文件，修复 `arrow-body-style` 规则时跳过了以下三种情况：\r\n\r\n1、`{ return a && b && c && d }` 里条件过多，比如：\r\n\r\n```\r\n    [(node) => {\r\n      return isElement(node) &&\r\n        getTagName(node) === 'p' &&\r\n        getTagName(getChildren(node)[0]) === 'img' &&\r\n        /preview-img/gi.test(getAttributes(getChildren(node)[0]).class);\r\n    }\r\n```\r\n\r\n2、后面跟着很多的链式调用，比如：\r\n\r\n```\r\n    const options = Object.keys(componentsList).map((key) => {\r\n      return componentsList[key];\r\n    }).filter(({ meta }) => {\r\n      return /^component/.test(meta.fileName);\r\n    }).map(({ meta }) => {\r\n      //...\r\n    });\r\n```\r\n\r\n3、返回的是一个 React Element 集合，比如：\r\n\r\n```\r\n    const imagesList = imgsMeta.map((meta, index) => {\r\n      return (\r\n        <div key={index}>\r\n          <div className=\"image-modal-container\">\r\n            <img {...meta} alt={meta.alt} />\r\n          </div>\r\n        </div>\r\n      );\r\n    });\r\n```\r\n\r\n出于可读性和可维护性的考虑，以上三种情况建议不强行上  `arrow-body-style`，另外，这三种情况其实还挺多的，所以这个规则目前也没有多大的意义\r\n"},"comment":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/comments/214625259","html_url":"https://github.com/ant-design/ant-design/pull/1513#issuecomment-214625259","issue_url":"https://api.github.com/repos/ant-design/ant-design/issues/1513","id":214625259,"user":{"login":"afc163","id":507615,"avatar_url":"https://avatars.githubusercontent.com/u/507615?v=3","gravatar_id":"","url":"https://api.github.com/users/afc163","html_url":"https://github.com/afc163","followers_url":"https://api.github.com/users/afc163/followers","following_url":"https://api.github.com/users/afc163/following{/other_user}","gists_url":"https://api.github.com/users/afc163/gists{/gist_id}","starred_url":"https://api.github.com/users/afc163/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afc163/subscriptions","organizations_url":"https://api.github.com/users/afc163/orgs","repos_url":"https://api.github.com/users/afc163/repos","events_url":"https://api.github.com/users/afc163/events{/privacy}","received_events_url":"https://api.github.com/users/afc163/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T06:09:15Z","updated_at":"2016-04-26T06:09:15Z","body":"好像没问题，是我看错了..."}}