0

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?

cany
  • 11
  • 1
  • Does this answer your question? [ESLint Parsing error: Unexpected token](https://stackoverflow.com/questions/36001552/eslint-parsing-error-unexpected-token) – Ahmed Sbai Jan 20 '23 at 01:01

0 Answers0