dbader / node-datadog-metrics

Buffered metrics reporting via the DataDog HTTP API
https://dbader.org/blog/monitoring-your-nodejs-app-with-datadog
MIT License
142 stars 58 forks source link

Switch to ESLint for all code linting #102

Closed Mr0grog closed 2 years ago

Mr0grog commented 2 years ago

This switches from JSHint and JSCS to ESLint. My primary goal here was to solve several security vulnerabilities, but I also discovered some places previous rules were not being applied (!). This attempts to follow the same settings the project previously had for JSCS and JSHint.

Fixes #85 and also fixes all security warnings when running npm install šŸŽ‰

~Note: this is a draft because ESLint picks up on some things the previous linter was missing, and I want to see the errors get logged nicely in CI before fixing them.~ (Edit: this is done.)

Mr0grog commented 2 years ago

FYI, you can see the errors listed out in the CI logs, but since we are on GitHub actions, itā€™ll also list the errors right in the ā€œfiles changedā€ tab of the PR. šŸ˜„

Screen Shot 2022-09-28 at 12 41 41 PM

(Usually these will be on lines that were changed, but just not on this PR since itā€™s finding issues that werenā€™t previously enforced correctly.)

Mr0grog commented 2 years ago

Iā€™m going ahead and merging this since itā€™s been sitting for a while, seems safe, and should be particularly helpful with future PRs.