I am new to React and started using Eslint for formatting but after i have installed it, Eslint gave the same error for all my components, and all are related to '<' under the return lines. The error is:
Parsing error: Unexpected token <
Here is an example:
import React from "react";
import { Link } from "react-router-dom";
import HeroesLogo from "./assets/heroes-noback.png";
function NavigationBar() {
return (
<div className="navbar">
<Link to="/">
<img src={HeroesLogo} alt="Logo" id="heroes-logo" />
</Link>
</div>
);
}
export default NavigationBar;
It underlines the < operator of the first div and does it for every component.
I searched the problem and solutions are mostly about changing the parsing rules but I wonder, what am I doing wrong with this syntax?