Hey everyone, first of all, great work on Frontity. I’ve avoided using WordPress for some years but a client I work with insists on it for their clients, so this project has been perfect to allow me to continue working with React and not have to dive back into PHP.
I always work with ESLint and tend to use this configuration from Wes Bos but with it installed I’m getting a few errors I have to resolve in weird ways.
Firstly, when I import React, I get a warning that React must be included in my project dependencies (package.json
).
Similarly, I’m getting the same error when importing Link
:
import Link from '@frontity/components/link';
Lastly, I also get errors if I add install any third party dependencies.
I guess it’s reading the package.json included with the theme package and not the one at the root of the project. So my question is; should I be installing packages at the root or at theme level? My workaround at the moment is to just include the package in both package.json
files.