TrySound / rollup-plugin-eslint

This plugin in migrated https://github.com/rollup/plugins/tree/master/packages/eslint
MIT License
61 stars 17 forks source link

v7 Breaks my Rollup build #40

Open halostatue opened 4 years ago

halostatue commented 4 years ago

When upgrading to v7, I get the following error during a package build:

[!] (plugin eslint) Error: Failed to load config "developit" to extend from.
Referenced from: /ā€¦/assets/node_modules/unfetch/package.json
node_modules/unfetch/dist/unfetch.mjs

Iā€™m not entirely sure where to start debugging, but rolling back to v6 fixes the error entirely.

jackysee commented 4 years ago

Same here. Seems the default folder exclusion (node_modules/) is not working and eslint is trying to load lint config of modules. Manually setting `exclude: 'node_modules/or includenode_modulesin.eslintignore` does not work.

yabdabs commented 4 years ago

had to downgrade to 6 as well

RobbieTheWagner commented 4 years ago

This breaks my build too

pkit commented 4 years ago

Can be fixed by a simple check order change

diff --git a/node_modules/rollup-plugin-eslint/index.js b/node_modules/rollup-plugin-eslint/index.js
index 620bb21..3e703a6 100644
--- a/node_modules/rollup-plugin-eslint/index.js
+++ b/node_modules/rollup-plugin-eslint/index.js
@@ -33,7 +33,7 @@ function eslint(options = {}) {

     transform(code, id) {
       const file = normalizePath(id);
-      if (cli.isPathIgnored(file) || !filter(id)) {
+      if (!filter(id) || cli.isPathIgnored(file)) {
         return null;
       }

Use npm i patch-package to hotpatch it for any version see: https://www.npmjs.com/package/patch-package

chuckcarpenter commented 4 years ago

looks like that fix has been open for a bit, https://github.com/TrySound/rollup-plugin-eslint/pull/38

GreenImp commented 4 years ago

I'm having the same issue, and I can verify that the change @pkit suggested, and pull request #38 fixes the issue for me.

@TrySound is it likely that this will get merged soon?

tschoartschi commented 4 years ago

@pkit thanks for the trick with patch-package now our build works again šŸŽ‰ but I think that's a nasty hack šŸ˜† I hope @TrySound can have a look on this especially because there is already a PR

robinloeffel commented 4 years ago

I'd been waiting for feedback, too, but eventually grew impatient. So I've created a new package! Feel free to check it out at https://github.com/robinloeffel/rollup-plugin-eslint! :)

RobbieTheWagner commented 4 years ago

It does seem @TrySound does not have the time to maintain this repo, so forking may be our best option.