ember-cli-eslint icon indicating copy to clipboard operation
ember-cli-eslint copied to clipboard

Integrate eslint-friendly-formatter

Open elwayman02 opened this issue 8 years ago • 3 comments

It would be great to automatically run eslint using this package as a formatter, so that people can integrate their terminal with editors to easily click into a file when they see an error.

https://github.com/royriojas/eslint-friendly-formatter

All we'd need to do is update the eslint command to add --format 'node_modules/eslint-friendly-formatter' (accounting, of course, for OS differences & npm2 vs npm3).

elwayman02 avatar Jun 08 '16 23:06 elwayman02

I can see the iTerm support being useful, but wouldn't editor integration need to be done through whatever plugin is actually running the linter? For example, in Neovim I can configure Neomake to run ESLint with different arguments... You want to modify the output of ember test?

alexlafroscia avatar Jul 02 '16 05:07 alexlafroscia

So, I got a basic version of this working and it's really simple. The problems right now are that

  1. Formatters provided with a relative path to node_modules don't seem to be discovered correctly
  2. The output in the test cases isn't affected; only the output before the tests cases are
screen shot 2016-07-01 at 11 35 08 pm

It would definitely be helpful to get a better sense for what you're hoping integration with custom formatters will achieve to know if that's enough, or if you're looking for something else.

alexlafroscia avatar Jul 02 '16 06:07 alexlafroscia

Hi there.

I don't know if adding a new dependency for the purpose of terminal-click is a good idea. ESLint has a unix formatter that would fit the need in terms of filenames clickability.

Now I understand that the unix formatter output is not very sexy ^^

Wouldn't adding an option to allow formatter selection be enough to begin with?

Thanks!

simonc avatar Jun 01 '18 07:06 simonc