Breaking change to ESLint default formatter

In the next version of ESLint, scheduled for release next week, there is a breaking change to the default formatter. Up until this point, the default formatter was the “compact” formatter, which outputs data such as:

We think the stylish formatter is a much better user experience for those using the command line manually, making it easier to see which files are causing which problems.

What breaks?

It has come to our attention that some tools are using ESLint on the command line, assuming that the compact formatter is being used, and then processing that information into another format. If you are using ESLint in this way, you should update your tool immediately to specify the compact formatter instead of just using the default:

eslint -f compact foo.js

This works equally well with older and new versions of ESLint, and will continue to work going forward.

In general, it is always best to specify the formatter that you want when processing output, rather than relying on the default (which may change, as in this case). The current set of formatters is considered stable and none of them will be removed in the future, so it’s safe to rely on them.