-
Notifications
You must be signed in to change notification settings - Fork 323
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
Enable recommended rules for eslint-plugin-n #5216
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,7 @@ dev,sinon,BSD-3-Clause,Copyright 2010-2017 Christian Johansen | |
dev,sinon-chai,WTFPL and BSD-2-Clause,Copyright 2004 Sam Hocevar 2012–2017 Domenic Denicola | ||
dev,tap,ISC,Copyright 2011-2022 Isaac Z. Schlueter and Contributors | ||
dev,tiktoken,MIT,Copyright (c) 2022 OpenAI, Shantanu Jain | ||
dev,workerpool,Apache license 2.0,Copyright (C) 2014-2024 Jos de Jong [email protected] | ||
dev,yaml,ISC,Copyright Eemeli Aro <[email protected]> | ||
file,aws-lambda-nodejs-runtime-interface-client,Apache 2.0,Copyright 2019 Amazon.com Inc. or its affiliates. All Rights Reserved. | ||
file,profile.proto,Apache license 2.0,Copyright 2016 Google Inc. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
'use strict' | ||
|
||
// TODO: It shouldn't be necessary to disable n/no-unpublished-require - Research | ||
// eslint-disable-next-line n/no-unpublished-require | ||
module.exports = require('./packages/datadog-esbuild/index.js') |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
'use strict' | ||
|
||
// TODO: It shouldn't be necessary to disable n/no-unpublished-require - Research | ||
// eslint-disable-next-line n/no-unpublished-require | ||
Comment on lines
+3
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will be fixed in #5320 |
||
module.exports = require('./packages/dd-trace') |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
/* eslint-disable no-var */ | ||
|
||
// TODO: It shouldn't be necessary to disable n/no-unpublished-require - Research | ||
// eslint-disable-next-line n/no-unpublished-require | ||
Comment on lines
+5
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will be fixed in #5320 |
||
var guard = require('./packages/dd-trace/src/guardrails') | ||
|
||
module.exports = guard(function () { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,6 +159,7 @@ | |
"sinon-chai": "^3.7.0", | ||
"tap": "^16.3.7", | ||
"tiktoken": "^1.0.15", | ||
"workerpool": "^9.2.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our code worked previously because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @juan-fernandez The |
||
"yaml": "^2.5.0" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/* eslint n/no-unsupported-features/node-builtins: ['error', { ignores: ['fetch'] }] */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The docs are a little confusing. It seems to suggest that the engines field of package.json is used to check node compat (in our case v18). But those same docs also seem to suggest this plugin is stuck in the world of 13.2.0? Overall it seems bad that we need to add such a line to the top of files to use a built in global. Like we'll make a change, push it, CI fails, add the rule, push again. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree it's easy to be confused. We are not using There is a few places we use features newer than v18.0.0, but we feature detect, e.g. There's also a few places in tests where we need to add these ESLint comments. And you could argue we might just turn this plugin off in tests 🤷 Or alternatively configure it to be the latest v18.x in tests instead of v18.0.0 as it is in the rest of our published source. That way we could get a rid of a few of these comments for those locations. Do you think that would be worth while, is it good enough as it is? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess limiting the linter for everything unrelated to tests would be good |
||
|
||
import 'dd-trace/init.js' | ||
import getPort from 'get-port' | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be fixed in #5320