Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the lowest supported node version? #1669

Closed
jimmywarting opened this issue Jan 18, 2022 · 3 comments
Closed

update the lowest supported node version? #1669

jimmywarting opened this issue Jan 18, 2022 · 3 comments

Comments

@jimmywarting
Copy link
Contributor

The linting and newest version of xo on a old codebase is a little... meh
it clearly have fallen behind in the amount of things it yields about.

One of the thing i settled on was the features we use, and the targeted node.js version.

npm run lint | grep "the configured version range is >=6.4.0 <13 || >=14."
  ✖    74:5   The omission of catch binding is not supported until Node.js 10.0.0. The configured version range is >=6.4.0 <13 || >=14.                                        node/no-unsupported-features/es-syntax
  ✖    78:5   The omission of catch binding is not supported until Node.js 10.0.0. The configured version range is >=6.4.0 <13 || >=14.                                        node/no-unsupported-features/es-syntax
  ✖    82:5   The omission of catch binding is not supported until Node.js 10.0.0. The configured version range is >=6.4.0 <13 || >=14.                                        node/no-unsupported-features/es-syntax
  ✖    86:5   The omission of catch binding is not supported until Node.js 10.0.0. The configured version range is >=6.4.0 <13 || >=14.                                        node/no-unsupported-features/es-syntax
  ✖   792:7   The omission of catch binding is not supported until Node.js 10.0.0. The configured version range is >=6.4.0 <13 || >=14.                                        node/no-unsupported-features/es-syntax
  ✖   827:7   The omission of catch binding is not supported until Node.js 10.0.0. The configured version range is >=6.4.0 <13 || >=14.                                        node/no-unsupported-features/es-syntax
  ✖    11:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    30:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    56:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    13:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖   143:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    11:10  The http2 is not supported until Node.js 10.10.0 (backported: ^8.13.0). The configured version range is >=6.4.0 <13 || >=14.                                     node/no-unsupported-features/node-builtins
  ✖    76:9   The omission of catch binding is not supported until Node.js 10.0.0. The configured version range is >=6.4.0 <13 || >=14.                                        node/no-unsupported-features/es-syntax
  ✖    13:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    70:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    30:3   The http2 is not supported until Node.js 10.10.0 (backported: ^8.13.0). The configured version range is >=6.4.0 <13 || >=14.                                     node/no-unsupported-features/node-builtins
  ✖    31:3   The omission of catch binding is not supported until Node.js 10.0.0. The configured version range is >=6.4.0 <13 || >=14.                                        node/no-unsupported-features/es-syntax
  ✖    12:53  The http2 is not supported until Node.js 10.10.0 (backported: ^8.13.0). The configured version range is >=6.4.0 <13 || >=14.                                     node/no-unsupported-features/node-builtins
  ✖    52:28  Rest/spread properties are not supported until Node.js 8.3.0. The configured version range is >=6.4.0 <13 || >=14.                                               node/no-unsupported-features/es-syntax
  ✖    10:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    12:10  The http2 is not supported until Node.js 10.10.0 (backported: ^8.13.0). The configured version range is >=6.4.0 <13 || >=14.                                     node/no-unsupported-features/node-builtins
  ✖    11:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    12:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    14:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    35:11  The http2 is not supported until Node.js 10.10.0 (backported: ^8.13.0). The configured version range is >=6.4.0 <13 || >=14.                                     node/no-unsupported-features/node-builtins
  ✖    16:10  The http2 is not supported until Node.js 10.10.0 (backported: ^8.13.0). The configured version range is >=6.4.0 <13 || >=14.                                     node/no-unsupported-features/node-builtins
  ✖    18:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    17:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    12:10  The http2 is not supported until Node.js 10.10.0 (backported: ^8.13.0). The configured version range is >=6.4.0 <13 || >=14.                                     node/no-unsupported-features/node-builtins
  ✖    13:10  The http2 is not supported until Node.js 10.10.0 (backported: ^8.13.0). The configured version range is >=6.4.0 <13 || >=14.                                     node/no-unsupported-features/node-builtins
  ✖    11:10  The http2 is not supported until Node.js 10.10.0 (backported: ^8.13.0). The configured version range is >=6.4.0 <13 || >=14.                                     node/no-unsupported-features/node-builtins
  ✖    11:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    22:18  The http2 is not supported until Node.js 10.10.0 (backported: ^8.13.0). The configured version range is >=6.4.0 <13 || >=14.                                     node/no-unsupported-features/node-builtins
  ✖    10:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    11:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    10:10  The http2 is not supported until Node.js 10.10.0 (backported: ^8.13.0). The configured version range is >=6.4.0 <13 || >=14.                                     node/no-unsupported-features/node-builtins
  ✖    10:10  The http2 is not supported until Node.js 10.10.0 (backported: ^8.13.0). The configured version range is >=6.4.0 <13 || >=14.                                     node/no-unsupported-features/node-builtins
  ✖    13:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖     9:1   Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    12:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    10:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    15:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    10:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    10:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖     6:17  The http2 is not supported until Node.js 10.10.0 (backported: ^8.13.0). The configured version range is >=6.4.0 <13 || >=14.                                     node/no-unsupported-features/node-builtins
  ✖    10:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖     9:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    11:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    11:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    10:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    10:10  Async functions are not supported until Node.js 7.6.0. The configured version range is >=6.4.0 <13 || >=14.                                                      node/no-unsupported-features/es-syntax
  ✖    67:5   The omission of catch binding is not supported until Node.js 10.0.0. The configured version range is >=6.4.0 <13 || >=14.                                        node/no-unsupported-features/es-syntax

what do you say about setting it to something more modern like >=12 ?
v12 is ending it's long time support pretty soon now in April

@niftylettuce
Copy link
Collaborator

There's no reason why we shouldn't support older versions especially with the help of Babel.

I turned most of those lint errors to warnings via rules override, and for the ones you shared that are node/no-unsupported-features/es-syntax, it is due to the linter not respecting engines having multiple versions specified (obviously it's a bug).

Ref: mysticatea/eslint-plugin-node#315

@jimmywarting
Copy link
Contributor Author

couldn't we disabled the node/no-unsupported-features/es-syntax rule then if babel takes care of compiling any new es feature we may use then?

@niftylettuce
Copy link
Collaborator

I tried to disable that rule but it didn't work for me when I tried. Not sure if you want to go down that rabbit hole.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants