{"action":"created","issue":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/3415","repository_url":"https://api.github.com/repos/stylelint/stylelint","labels_url":"https://api.github.com/repos/stylelint/stylelint/issues/3415/labels{/name}","comments_url":"https://api.github.com/repos/stylelint/stylelint/issues/3415/comments","events_url":"https://api.github.com/repos/stylelint/stylelint/issues/3415/events","html_url":"https://github.com/stylelint/stylelint/issues/3415","id":334889627,"node_id":"MDU6SXNzdWUzMzQ4ODk2Mjc=","number":3415,"title":"Add new output option for stylelint CLI","user":{"login":"Ruffeng","id":18511772,"node_id":"MDQ6VXNlcjE4NTExNzcy","avatar_url":"https://avatars1.githubusercontent.com/u/18511772?v=4","gravatar_id":"","url":"https://api.github.com/users/Ruffeng","html_url":"https://github.com/Ruffeng","followers_url":"https://api.github.com/users/Ruffeng/followers","following_url":"https://api.github.com/users/Ruffeng/following{/other_user}","gists_url":"https://api.github.com/users/Ruffeng/gists{/gist_id}","starred_url":"https://api.github.com/users/Ruffeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ruffeng/subscriptions","organizations_url":"https://api.github.com/users/Ruffeng/orgs","repos_url":"https://api.github.com/users/Ruffeng/repos","events_url":"https://api.github.com/users/Ruffeng/events{/privacy}","received_events_url":"https://api.github.com/users/Ruffeng/received_events","type":"User","site_admin":false},"labels":[{"id":210042527,"node_id":"MDU6TGFiZWwyMTAwNDI1Mjc=","url":"https://api.github.com/repos/stylelint/stylelint/labels/status:%20discussion","name":"status: discussion","color":"0023ee","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-06-22T14:02:53Z","updated_at":"2018-06-23T10:27:57Z","closed_at":null,"author_association":"NONE","body":"# Current problem\r\nSo far, there is 3 kind of formatters for `stylelint CLI` : verbose, json and string(default). \r\nAll of them are really nice, but I find the necessity to get an output that it shows file, line, type of error, and description of the error in a very single line.\r\n\r\nThe current output is something like:\r\n```\r\nsome_folder/styles.css\r\n4:1  ⚠ 'Expected \".foo.bar\" to have specificity no more than \"0,1,0\"\r\n6:1  ✖ 'Unexpected unit \"px\" for property \"margin\"\r\n7:1  ⚠ 'more warnings..'\r\n```\r\n\r\nIt would be nice to have another formatter option that does an output like:\r\n```\r\nsome_folder/styles.css     4:1  ⚠ 'Expected \".foo.bar\" to have specificity no more than \"0,1,0\"\r\nsome_folder/styles.css     6:1  ✖ 'Unexpected unit \"px\" for property \"margin\"\r\nsome_folder/styles.css     7:1  ⚠ 'more warnings..'\r\n```\r\n## Why to do that?\r\nCan happen that we want to work with the output from the CLI, with this new output, we can easily check line by line which file it belongs to the error.\r\n\r\nAn example of that is the [Overcommit](https://github.com/brigade/overcommit). To make work the linters, it's based on single line outputs and it does a matching with a regex. Here an issue to implement Stylelint at overcommit [#514](https://github.com/brigade/overcommit/issues/514 )\r\n\r\n## Conclusion\r\nIn my opinion, it could be another elegant option, kind of `compact` formatter. I saw the formatters files in the project. If I get some guidance, I can try to create a PR with this kind of output ( I assume there is more setup than just create the file in formatters and prepare it).\r\n\r\nLooking forward to your thoughts! \r\n\r\nBest!"},"comment":{"url":"https://api.github.com/repos/stylelint/stylelint/issues/comments/399662960","html_url":"https://github.com/stylelint/stylelint/issues/3415#issuecomment-399662960","issue_url":"https://api.github.com/repos/stylelint/stylelint/issues/3415","id":399662960,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTY2Mjk2MA==","user":{"login":"Ruffeng","id":18511772,"node_id":"MDQ6VXNlcjE4NTExNzcy","avatar_url":"https://avatars1.githubusercontent.com/u/18511772?v=4","gravatar_id":"","url":"https://api.github.com/users/Ruffeng","html_url":"https://github.com/Ruffeng","followers_url":"https://api.github.com/users/Ruffeng/followers","following_url":"https://api.github.com/users/Ruffeng/following{/other_user}","gists_url":"https://api.github.com/users/Ruffeng/gists{/gist_id}","starred_url":"https://api.github.com/users/Ruffeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ruffeng/subscriptions","organizations_url":"https://api.github.com/users/Ruffeng/orgs","repos_url":"https://api.github.com/users/Ruffeng/repos","events_url":"https://api.github.com/users/Ruffeng/events{/privacy}","received_events_url":"https://api.github.com/users/Ruffeng/received_events","type":"User","site_admin":false},"created_at":"2018-06-23T10:27:57Z","updated_at":"2018-06-23T10:27:57Z","author_association":"NONE","body":"@jeddy3 --custom-formatter sounds great, although I am not sure if it's the best option to create a JS file in a ruby gem. As well I think would be hard to reference the file, depending on the system, a gem can be stored in one folder or another"}}
{"actor":{"display_login":"Ruffeng"}}