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

fix: do not use the logicial assignment operator #1399

Closed
wants to merge 3 commits into from

Conversation

n1ru4l
Copy link
Contributor

@n1ru4l n1ru4l commented May 2, 2022

Alternative solution for #1398

See #1318

The package.json of this project lists "node": ">=12.18" in the engines.

Logical Assignment is only supported since Node.js 15.14.

To me, it seems like this usage here got added unexpectedly.

We would love to prevent such things in the future by setting up a GitHub action that runs eslint with the following rule: https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unsupported-features/es-syntax.md

Would that be something you are interested in?

@mcollina
Copy link
Member

mcollina commented May 2, 2022

I don't understand why this is needed. That code is not even loaded in Node < 16:

if (nodeMajor > 16 || (nodeMajor === 16 && nodeMinor >= 5)) {
.

@n1ru4l
Copy link
Contributor Author

n1ru4l commented May 2, 2022

@mcollina As mentioned in #1398 (comment), this is a misunderstanding! Sorry for the inconvenience.

@n1ru4l n1ru4l closed this May 2, 2022
@n1ru4l n1ru4l deleted the patch-2 branch May 2, 2022 19:39
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

Successfully merging this pull request may close these issues.

None yet

4 participants