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

disable merging of eslintrc browserslist config #411

Open
ghost opened this issue Oct 29, 2020 · 2 comments · May be fixed by #585
Open

disable merging of eslintrc browserslist config #411

ghost opened this issue Oct 29, 2020 · 2 comments · May be fixed by #585

Comments

@ghost
Copy link

ghost commented Oct 29, 2020

In the wiki there an example of an inline eslint config:
https://github.com/amilajack/eslint-plugin-compat/wiki/Advanced-Browserslist-Configs#inline-eslint-config

I thought this would override a browserslist config defined in package.json file, but that wasn't working, so i took a look in the code and saw the configs are merged:
https://github.com/amilajack/eslint-plugin-compat/blob/master/src/helpers.ts#L191

I have a usecase where i want to use a different browserslist config for eslint-compat-plugin, and the global one for everything else:

"compat/compat": ["error", "supports es6-module"],

I would propose following changes:

  1. add an additional description in the wiki that mentions the merging of the configs
  2. add an additional option to override the config and add an example in the wiki

What do yout think?

@edg2s
Copy link

edg2s commented Dec 8, 2020

I see that in #339 a comment was added stating “Eslint target config will be deprecated in 4.0.0”.

I think this is a useful feature as it allows different browser targets on a per folder basis. For example you may have a folder for a mobile site that has different requirements to your desktop site.

It also allows browser lists to be bundled with shared config.

@lopis
Copy link

lopis commented Sep 7, 2023

I have the same use case for this functionality. Our monorepo contains all sorts of apps including web apps and node services. I haven't found a way to disable checking for browser compatibility of our code in the node services. For now I'm disabling compat/compat altogether in the node services, which is not ideal.

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

Successfully merging a pull request may close this issue.

2 participants