jsx-eslint / eslint-plugin-jsx-a11y

Static AST checker for a11y rules on JSX elements.
MIT License
3.38k stars 637 forks source link

remove object.assign #963

Closed dulmandakh closed 10 months ago

dulmandakh commented 10 months ago

I found that Object.assign is already supported in Node.js 4.0.0, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign. So removed object.assign package and opted to Object.assign. Also I had to turn eslint rule because spread operator it not supported on Node.js 4.

I would like to propose to raise Node.js version requirement, maybe up to 16.13.0, then remove polyfills to reduce install size. I would like to help with this.

Here are polyfills and Node.js versions what supports these features.

Dependency Node.js version
array-includes 6.0.0
object.entries 7.0.0
array.prototype.flatmap 11.0.0
object.fromentries 12.0.0
hasown 16.9.0
codecov[bot] commented 10 months ago

Codecov Report

Merging #963 (841ece5) into main (1635dcc) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #963   +/-   ##
=======================================
  Coverage   99.01%   99.01%           
=======================================
  Files         105      105           
  Lines        1628     1628           
  Branches      578      578           
=======================================
  Hits         1612     1612           
  Misses         16       16           
ljharb commented 10 months ago

I will never be raising the node version requirement.

Object.assign has bugs in node 4, so we can't drop the package.