3

I'm using css framework and place cdns like this

//public <head> tag
<Helmet>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/uikit@3.6.15/dist/css/uikit.min.css" />
  <script src="https://cdn.jsdelivr.net/npm/uikit@3.6.15/dist/js/uikit.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/uikit@3.6.15/dist/js/uikit-icons.min.js"></script>
</Helmet>

example inside the component

//Layout menu
<nav className="uk-navbar-container" data-uk-navbar="">
  <div className="uk-navbar-center">
    <ul className="uk-navbar-nav">
      <li><Link to="/">Home</Link></li>
      <li><Link to="/about">About</Link></li>
      <li><Link to="/request">Request</Link></li>
    </ul>
  </div>
</nav>
...

I'm getting the errors for example

Warning: Prop `className` did not match. Server: "uk-navbar-container uk-navbar" Client: "uk-navbar-container"

UIkit JS will adjust class (className) when the page load, and I want to keep that for animation stuff. Then I've tried

// just add "uk-navbar" fixed the errors
<nav className="uk-navbar-container uk-navbar" data-uk-navbar="">
  <div className="uk-navbar-center">
    <ul className="uk-navbar-nav">
      <li><Link to="/">Home</Link></li>
      <li><Link to="/about">About</Link></li>
      <li><Link to="/request">Request</Link></li>
    </ul>
  </div>
</nav>
...

But in reality there are so many to look up to fix the errors

How to turn off (ignore) the errors (warning) in Gatsby?

zummon
  • 906
  • 3
  • 9
  • 27

1 Answers1

1

Gatsby, by default, comes with a default ESLint configuration. As you can see from the docs:

Gatsby ships with a built-in ESLint setup. For most users, our built-in ESLint setup is all you need. If you know however that you’d like to customize your ESLint config e.g. your company has their own custom ESLint setup, this shows how this can be done

To disable the ESLint, just create an empty .eslintrc file in the root of your project.

Ferran Buireu
  • 28,630
  • 6
  • 39
  • 67
  • 1
    Thanks, but still showing the errors. I did `npm i eslint-config-react-app` and created `.eslintrc` accordingly to the docs. are there process I still be missing? – zummon Feb 06 '21 at 10:34