{"action":"created","issue":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/442","labels_url":"https://api.github.com/repos/stylelint/stylelint/issues/442/labels{/name}","comments_url":"https://api.github.com/repos/stylelint/stylelint/issues/442/comments","events_url":"https://api.github.com/repos/stylelint/stylelint/issues/442/events","html_url":"https://github.com/stylelint/stylelint/issues/442","id":112474637,"number":442,"title":"Support loading config from package.json","user":{"login":"keithamus","id":118266,"avatar_url":"https://avatars.githubusercontent.com/u/118266?v=3","gravatar_id":"","url":"https://api.github.com/users/keithamus","html_url":"https://github.com/keithamus","followers_url":"https://api.github.com/users/keithamus/followers","following_url":"https://api.github.com/users/keithamus/following{/other_user}","gists_url":"https://api.github.com/users/keithamus/gists{/gist_id}","starred_url":"https://api.github.com/users/keithamus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithamus/subscriptions","organizations_url":"https://api.github.com/users/keithamus/orgs","repos_url":"https://api.github.com/users/keithamus/repos","events_url":"https://api.github.com/users/keithamus/events{/privacy}","received_events_url":"https://api.github.com/users/keithamus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/stylelint/stylelint/labels/status:%20pr%20welcome","name":"status: pr welcome","color":"009800"},{"url":"https://api.github.com/repos/stylelint/stylelint/labels/type:%20enhancement","name":"type: enhancement","color":"488CFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-20T22:38:53Z","updated_at":"2015-10-25T14:55:10Z","closed_at":null,"body":"Just like eslint does, stylelint should support loading its config from the package.json.\r\n\r\nEslint reads an `eslint` field in the package.json, for example:\r\n\r\n```json\r\n{\r\n  \"name\": \"my-super-awesome-project\",\r\n  \"eslint\": {\r\n    \"extends\": [\"...\"],\r\n    \"rules\": {\r\n      \"...\": \"...\"\r\n    }\r\n  },\r\n  \"dependencies\": {\r\n    \"eslint\": \"^1.7.2\",\r\n  }\r\n}\r\n```\r\n\r\nIt'd be great if I could do exactly the same with stylelint:\r\n\r\n```json\r\n{\r\n  \"name\": \"my-super-awesome-project\",\r\n  \"stylelint\": {\r\n    \"extends\": [\"...\"],\r\n    \"rules\": {\r\n      \"...\": \"...\"\r\n    }\r\n  },\r\n  \"dependencies\": {\r\n    \"stylelint\": \"^2.1.0\",\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/comments/150931853","html_url":"https://github.com/stylelint/stylelint/issues/442#issuecomment-150931853","issue_url":"https://api.github.com/repos/stylelint/stylelint/issues/442","id":150931853,"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},"created_at":"2015-10-25T14:55:10Z","updated_at":"2015-10-25T14:55:10Z","body":"I think we might have to tackle this one and #418 at the same time by writing our own configuration loader instead of just using rc. We can use rc itself, eslint, jscs, and probably some other projects (babel?) as examples to work from.\r\n\r\n(Unless ... @MoOx, any chance you know an existing project that extends rc to load config from `[projectname]Config` properties in `package.json` files found via the same file-finding function?)"}}