{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/typescript-eslint-parser/issues/261","repository_url":"https://api.github.com/repos/eslint/typescript-eslint-parser","labels_url":"https://api.github.com/repos/eslint/typescript-eslint-parser/issues/261/labels{/name}","comments_url":"https://api.github.com/repos/eslint/typescript-eslint-parser/issues/261/comments","events_url":"https://api.github.com/repos/eslint/typescript-eslint-parser/issues/261/events","html_url":"https://github.com/eslint/typescript-eslint-parser/pull/261","id":226793099,"number":261,"title":"Chore: Refactor the codebase (fixes #220)","user":{"login":"JamesHenry","id":900523,"avatar_url":"https://avatars2.githubusercontent.com/u/900523?v=3","gravatar_id":"","url":"https://api.github.com/users/JamesHenry","html_url":"https://github.com/JamesHenry","followers_url":"https://api.github.com/users/JamesHenry/followers","following_url":"https://api.github.com/users/JamesHenry/following{/other_user}","gists_url":"https://api.github.com/users/JamesHenry/gists{/gist_id}","starred_url":"https://api.github.com/users/JamesHenry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JamesHenry/subscriptions","organizations_url":"https://api.github.com/users/JamesHenry/orgs","repos_url":"https://api.github.com/users/JamesHenry/repos","events_url":"https://api.github.com/users/JamesHenry/events{/privacy}","received_events_url":"https://api.github.com/users/JamesHenry/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-05-06T18:27:38Z","updated_at":"2017-05-06T22:27:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/eslint/typescript-eslint-parser/pulls/261","html_url":"https://github.com/eslint/typescript-eslint-parser/pull/261","diff_url":"https://github.com/eslint/typescript-eslint-parser/pull/261.diff","patch_url":"https://github.com/eslint/typescript-eslint-parser/pull/261.patch"},"body":"This is major refactoring of the structure of the core codebase.\r\n\r\n**There are no changes to any existing test cases.**\r\n\r\nSummary of changes:\r\n\r\n- [x] Drop Node 0.12 support, now `>=4` to align with `eslint/eslint`\r\n- [x] Remove now redundant `object-assign` dependency, and replace its usage with native `Object.assign`\r\n- [x] Remove `features.js` and `token-translator.js` - they were never used\r\n- [x] Use same lint configuration as `eslint/eslint`\r\n- [x] Upgrade all dependencies to latest\r\n- [x] Update `ast-node-types.js` to include all known converted `ESTreeNode` types\r\n- [x] Add `errorOnUnknownASTType` parser option to throw if a generated `ESTreeNode` type is not found in `ast-node-types.js` (this is disabled by default, but enabled in tests)\r\n- [x] Separate utility functions out into a new file, `node-utils.js`, to make the codebase much easier to reason about, especially w.r.t. which helpers mutate the current node, and which are pure functions\r\n- [x] Move all `ts.*` helper functions into abstractions within `node-utils.js` so that it is clear what our dependencies on TypeScript actually are\r\n- [x] Add brand new general utilities such as `findFirstMatchingChild` and `findFirstMatchingAncestor` which take in `predicate` functions, and are built upon by other utility functions. These also allow me to remove some `ts.*` dependencies from the codebase\r\n- [x] Move core `convert()` function into its own file, `convert.js`, and increase what is explicitly passed into it rather than just closing over all outer scopes. Again, this greatly helps with clarity and focused responsibility\r\n- [x] Add block scoping to more complex switch cases in `convert.js`, taking advantage of `let` and `const` for variable declarations. No more battling to come up with unique variable names within a 1000+ line function!"},"comment":{"url":"https://api.github.com/repos/eslint/typescript-eslint-parser/issues/comments/299669665","html_url":"https://github.com/eslint/typescript-eslint-parser/pull/261#issuecomment-299669665","issue_url":"https://api.github.com/repos/eslint/typescript-eslint-parser/issues/261","id":299669665,"user":{"login":"eslintbot","id":13383618,"avatar_url":"https://avatars3.githubusercontent.com/u/13383618?v=3","gravatar_id":"","url":"https://api.github.com/users/eslintbot","html_url":"https://github.com/eslintbot","followers_url":"https://api.github.com/users/eslintbot/followers","following_url":"https://api.github.com/users/eslintbot/following{/other_user}","gists_url":"https://api.github.com/users/eslintbot/gists{/gist_id}","starred_url":"https://api.github.com/users/eslintbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eslintbot/subscriptions","organizations_url":"https://api.github.com/users/eslintbot/orgs","repos_url":"https://api.github.com/users/eslintbot/repos","events_url":"https://api.github.com/users/eslintbot/events{/privacy}","received_events_url":"https://api.github.com/users/eslintbot/received_events","type":"User","site_admin":false},"created_at":"2017-05-06T22:27:15Z","updated_at":"2017-05-06T22:27:15Z","body":"LGTM"}}
{"actor":{"display_login":"eslintbot"}}