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

chore: add eslint-plugin-node #221

Merged
merged 2 commits into from
Sep 20, 2018
Merged

chore: add eslint-plugin-node #221

merged 2 commits into from
Sep 20, 2018

Conversation

SimenB
Copy link
Collaborator

@SimenB SimenB commented Sep 20, 2018

This will warn us against unsupported features without waiting for CI
to run

Also upgrade all dated dependencies

Motivation is if we use e.g. Object.entries, we normally have to wait for CI to fail. Now we'll get a linting error in our IDE or precommit:

  31:4  error  The 'Object.entries' is not supported until Node.js 7.0.0. The configured version range is '>=6.1'  node/no-unsupported-features/es-builtins

This will warn us against unsupported features without waiting for CI
to run

Also upgrade all dated dependencies
@SimenB SimenB requested a review from siimon September 20, 2018 14:04
lib/summary.js Outdated
@@ -13,7 +13,7 @@ const validateLabels = require('./validation').validateLabel;
const validateMetricName = require('./validation').validateMetricName;
const validateLabelNames = require('./validation').validateLabelName;
const TDigest = require('tdigest').TDigest;
const isObject = require('util').isObject;
const isObject = require('./util').isObject;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably a typo, but isObject from core util module is deprecated

@@ -9,7 +9,7 @@
"index.d.ts"
],
"engines": {
"node": ">=6"
"node": ">=6.1"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6.1 for cpuUsage. Probably OK to sneak in here, it's years old by this point

@SimenB
Copy link
Collaborator Author

SimenB commented Sep 20, 2018

The second commit uses object destructuring instead of importing the same module multiple times (hitting the require cache, so just verbosity, no perf hit).

Recommended to review individual commits

Copy link
Collaborator

@zbjornson zbjornson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the destructuring cleanup. 👍

@SimenB SimenB merged commit 24cf59a into master Sep 20, 2018
@SimenB SimenB deleted the eslint-node branch September 20, 2018 16:36
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.

2 participants