{"action":"created","issue":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/1930","repository_url":"https://api.github.com/repos/stylelint/stylelint","labels_url":"https://api.github.com/repos/stylelint/stylelint/issues/1930/labels{/name}","comments_url":"https://api.github.com/repos/stylelint/stylelint/issues/1930/comments","events_url":"https://api.github.com/repos/stylelint/stylelint/issues/1930/events","html_url":"https://github.com/stylelint/stylelint/pull/1930","id":179251334,"number":1930,"title":"Refactor core functionality","user":{"login":"davidtheclark","id":628431,"avatar_url":"https://avatars.githubusercontent.com/u/628431?v=3","gravatar_id":"","url":"https://api.github.com/users/davidtheclark","html_url":"https://github.com/davidtheclark","followers_url":"https://api.github.com/users/davidtheclark/followers","following_url":"https://api.github.com/users/davidtheclark/following{/other_user}","gists_url":"https://api.github.com/users/davidtheclark/gists{/gist_id}","starred_url":"https://api.github.com/users/davidtheclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidtheclark/subscriptions","organizations_url":"https://api.github.com/users/davidtheclark/orgs","repos_url":"https://api.github.com/users/davidtheclark/repos","events_url":"https://api.github.com/users/davidtheclark/events{/privacy}","received_events_url":"https://api.github.com/users/davidtheclark/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/stylelint/stylelint/labels/status:%20wip","name":"status: wip","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":28,"created_at":"2016-09-26T14:53:50Z","updated_at":"2016-10-07T19:21:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/stylelint/stylelint/pulls/1930","html_url":"https://github.com/stylelint/stylelint/pull/1930","diff_url":"https://github.com/stylelint/stylelint/pull/1930.diff","patch_url":"https://github.com/stylelint/stylelint/pull/1930.patch"},"body":"Work in progress! I just wanted to start a PR to make everybody aware of what I'm working on, because it's pretty big.\r\n\r\nThe goal here is to improve and clarify the core (non-rule) functionality, and what at it close #1882 and close #1881. And to do so *without breaking any public API*. This work runs in parallel to [v2 of cosmiconfig](https://github.com/davidtheclark/cosmiconfig).\r\n\r\nHere's a checklist of my intentions:\r\n\r\n- [x] Integrate [Flow](https://flowtype.org/) in place of JSDoc comments, since its types are actually enforced. It's pretty neat. (This involves the use of `babel-eslint` for ESLint.) I think this will be super helpful in clarifying the way that this functionality works.\r\n- [x] Allow each file to have its own config (#1881). This requires some serious caching, to avoid conducting repeated cosmiconfig searches through the same file structures. That caching work will be built into cosmiconfig and added to here in stylelint. (This actually should be working now I think (??), but is not yet tested.)\r\n- [x] Expose a `getConfigForFile()` function (#1882). Ties in with the above. \r\n- [x] Clarify responsibilities of different non-rule functions. A lot has been added and fixed over time, so responsibilities have often become kind of muddled.\r\n- [x] Add more explanatory comments explaining edge cases, etc.\r\n- [x] Try loading extends, plugins, processors from `process.cwd()`, to close #1810.\r\n\r\nThe refactoring in tests is not to alter their assertions (I want the same tests to pass), but to improve them. For example, the use of `catch(t.end)` instead of `catch(logError)` makes tape handle errors much better. I'm just making changes piecemeal as I'm working on getting tests to pass.\r\n\r\nAny input welcome while I keep working on this."},"comment":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/comments/252338886","html_url":"https://github.com/stylelint/stylelint/pull/1930#issuecomment-252338886","issue_url":"https://api.github.com/repos/stylelint/stylelint/issues/1930","id":252338886,"user":{"login":"evilebottnawi","id":4567934,"avatar_url":"https://avatars.githubusercontent.com/u/4567934?v=3","gravatar_id":"","url":"https://api.github.com/users/evilebottnawi","html_url":"https://github.com/evilebottnawi","followers_url":"https://api.github.com/users/evilebottnawi/followers","following_url":"https://api.github.com/users/evilebottnawi/following{/other_user}","gists_url":"https://api.github.com/users/evilebottnawi/gists{/gist_id}","starred_url":"https://api.github.com/users/evilebottnawi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evilebottnawi/subscriptions","organizations_url":"https://api.github.com/users/evilebottnawi/orgs","repos_url":"https://api.github.com/users/evilebottnawi/repos","events_url":"https://api.github.com/users/evilebottnawi/events{/privacy}","received_events_url":"https://api.github.com/users/evilebottnawi/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T19:21:00Z","updated_at":"2016-10-07T19:21:00Z","body":"Started tests. It takes some time."}}
{"actor":{"display_login":"evilebottnawi"}}