Thank you for this awesome repo. It's a great way to get started with electron quickly! :clinking_glasses: I hope this is the right place for this question.
I am following along with Read & Write Local Files.
When running yarn dev, I get the following lint error: 'electron' should be listed in the project's dependencies, not devDependencies
The offending line reads: import { remote } from 'electron';
My first instinct is to have eslint ignore the rule in that line:
import { remote } from 'electron'; // eslint-disable-line import/no-extraneous-dependencies
That seems to work fine, but is this the right way to import the electron module into the renderer process?
This would be a little more related to eslint-plugin-import. They cover this in their docs, https://www.npmjs.com/package/eslint-plugin-import#importcore-modules. I've never ran into this warning beforehand, so my question is what text editor are you using?
set rules "import/no-extraneous-dependencies": ["error", { "devDependencies": true }] is ok
I Just ran into the same issue. You can also add this to your eslint config file which is safer IMHO:
# .eslintrc.yml
settings:
import/core-modules: [ electron ]
https://github.com/benmosher/eslint-plugin-import#importcore-modules
Most helpful comment
I Just ran into the same issue. You can also add this to your eslint config file which is safer IMHO:
https://github.com/benmosher/eslint-plugin-import#importcore-modules