Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inheriting from other config settings #6

Open
vincentbriglia opened this issue Nov 28, 2019 · 1 comment
Open

inheriting from other config settings #6

vincentbriglia opened this issue Nov 28, 2019 · 1 comment

Comments

@vincentbriglia
Copy link

this is not an issue that can be fixed, but perhaps documented instead.

rules and settings have a different way of merging,

see way of merging for settings here: https://github.com/eslint/eslint/blob/v6.4.0/lib/cli-engine/config-array/config-array.js#L238-L273

see mergeWithoutOverwrite(config.settings, element.settings);

this means that if you've defined json/json-with-comments-files: [ '**/tsconfig.json', '.vscode/**' ] in one config, inherit from that config and want to omit the json/json-with-comments-files setting, you can't just do json/json-with-comments-files: [] - you have to add the same amount of elements in the array to 'get rid of the globs' ...

this can get a little annoying, so I think it would be nice if this could be documented, just as a reminder, that settings aren't easily overwritten

@kuceb
Copy link
Owner

kuceb commented Dec 2, 2019

@vincentbriglia wow, did not know that. PR to the readme or changes to source to accommodate your use case is welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants