You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If your code (or library code) is using a feature support test conditional statement before using a feature, then you still get an error reported by this plugin. It doesn't know your intent when doing such checks.
The current workaround is to configure the options to say you have a polyfill for that feature, even if you don't. This is dangerous as it will ignore all usages of that feature, including those without a feature test guard. This workaround isn't an option for non-polyfillable features namely BigInt and Atomics, as raised in #70.
It might be possible to implement something here to guess if an expression looks like a feature test. We have the AST node there. But really eslint-plugin-es-x would be the ideal place for this, as this problem is not unique to es-compat, and it's the root of where the problem arises.
The text was updated successfully, but these errors were encountered:
A smaller scope solution could allow users to specify code strings to ignore as a rule option. We might be able to think of many possible ways of doing feature tests, but not all.
If your code (or library code) is using a feature support test conditional statement before using a feature, then you still get an error reported by this plugin. It doesn't know your intent when doing such checks.
The current workaround is to configure the options to say you have a polyfill for that feature, even if you don't. This is dangerous as it will ignore all usages of that feature, including those without a feature test guard. This workaround isn't an option for non-polyfillable features namely BigInt and Atomics, as raised in #70.
It's the responsibility of https://github.com/eslint-community/eslint-plugin-es-x to do the detection. es-compat simply passes through all reports raised by it.
It might be possible to implement something here to guess if an expression looks like a feature test. We have the AST node there. But really eslint-plugin-es-x would be the ideal place for this, as this problem is not unique to es-compat, and it's the root of where the problem arises.
The text was updated successfully, but these errors were encountered: