However, after reading Docs of both of them I understood that both would do the job. But, if we use eslint-plugin-prettier, there will be a few issues that would not happen if we would use eslint-config-prettier. Also, when using eslint-plugin-prettier recommended config, it would use eslint-config-prettier behind the scene.
It seams to me that eslint-config-prettier has obvious advantages over eslint-plugin-prettier, but eslint-plugin-prettier is still very popular and it has really a lot of weekly downloads on npm. Did I miss something? What would be advantage of using eslint-plugin-prettier?
This packages have different purposes:
eslint-plugin-prettier - runs Prettier as an ESLint rule and reports differences as individual ESLint issues.
eslint-config-prettier - turns off all rules that are unnecessary or might conflict with Prettier. It's mean that if you use some eslint-config(your own or third party) and this config have conflicts with prettier rules - it should resolve this conflicts by turn off this rules.