eslint-plugin-node icon indicating copy to clipboard operation
eslint-plugin-node copied to clipboard

Mixed sourceType cause false errors

Open Zekfad opened this issue 5 years ago • 0 comments

Hello, I'm using rollup and has mixed sources. CommonJS + module. I have following problems:

  • plugin:node/recommended MUST respect nearest package.json "type": "..."
  • plugin:node/recommended SHOULD respect environments instead of source type.

Reproduction:

  • Clone https://github.com/Zekfad/eslint-config/tree/356ec9a4b2d315f1cb013a53a0a89110ca7f14e2
  • yarn build
  • yarn lint -> All should be fine
  • Uncomment https://github.com/Zekfad/eslint-config/blob/356ec9a4b2d315f1cb013a53a0a89110ca7f14e2/src/main/index.js#L27
  • Rebuild yarn build
  • yarn lint fails on ESLint.test.js, because it cant find require, meanwhile https://github.com/Zekfad/eslint-config/blob/356ec9a4b2d315f1cb013a53a0a89110ca7f14e2/test/package.json#L2

Zekfad avatar Aug 14 '20 11:08 Zekfad