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

airbnb-base/legacy config incompatible with ES5 #2533

Open
rivajunior opened this issue Dec 28, 2021 · 2 comments
Open

airbnb-base/legacy config incompatible with ES5 #2533

rivajunior opened this issue Dec 28, 2021 · 2 comments

Comments

@rivajunior
Copy link

The airbnb-base/legacy configuration is inheriting no-restricted-globals from variables configuration file. But this rule is set to enforce the use of Number.isFinite and Number.isNaN witch are ES6 features and not compatible with ES5 codebase.

{
    'no-restricted-globals': [
      'error',
      {
        name: 'isFinite',
        message:
          'Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite',
      },
      {
        name: 'isNaN',
        message:
          'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan',
      },
    ].concat(confusingBrowserGlobals),
}
@ljharb
Copy link
Collaborator

ljharb commented Dec 29, 2021

Thanks! I’ll fix this shortly.

@ljharb
Copy link
Collaborator

ljharb commented Dec 29, 2021

Although - the legacy config still requires you use all available polyfills, so I’m not sure there’s something to fix.

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