Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Changed the order files get checked for ignoring #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

N0NamedGuy
Copy link

This allows the plugin to have greater control on what ESLint gets to see and not.

For more information see #37

This allows the plugin to have greater control on what ESLint gets to see and not.
Changed the order files get checked for ignoring
@RobbieTheWagner
Copy link

@TrySound can we please merge this, so this plugin is not broken?

@atti187
Copy link

atti187 commented Sep 10, 2020

Same thing goes for https://github.com/airbnb/react-dates which ships with an .eslintrc extending eslint-config-airbnb (which is a dev dependency of theirs). This results in node_modules\react-dates\initialize.js Error: Failed to load config "airbnb" to extend from..

My take is that if the exclude pattern includes node_modules/**, it shouldn't even bother to check for further config related to the file in question.

As a workaround, I monkey-patched the plugin;

const { createFilter } = require('rollup-pluginutils');
const eslintPlugin = (options = {}) => {
    const filter = createFilter(options.include, options.exclude || /node_modules/);

    const original = eslint(options);
    const originalTransform = original.transform;

    original.transform = (code, id) => {
        if (!filter(id)) {
            return null;
        } else {
            return originalTransform(code, id);
        }
    };

    return original;
};

@RobbieTheWagner
Copy link

@TrySound are you interested in maintaining this anymore? If not, could you transfer it or should we fork it? This has been open almost a year.

@TrySound
Copy link
Owner

Feel free to migrate it to https://github.com/rollup/plugins monorepo. I will add deprecation to this package then.

@RobbieTheWagner
Copy link

@TrySound I wouldn't know how to do that. I don't do monorepos. If someone can do that, please feel free, but otherwise all I know to do is fork and release a separate package.

@atti187
Copy link

atti187 commented Sep 15, 2020

@TrySound I've made a PR at rollup/plugins#575. Please have a look...

shellscape added a commit to rollup/plugins that referenced this pull request Oct 26, 2020
* Initial

* Add documentation

* Add npm files filter

* 1.0.0

* Clear dist folder

* Fix documentation

* 1.0.1

* Fix build

* 1.0.2

* Upgrade eslint

* 2.0.0

* Tidy up

* Return a name

* 2.0.2

* Upgrade to eslint 3

* Add buble back

* v3.0.0

* Add lockfile

* Move to jest

* Build with babel

* Upgrade dependencies

* Add throwOnError and throwOnWarnings options. Remove throwError option

* 4.0.0

* Document config file usage

Adds documentation on how to use a config file at project root, mentioned in TrySound/rollup-plugin-eslint#20.

* Update config file documentation

* Update README.md

* Remove node4 support and remove babel

* Add prettier

* Change api to named export

* Upgrade eslint

* Clean up gitignore

* 5.0.0

* Fix tests warning

* PR for optional config string

PR to allow a string to be passed for specific config files; primarily to allow different Rollup configs to have different linting rules.

* Fixed bug where .eslintrc files were still being used

* v5.1.0

* feat: options.fix can change files

* feat: add test case

* Upgrade dependencies and tests

* v6.0.0

* Fix travis

* Upgrade to ESLint 6.0.0

* v7.0.0

* Preparing move to rollup/plugins

* feat(eslint): fixed TrySound/rollup-plugin-eslint#38

* chore: update after review

* chore: lint readme

Co-authored-by: Bogdan Chadkin <trysound@yandex.ru>
Co-authored-by: Mark Brouch <mark.brouch@gmail.com>
Co-authored-by: Levi Roberts <bugs181@gmail.com>
Co-authored-by: frankieshen <frankieshen@tencent.com>
Co-authored-by: Shenfq <shenfq95@foxmail.com>
Co-authored-by: Stéphane Goetz <stephane.goetz@swissquote.ch>
Co-authored-by: shellscape <andrew@shellscape.org>
vasttiankliu added a commit to vasttiankliu/plugins that referenced this pull request Nov 17, 2022
* Initial

* Add documentation

* Add npm files filter

* 1.0.0

* Clear dist folder

* Fix documentation

* 1.0.1

* Fix build

* 1.0.2

* Upgrade eslint

* 2.0.0

* Tidy up

* Return a name

* 2.0.2

* Upgrade to eslint 3

* Add buble back

* v3.0.0

* Add lockfile

* Move to jest

* Build with babel

* Upgrade dependencies

* Add throwOnError and throwOnWarnings options. Remove throwError option

* 4.0.0

* Document config file usage

Adds documentation on how to use a config file at project root, mentioned in TrySound/rollup-plugin-eslint#20.

* Update config file documentation

* Update README.md

* Remove node4 support and remove babel

* Add prettier

* Change api to named export

* Upgrade eslint

* Clean up gitignore

* 5.0.0

* Fix tests warning

* PR for optional config string

PR to allow a string to be passed for specific config files; primarily to allow different Rollup configs to have different linting rules.

* Fixed bug where .eslintrc files were still being used

* v5.1.0

* feat: options.fix can change files

* feat: add test case

* Upgrade dependencies and tests

* v6.0.0

* Fix travis

* Upgrade to ESLint 6.0.0

* v7.0.0

* Preparing move to rollup/plugins

* feat(eslint): fixed TrySound/rollup-plugin-eslint#38

* chore: update after review

* chore: lint readme

Co-authored-by: Bogdan Chadkin <trysound@yandex.ru>
Co-authored-by: Mark Brouch <mark.brouch@gmail.com>
Co-authored-by: Levi Roberts <bugs181@gmail.com>
Co-authored-by: frankieshen <frankieshen@tencent.com>
Co-authored-by: Shenfq <shenfq95@foxmail.com>
Co-authored-by: Stéphane Goetz <stephane.goetz@swissquote.ch>
Co-authored-by: shellscape <andrew@shellscape.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants