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

upgrade to eslint@8 #2583

Closed
trentm opened this issue Feb 22, 2022 · 3 comments · Fixed by #3409
Closed

upgrade to eslint@8 #2583

trentm opened this issue Feb 22, 2022 · 3 comments · Fixed by #3409
Labels
agent-nodejs Make available for APM Agents project planning.

Comments

@trentm
Copy link
Member

trentm commented Feb 22, 2022

If after we switch to eslint (#2579) is in, we should upgrade from the current eslint@6 to eslint@7. https://eslint.org/docs/user-guide/migrating-to-7.0.0

  • drops node v8 support
  • Deal with "no-var" rule. A quick run with the update to eslint-config-standard@16 results in ~2000 of these. I'm not sure if --fix will automatically fix these.
  167:7   warning  Unexpected var, use let or const instead  no-var

Note: Why not eslint@8 yet? The current latest is eslint@8, but eslint-config-standard and standard aren't ready for eslint@8 until eslint-config-standard@17 (https://github.com/standard/standard/blob/master/CHANGELOG.md#1700-0---2022-01-31), which is current in pre-release.

Update (2022-07-14): eslint-config-standard@17 is released now, so I believe moving to eslint@8 would be possible now. See #2820 and #2817

@github-actions github-actions bot added the agent-nodejs Make available for APM Agents project planning. label Feb 22, 2022
@trentm
Copy link
Member Author

trentm commented Feb 22, 2022

The starter diff I had for this:

diff --git a/package.json b/package.json
index 4ddb8e38..e760f5f5 100644
--- a/package.json
+++ b/package.json
@@ -139,10 +139,10 @@
     "dashdash": "^2.0.0",
     "dependency-check": "^4.1.0",
     "elasticsearch": "^16.5.0",
-    "eslint": "^6.8.0",
-    "eslint-config-standard": "^14.1.1",
+    "eslint": "^7.32.0",
+    "eslint-config-standard": "^16.0.3",
     "eslint-plugin-import": "^2.25.4",
-    "eslint-plugin-node": "^10.0.0",
+    "eslint-plugin-node": "^11.1.0",
     "eslint-plugin-promise": "^4.3.1",
     "eslint-plugin-standard": "^4.1.0",
     "express": "^4.17.1",

@trentm
Copy link
Member Author

trentm commented Jun 27, 2022

Consider eslint@8 now.

@trentm
Copy link
Member Author

trentm commented Sep 26, 2022

Note all these dependabot PRs, many of which have been deferred to do as part of this update: https://github.com/elastic/apm-agent-nodejs/issues?q=label%3Adependencies+eslint+in%3Atitle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-nodejs Make available for APM Agents project planning.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant