javascript icon indicating copy to clipboard operation
javascript copied to clipboard

airbnb-base/legacy config incompatible with ES5

Open rivajunior opened this issue 4 years ago • 2 comments

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),
}

rivajunior avatar Dec 28 '21 22:12 rivajunior

Thanks! I’ll fix this shortly.

ljharb avatar Dec 29 '21 00:12 ljharb

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

ljharb avatar Dec 29 '21 00:12 ljharb