Currently, I've got Prettier set up through ESLint using the following .eslintrc.json
:
{
"extends": ["react-app", "plugin:prettier/recommended"]
}
This works fine for linting and formatting JavaScript files.
However, when I'm trying to run ESLint (and thus Prettier) on Markdown and CSS files, errors like the following occur:
/Users/willem-aart/Code/foo/bar.md
1:1 error Parsing error: Unexpected character '#'
> 1 | ## foobar
| ^
✖ 1 problem (1 error, 0 warnings)
It seems that ESLint cannot handle the file. On the other hand, Prettier – when run standalone – handles the file as expected.
Is it possible to format files other than JavaScript using Prettier through ESLint? Or am I better off using Prettier standalone?
I guess Prettier can be applied to a broader range of file formats than ESLint is intended for.