robatwilliams / es-compat

Check JavaScript code compatibility with target runtime environments
MIT License
65 stars 13 forks source link

Cannot read property 'exponentiation' of undefined #22

Closed dobesv closed 3 years ago

dobesv commented 3 years ago

Getting this error when trying to run the tool from the command line

$ check-es-compat dist/web/*.js
/home/ubuntu/app/node_modules/check-es-compat/node_modules/eslint/lib/cli-engine/config-array/config-array.js:180
                throw sourceValue.error;
                ^

TypeError: Failed to load plugin 'ecmascript-compat' declared in 'CLIOptions': Cannot read property 'exponentiation' of undefined
    at Object.<anonymous> (/home/ubuntu/app/node_modules/eslint-plugin-ecmascript-compat/lib/features/es2016.js:18:65)

Seems like something is not defined in the compatibility data.

dobesv commented 3 years ago

Commenting out that rule allows me to proceed, though.

robatwilliams commented 3 years ago

MDN browser compat data made a breaking change to the structure - https://github.com/mdn/browser-compat-data/pull/6246

They announced it in release notes but are not following semver - https://github.com/mdn/browser-compat-data/releases/tag/v1.0.25

robatwilliams commented 3 years ago

I'm not making the version string fixed, as I think the benefit of latest compat data outweighs the risk of future breaking changes.

robatwilliams commented 3 years ago

Released https://github.com/robatwilliams/es-compat/releases/tag/v1.1.1