At the moment, I have Prettier set up with ESLint using the configuration provided in my .eslintrc.json file:
{
"extends": ["react-app", "plugin:prettier/recommended"]
}
Everything works smoothly for linting and formatting JavaScript files.
However, I encounter errors when attempting to use ESLint (and therefore Prettier) on Markdown and CSS files, like the one below:
/Users/willem-aart/Code/foo/bar.md
1:1 error Parsing error: Unexpected character '#'
> 1 | ## foobar
| ^
✖ 1 problem (1 error, 0 warnings)
It appears that ESLint struggles to process these files, yet Prettier manages to format them correctly when used independently.
Is it feasible to format file types other than JavaScript using Prettier through ESLint? Or would it be more effective to use Prettier on its own?
It seems like Prettier supports a wider variety of file formats compared to what ESLint is designed for.