DEV Community

Discussion on: Migrating and configuring Eslint with Angular 11

Collapse
 
singhshubham97 profile image
singhshubham97 • Edited

The parse error in index.html
dev-to-uploads.s3.amazonaws.com/i/...

Thread Thread
 
gsarciotto profile image
Giovanni Sarciotto

Alright, I managed to solve the problem in my machine. It seems like prettier isn't able to decide which parser to use for some reason. Add the following in your .prettierrc:

"overrides": [
        {
            "files": "*.component.html",
            "options": {
                "parser": "angular"
            }
        },
        {
            "files": "*.html",
            "options": {
                "parser": "html"
            }
        }
    ]
Enter fullscreen mode Exit fullscreen mode

If this fixes your problem, please tell me so that I can update the article!

Thread Thread
 
singhshubham97 profile image
singhshubham97

Thanks Giovanni for the help!! Its working in my machine