Closed lgdevlop closed 1 year ago
That's an ES6/ES2015 feature, so isn't checked by this plugin to begin with (see list of ES versions in the readme).
Please close the issue unless you'r experiencing a problem
Thank you for the quick response.
According to the link to the Babel plugin I provided above and the links I include below, including an image of the ecmascript-compat/compat
plugin, the feature in question is ES2018
, as we are referring to Object rest/spread
. You are correct in stating that rest
and spread
are ES2015
, but Object rest/spread
is ES2018
. I want to turn off linting for Object rest/spread using the polyfill option of the ecmascript-compat
plugin.
Thank you for the excellent work!
Ah thanks, I didn't remember that spread didn't all arrive in the same version.
Given you're using a transpiler, what's your need for using es-compat on the source code? The envisaged scenarios are described under Rationale in the readme. If you have a new scenario, do let me know.
I'm using it so that ESLint can alert me when using features not supported by the environments configured in Browserlist.
With this, I check the tooling to see if it supports the functionality by transpiling or polyfilling it or if I need to adjust it using a Babel plugin.
These issues typically arise with older tooling, so I configure ESLint with this plugin, Browserlist, and look for notifications from the plugin. This way, I prioritize updating the tooling if necessary
In that case, I suggest you run es-compat against the output of Babel rather than the input.
I see. OK, I will close this issue.
I think the readme should provide an better explanation of this, so I've created #85
Can we add the Object rest/spread option to the polyfill options of this library since we can use Babel to transpile the unsupported syntax? Below is a link to the Babel plugin that performs the transformation.
https://babeljs.io/docs/babel-plugin-transform-object-rest-spread