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

quic: fix error message on invalid connection ID #1

Open
wants to merge 4,854 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
4854 commits
Select commit Hold shift + click to select a range
3bd87e1
deps: update undici to 5.1.1
targos May 2, 2022
e86a638
src: add initial shadow realm support
legendecas May 2, 2022
0fc455a
test: reduce impact of flaky HTTP server tests
tniessen May 2, 2022
73a8a0e
doc: clarify some default values in `fs.md`
LiviaMedeiros May 2, 2022
75dbb86
crypto: clean up parameter validation in HKDF
tniessen May 2, 2022
52ba02e
doc: add section regarding property definition in `primordials.md`
aduh95 May 2, 2022
2b41f59
assert: make `assert.fail` less affected by prototype tampering
aduh95 May 2, 2022
acffd3d
bootstrap: fix wasm_web_api external reference registration
joyeecheung May 2, 2022
916a13a
http2: compat support for array headers
y1d7ng May 2, 2022
6be94c9
test: add test for position validation in fs.read() and fs.readSync()
LiviaMedeiros May 2, 2022
57678e5
fs: add `read(buffer[, options])` versions
LiviaMedeiros May 2, 2022
961967c
doc: add additional step to security release process
mhdawson Apr 29, 2022
ce29d28
src: fix memory leak for v8.serialize
liuxingbaoyu May 2, 2022
f6f95bf
doc: fix examples in cluster.md
y1d7ng May 2, 2022
2be5966
doc: fix errors in Web Streams doc
y1d7ng May 3, 2022
6ebe5a4
2022-05-03, Version 18.1.0 (Current)
targos May 2, 2022
f714a0f
http: added connection closing methods
ShogunPanda Apr 28, 2022
c3aa86d
test: use consistent timeouts
ShogunPanda Apr 28, 2022
d859e9e
esm: add chaining to loaders
JakobJingleheimer May 4, 2022
755721a
2022-05-04, Version 14.19.2 'Fermium' (LTS)
juanarbol May 1, 2022
2454aa0
test: fix test-crypto-fips.js under shared OpenSSL
May 2, 2022
a5b8730
crypto: adjust minimum length in generateKey('hmac', ...)
LiviaMedeiros May 4, 2022
7ff2170
src,crypto: remove uses of AllocatedBuffer from crypto_rsa.cc
RaisinTen May 4, 2022
ffa1f84
deps: upgrade npm to 8.9.0
npm-robot May 5, 2022
f7d658a
bootstrap: use a context snapshotted with primordials in workers
joyeecheung May 5, 2022
a3ff4bf
url: revert "validate ipv4 part length"
aduh95 May 5, 2022
277353c
test: improve `lib/internal/webstreams/readablestream.js` coverage
fossamagna May 5, 2022
a571a3f
test: use`mustSucceed` instead of `mustCall` with `assert.ifError`
fossamagna May 5, 2022
5ef83ba
test: validate webstream encoder/decoder inspector
kuriyosh May 5, 2022
edcc542
test: improve observable ICU behaviour coverage
LiviaMedeiros May 5, 2022
30388fc
bootstrap: stop delaying instantiation of maps in per-context scripts
RaisinTen May 5, 2022
deb713e
test: rename handlewrap.hasref tests
daeyeon May 5, 2022
55079bb
lib,test: enable wasm/webapi/empty-body WPT
tniessen May 5, 2022
cf5afb7
meta: move one or more collaborators to emeritus
nodejs-github-bot May 2, 2022
5e9274a
build: fix indeterminacy of icu_locales value
3ap May 6, 2022
74af116
doc: use serial comma in cluster docs
tniessen May 6, 2022
1834478
doc: improve commit message example for releases
juanarbol May 6, 2022
1af7054
build: fix various shared library build issues
lux01 Feb 4, 2022
187b99b
assert: fix CallTracker wraps the function causes the length to be lost
y1d7ng May 6, 2022
0fc1cf4
worker: fix stream racing with terminate
airtable-keyhanvakil May 6, 2022
2dbf169
src: always signal V8 for intercepted properties
targos May 6, 2022
3bc23f5
src: remove unnecessary comment
cola119 May 6, 2022
58d8d69
doc: use serial comma in tls docs
tniessen May 8, 2022
fd7be07
meta: update AUTHORS
nodejs-github-bot May 8, 2022
5a217a2
tools: update lint-md-dependencies
nodejs-github-bot May 8, 2022
be1ca70
tools: refactor lint-sh.js to esm module
F3n67u May 8, 2022
8b8da00
tools: update eslint to 8.15.0
nodejs-github-bot May 8, 2022
f890ef5
debugger: fix inconsistent inspector output of exec new Map()
cola119 May 8, 2022
e8e6d45
lib: move WebAssembly Web API into separate file
tniessen May 8, 2022
7e6c055
Revert "deps: add template for generated headers"
danbev May 5, 2022
306c7a5
deps: regenerate OpenSSL archs files
danbev May 5, 2022
0950da1
doc: rename N-API to Node-API in test/README.md
daeyeon May 9, 2022
0b281dd
doc: add release key for Juan Arboleda
juanarbol May 9, 2022
721fd01
doc: add the preferred name for @himself65
himself65 May 9, 2022
ec1c616
doc: use serial comma in http docs
tniessen May 9, 2022
7649989
wasm: add missing init reported by coverity
mhdawson Apr 28, 2022
d37e371
doc: add LiviaMedeiros to collaborators
LiviaMedeiros May 10, 2022
01408a5
doc: mark some node-api functions as experimental
NickNaso May 6, 2022
6b968fd
node-api: fix napi_get_all_property_names
vmoroz Apr 13, 2022
c7338c5
doc: add Rafael to the security steward for NearForm
mcollina May 4, 2022
761b87a
meta: update .mailmap for recent README name change
Trott May 9, 2022
d62e412
typings: fix `os.cpus` invalid return type
himself65 May 10, 2022
f095b19
doc: use consistent method symbol
ShogunPanda May 10, 2022
8e0f3ff
doc: use serial comma in buffer docs
tniessen May 11, 2022
d82eaf8
deps: upgrade openssl sources to quictls/openssl-3.0.3
RafaelGSS May 9, 2022
ea6ada1
deps: update archs files for quictls/openssl-3.0.3+quic
RafaelGSS May 9, 2022
321e249
doc: add detail for how to update llhttp
mhdawson May 9, 2022
c059921
deps: fix llhttp version number
mhdawson May 9, 2022
8b415e8
doc: add maintaining info for shared libary option
mhdawson Mar 29, 2022
4d1aad2
doc: remove git:// protocol, adjust nits in onboarding.md
LiviaMedeiros May 10, 2022
5e6f9c3
doc: use serial comma in util docs
tniessen May 12, 2022
78c8d2a
perf_hooks: add PerformanceResourceTiming
RafaelGSS Apr 10, 2022
f91dcc2
src: delete AllocatedBuffer
RaisinTen May 13, 2022
fb74474
node-api: explicitly set __cdecl for API functions
vmoroz Apr 18, 2022
556df3d
deps: remove opensslconf template headers
danbev May 10, 2022
8c800d7
build: disable windows-2022 temporarily
gengjiawen May 14, 2022
74cf01a
doc: use serial comma in modules docs
tniessen May 14, 2022
8a5657b
meta: add mailmap entry for ShogunPanda
ShogunPanda May 15, 2022
4a34ece
fs: remove unnecessary ?? operator
mroderick May 15, 2022
347000c
build: set ASAN workaround
richardlau May 13, 2022
d4cd7bd
deps: update undici to 5.2.0
nodejs-github-bot May 15, 2022
1fa5733
tools: update lint-md-dependencies to rollup@2.73.0
nodejs-github-bot May 15, 2022
e330b45
test: reduce flakiness of `test-fs-read-position-validation.mjs`
LiviaMedeiros May 15, 2022
82861e9
doc: use serial comma in events docs
tniessen May 15, 2022
d1d30d7
doc: use serial comma in fs docs
tniessen May 15, 2022
aa14ff9
test: fix dangerous .map in `test/parallel/test-http-set-trailers.js`
LiviaMedeiros May 13, 2022
7035186
src: replace TraceEventScope with sync events
legendecas May 5, 2022
5a3de82
doc: add strategic initiative for shadow realm
legendecas May 16, 2022
0ce4725
deps: patch V8 to 10.2.154.4
targos May 17, 2022
de0b6dc
src: move context snapshot index to SnapshotData
joyeecheung May 9, 2022
fbe1478
bootstrap: include code cache in the embedded snapshot
joyeecheung Nov 18, 2021
2bc1991
2022-05-17, Version 18.2.0 (Current)
RafaelGSS May 10, 2022
ace89d9
src: remove SecureContext::operator*
tniessen May 17, 2022
c100f9a
fs: make params in writing methods optional
LiviaMedeiros Apr 4, 2022
70069b2
2022-05-17, Version 14.19.3 'Fermium' (LTS)
richardlau May 12, 2022
895cc57
doc: use ASCII apostrophes consistently
tniessen May 17, 2022
fe027da
fs: add trailing commas
LiviaMedeiros May 17, 2022
06ba40a
src: fix static analysis warning and use smart ptr
tniessen May 18, 2022
06dd8c3
deps: upgrade npm to 8.10.0
May 11, 2022
89df354
doc: use serial comma in dns docs
tniessen May 19, 2022
efcf07f
meta: add mailmap entry for Morgan Roderick
lpinca May 19, 2022
b88045f
net: remoteAddress always undefined called before connected
y1d7ng May 8, 2022
448d5d1
worker: fix heap snapshot crash on exit
legendecas May 17, 2022
f7d55b9
meta: add mailmap entry for npm team
lpinca May 19, 2022
38f4810
doc: fix errors in Performance hooks doc
y1d7ng May 19, 2022
67843f8
doc: use serial comma in assert docs
tniessen May 20, 2022
fbee0a8
doc: add release key for RafaelGSS
RafaelGSS May 20, 2022
26846a0
meta: add mailmap entry for legendecas
legendecas May 20, 2022
5cb2579
tools: refactor update-authors.js to ESM
F3n67u May 21, 2022
5ba30d8
src: reuse GetServerName
tniessen May 21, 2022
ddd2a18
test: improve readline/emitKeypressEvents.js coverage
y1d7ng May 22, 2022
0a68e32
tools: update eslint to 8.16.0
nodejs-github-bot May 22, 2022
5d9ad80
doc: remove outdated footnote (Python 2 --> 3 for V8 tests)
DeeDeeG May 22, 2022
f7cd3f6
console: fix console.dir crash on a revoked proxy
daeyeon May 22, 2022
ae5a159
tools: update lint-md-dependencies to rollup@2.74.1
nodejs-github-bot May 22, 2022
def4bb7
doc: improve callback params for `fs.mkdir`
daeyeon May 22, 2022
40162db
doc: improved parallel specification
mawaregetsuka May 22, 2022
cbb92b0
debugger: throw a more useful error when the frame is missing
cola119 May 22, 2022
b4398df
tools: refactor build-addons.js to ESM
F3n67u May 22, 2022
419669c
lib: refactor `validateInt32` and `validateUint32`
mawaregetsuka May 22, 2022
40fa2e9
doc: use serial comma in process docs
tniessen May 22, 2022
abc175e
http: add uniqueHeaders option to request and createServer
ShogunPanda Jan 10, 2022
b92bc59
src,lib: migrate to console on context's extra binding
legendecas May 18, 2022
360cda1
net: add ability to reset a tcp socket
PupilTong May 15, 2022
ac4ea62
test: use mustSucceed instead of mustCall with assert.ifError
fossamagna May 23, 2022
3b7241d
doc: use serial comma in dgram docs
tniessen May 23, 2022
9a3326f
src: make SecureContext fields private
tniessen May 24, 2022
38a3914
doc: make minor adjustments
LiviaMedeiros May 24, 2022
714e2d7
http2: improve tests and docs
daeyeon May 24, 2022
304e06a
src: refactor GetCipherValue and related functions
tniessen May 24, 2022
4a3ba87
util: add parseArgs module
bcoe May 24, 2022
810893f
deps: update undici to 5.3.0
nodejs-github-bot May 24, 2022
ee91acb
test: improve code coverage for inspector connection errors
cola119 May 25, 2022
f9f22b4
http2: set origin name correctly when servername is empty
ofirbarak May 25, 2022
12af431
crypto: align webcrypto RSA key import/export with other implementations
panva May 25, 2022
b5ed1bd
esm: fix http(s) import via custom loader
JakobJingleheimer May 25, 2022
30cb1bf
tools: refactor `tools/license2rtf` to ESM
F3n67u May 25, 2022
a346572
doc: document `signal` option for `EventTarget#addEventListener`
aduh95 May 25, 2022
cb4a558
perf_hooks: fix start_time of perf_hooks
theanarkh May 12, 2022
331088f
Revert "tools: refactor `tools/license2rtf` to ESM"
richardlau May 26, 2022
6375b13
deps: upgrade npm to 8.11.0
May 25, 2022
681fb3a
node-api: emit uncaught-exception on unhandled tsfn callbacks
legendecas Dec 14, 2020
0818b52
doc: fix napi version for node_api_symbol_for
danielleadams Apr 27, 2022
ca0044b
doc: use serial comma in worker_threads docs
tniessen May 28, 2022
df56644
doc: add note regarding `%Array.prototype.concat%` in `primordials.md`
aduh95 May 29, 2022
15a682c
tls: fix convertALPNProtocols accepting ArrayBufferViews
LiviaMedeiros May 26, 2022
a56552b
meta: update AUTHORS
nodejs-github-bot May 29, 2022
5e05062
tools: update lint-md-dependencies to rollup@2.75.1
nodejs-github-bot May 29, 2022
c3a127d
deps: exclude linker scripts for windows builds
danbev May 5, 2022
2f44273
deps: regenerate OpenSSL archs files
danbev May 16, 2022
d72dcb0
doc: use serial comma in errors docs
tniessen May 30, 2022
0903515
benchmark: add node-error benchmark
RafaelGSS May 12, 2022
f5a5df4
src,deps,build,test: add OpenSSL config appname
danbev May 14, 2022
122c377
src,doc,test: add --openssl-shared-config option
danbev May 18, 2022
7ad5b42
doc: use serial comma in console docs
tniessen May 31, 2022
7a71ae8
tools: update clang-format 1.7.0 to 1.8.0
RaisinTen Jun 1, 2022
29c64ce
tools: update lint-md-dependencies to rollup@2.75.3
nodejs-github-bot May 31, 2022
0ef81d1
doc: add src/crypto to CC list for nodejs/crypto
tniessen Jun 1, 2022
921ef9b
deps: update undici to 5.4.0
nodejs-github-bot Jun 1, 2022
97d3ea3
test: add `BigInt`s to `common.getArrayBufferViews()`
LiviaMedeiros Jun 1, 2022
18d3c33
2022-06-01, Version 16.15.1 'Gallium' (LTS)
juanarbol Jun 1, 2022
b984017
2022-06-01, Version 17.9.1 (Current)
ruyadorno May 30, 2022
55f56ef
2022-06-01, Version 18.3.0 (Current)
bengl May 31, 2022
5ce141c
doc: update CHANGELOG_V18.md
panva Jun 2, 2022
ef16c7b
tools: update `codecov/codecov-action` version
aduh95 Jun 2, 2022
1496d43
src: convey potential exceptions during StreamPipe construction
RaisinTen Jun 2, 2022
9a11ea1
build: add nonpm and nocorepack to vcbuild.bat
RaisinTen Jun 2, 2022
8f39f51
doc: fix 404 link of BUILDING.md
F3n67u Jun 2, 2022
218664f
doc: fix chromium document link in pull-requests.md
rikapo Jun 2, 2022
06d8606
lib: use null-prototype objects for property descriptors
aduh95 Jun 3, 2022
f765693
fs: export constants from `fs/promises`
F3n67u Jun 3, 2022
ac27c58
doc: promote cdt to tier 3
tony-go Jun 3, 2022
386c7e1
tls: fix performance regression in `convertALPNProtocols()`
LiviaMedeiros May 30, 2022
dfa896f
esm: refactor responseURL handling
guybedford May 21, 2022
7e5da97
crypto: add CFRG curves to Web Crypto API
panva Jun 4, 2022
b6a2072
report: add more heap infos in process report
theanarkh Jun 4, 2022
cd03515
test: convert then to async/await
meekdenzo Jun 4, 2022
45d7ca9
meta: update AUTHORS
nodejs-github-bot Jun 4, 2022
71071f8
lib: give names to promisified methods
LiviaMedeiros May 26, 2022
824c8b7
doc: use serial comma in ESM docs
tniessen Jun 5, 2022
765666a
esm: fix chain advances when loader calls next<HookName> multiple times
JakobJingleheimer Jun 5, 2022
93d10d6
doc: use serial comma in pull request doc
F3n67u Jun 5, 2022
815e74b
doc: add CIGTM to `glossary.md`
F3n67u Jun 5, 2022
c7c8d86
tools: use hashes instead of tags for external actions (#43284)
aduh95 Jun 5, 2022
797e41c
doc: add missing require to stream api doc
F3n67u Jun 5, 2022
18a0ead
doc: make clear the result of comparison between Symbol.for
cola119 Jun 6, 2022
d5d67e3
tools: update eslint to 8.17.0
nodejs-github-bot Jun 6, 2022
b631086
tools: update lint-md-dependencies to rollup@2.75.5
nodejs-github-bot Jun 6, 2022
737ca9a
doc: use serial comma in net docs
tniessen Jun 7, 2022
ac2c082
doc: improve description of TZ
tniessen Jun 7, 2022
aba2cd7
doc: fix typo in util.parseArgs usage example
michaelficarra Jun 6, 2022
3296d6d
doc: change glossary link in pull request guide to node's glossary doc
F3n67u Jun 8, 2022
c977ad6
doc: add undici to glossary
F3n67u Jun 6, 2022
85f8821
net,dns: move hasObserver out of perf function
theanarkh Jun 9, 2022
923f355
doc: fix specifier example in `esm.md`
privatenumber Jun 9, 2022
595ce9d
doc: use serial comma in webstreams docs
tniessen Jun 9, 2022
cb7e854
doc: fix typo in globals.md
daeyeon Jun 10, 2022
fbfb91b
crypto: remove Node.js-specific webcrypto extensions
panva Jun 11, 2022
3987d6b
meta: move one or more collaborators to emeritus (#43183)
nodejs-github-bot Jun 11, 2022
e227e52
tools: fix find-inactive actions
LiviaMedeiros Jun 11, 2022
a9b1fd3
util: add `kEmptyObject` to internal/util
LiviaMedeiros May 21, 2022
dc2a5d7
async_hooks: use `kEmptyObject`
LiviaMedeiros May 21, 2022
20b0df1
child_process: use `kEmptyObject`
LiviaMedeiros May 21, 2022
32da6ee
cluster: use `kEmptyObject`
LiviaMedeiros May 21, 2022
f3376f0
crypto: use `kEmptyObject`
LiviaMedeiros May 21, 2022
9220aca
events: use `kEmptyObject`
LiviaMedeiros May 21, 2022
c52454f
fs: use `kEmptyObject`
LiviaMedeiros May 21, 2022
a709a71
http: use `kEmptyObject`
LiviaMedeiros May 21, 2022
df68383
http2: use `kEmptyObject`
LiviaMedeiros May 21, 2022
811cb8f
https: use `kEmptyObject`
LiviaMedeiros May 21, 2022
a983d39
perf_hooks: use `kEmptyObject`
LiviaMedeiros May 21, 2022
8e7e58f
readline: use `kEmptyObject`
LiviaMedeiros May 21, 2022
a0178a1
stream: use `kEmptyObject`
LiviaMedeiros May 21, 2022
44aa46d
test_runner: use `kEmptyObject`
LiviaMedeiros May 21, 2022
cacd72e
timers: use `kEmptyObject`
LiviaMedeiros May 21, 2022
cade060
tls: use `kEmptyObject`
LiviaMedeiros May 21, 2022
0313102
vm: use `kEmptyObject`
LiviaMedeiros May 21, 2022
51e7f75
wasi: use `kEmptyObject`
LiviaMedeiros May 21, 2022
b1c1f86
worker: use `kEmptyObject`
LiviaMedeiros May 21, 2022
917fcb2
lib: use `kEmptyObject` in various places
LiviaMedeiros May 21, 2022
93728c6
tools: add `avoid-prototype-pollution` lint rule
aduh95 Jun 11, 2022
c470386
tools: fix `create-or-update-pull-request-action` hash on GHA
aduh95 Jun 11, 2022
440d95a
doc: add F3n67u to triagers
F3n67u Jun 11, 2022
741ed0f
meta: update AUTHORS
nodejs-github-bot Jun 12, 2022
fab676e
doc: add fspromises mkdir example
bnb Jun 12, 2022
5114c46
test: fix `common.mustNotCall` error message
aduh95 Apr 29, 2022
97b9180
test: add test for short-option followed by its value
cola119 Jun 12, 2022
8d5a3e3
perf_hooks: fix function wrapped by `timerify` to work correctly
cola119 Jun 12, 2022
2efeb5c
readline: fix question stack overflow
chapko Jun 12, 2022
167ea80
src: fix memory leaks and refactor `ByteSource`
tniessen Jun 12, 2022
156365e
repl: make autocomplete case-insensitive
gribnoysup Jun 12, 2022
3d0a0b6
doc: use serial comma in report docs
tniessen Jun 13, 2022
511e289
bootstrap: consolidate global properties definition
legendecas Jun 9, 2022
3786ef6
doc: remove ETW from diag tierlist
tony-go Jun 13, 2022
4f3b8fa
doc: remove llnode from diag tierlist
tony-go Jun 13, 2022
78b410f
meta: move one or more collaborators to emeritus
nodejs-github-bot Jun 13, 2022
5ca2ab1
test: fix address in use error
everett1992 May 24, 2022
486dcd7
src: fix json utils escapes for U+000B
legendecas May 25, 2022
47ea59f
deps: upgrade npm to 8.12.1
npm-cli-bot Jun 14, 2022
73d8db8
test: mark test_buffer/test_finalizer flaky
mhdawson Jun 13, 2022
83ffb79
doc: clarify use of deps/icu-small
mhdawson Jun 1, 2022
cc82f6f
doc: add initial doc on how to update cjs-module-lexer
mhdawson May 30, 2022
561f7fe
inspector: add missing initialization
mhdawson May 30, 2022
611847b
deps: update undici to 5.5.1
nodejs-github-bot Jun 14, 2022
f7d73d4
events: fix adding abort listener in `events.once`
daeyeon Jun 14, 2022
9eb1b5c
deps: update Corepack to 0.11.2
arcanis Jun 15, 2022
0f90879
util: freeze `kEnumerableProperty`
LiviaMedeiros May 26, 2022
4420d52
crypto: fix webcrypto JWK EC and OKP import crv check
panva Jun 15, 2022
6a7aff6
crypto: test webcrypto ec raw public key import
panva Jun 15, 2022
5fad0b9
crypto: fix webcrypto import of cfrg raw public keys
panva Jun 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .editorconfig
Expand Up @@ -7,6 +7,7 @@ indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
quote_type = single

[vcbuild.bat]
end_of_line = crlf
Expand Down
5 changes: 2 additions & 3 deletions .eslintignore
@@ -1,12 +1,11 @@
node_modules
lib/internal/v8_prof_polyfill.js
lib/punycode.js
test/addons/??_*
test/fixtures
test/message/esm_display_syntax_error.mjs
tools/icu
tools/lint-md.js
tools/node-lint-md-cli-rollup/dist
tools/lint-md/lint-md.mjs
benchmark/tmp
doc/**/*.js
!doc/api_assets/*.js
!.eslintrc.js
189 changes: 120 additions & 69 deletions .eslintrc.js
Expand Up @@ -15,18 +15,17 @@ NodePlugin.RULES_DIR = path.resolve(__dirname, 'tools', 'eslint-rules');
const ModuleFindPath = Module._findPath;
const hacks = [
'eslint-plugin-node-core',
'eslint-plugin-jsdoc',
'eslint-plugin-markdown',
'babel-eslint',
'@babel/eslint-parser',
'@babel/plugin-syntax-import-assertions',
];
Module._findPath = (request, paths, isMain) => {
const r = ModuleFindPath(request, paths, isMain);
if (!r && hacks.includes(request)) {
try {
return require.resolve(`./tools/node_modules/${request}`);
// Keep the variable in place to ensure that ESLint started by older Node.js
// versions work as expected.
// eslint-disable-next-line no-unused-vars
} catch (e) {
} catch {
return require.resolve(
`./tools/node_modules/eslint/node_modules/${request}`);
}
Expand All @@ -36,16 +35,24 @@ Module._findPath = (request, paths, isMain) => {

module.exports = {
root: true,
plugins: ['markdown', 'node-core'],
parser: 'babel-eslint',
parserOptions: { sourceType: 'script' },
env: {
es2022: true,
},
extends: ['eslint:recommended', 'plugin:jsdoc/recommended'],
plugins: ['jsdoc', 'markdown', 'node-core'],
parser: '@babel/eslint-parser',
parserOptions: {
babelOptions: {
plugins: [
Module._findPath('@babel/plugin-syntax-import-assertions'),
],
},
requireConfigFile: false,
sourceType: 'script',
},
overrides: [
{
files: [
'doc/api/esm.md',
'doc/api/module.md',
'doc/api/modules.md',
'doc/api/packages.md',
'test/es-module/test-esm-type-flag.js',
'test/es-module/test-esm-type-flag-alias.js',
'*.mjs',
Expand All @@ -55,9 +62,55 @@ module.exports = {
},
{
files: ['**/*.md'],
parserOptions: { ecmaFeatures: { impliedStrict: true } },
processor: 'markdown/markdown',
},
{
files: ['**/*.md/*.cjs', '**/*.md/*.js'],
parserOptions: {
sourceType: 'script',
ecmaFeatures: { impliedStrict: true }
},
rules: { strict: 'off' },
},
{
files: [
'**/*.md/*.mjs',
'doc/api/esm.md/*.js',
'doc/api/packages.md/*.js',
],
parserOptions: { sourceType: 'module' },
rules: { 'no-restricted-globals': [
'error',
{
name: '__filename',
message: 'Use import.meta.url instead',
},
{
name: '__dirname',
message: 'Not available in ESM',
},
{
name: 'exports',
message: 'Not available in ESM',
},
{
name: 'module',
message: 'Not available in ESM',
},
{
name: 'require',
message: 'Use import instead',
},
{
name: 'Buffer',
message: 'Import Buffer instead of using the global'
},
{
name: 'process',
message: 'Import process instead of using the global'
},
] },
},
],
rules: {
// ESLint built-in rules
Expand All @@ -82,21 +135,24 @@ module.exports = {
ignorePattern: '.*',
},
}],
'comma-dangle': ['error', 'only-multiline'],
'comma-dangle': ['error', {
arrays: 'always-multiline',
exports: 'only-multiline',
functions: 'only-multiline',
imports: 'only-multiline',
objects: 'only-multiline',
}],
'comma-spacing': 'error',
'comma-style': 'error',
'computed-property-spacing': 'error',
'constructor-super': 'error',
'default-case-last': 'error',
'dot-location': ['error', 'property'],
'dot-notation': 'error',
'eol-last': 'error',
'eqeqeq': ['error', 'smart'],
'for-direction': 'error',
'func-call-spacing': 'error',
'func-name-matching': 'error',
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
'getter-return': 'error',
'indent': ['error', 2, {
ArrayExpression: 'first',
CallExpression: { arguments: 'first' },
Expand All @@ -110,53 +166,29 @@ module.exports = {
'keyword-spacing': 'error',
'linebreak-style': ['error', 'unix'],
'max-len': ['error', {
code: 80,
code: 120,
ignorePattern: '^// Flags:',
ignoreRegExpLiterals: true,
ignoreTemplateLiterals: true,
ignoreUrls: true,
tabWidth: 2,
}],
'new-parens': 'error',
'no-async-promise-executor': 'error',
'no-class-assign': 'error',
'no-confusing-arrow': 'error',
'no-const-assign': 'error',
'no-constant-condition': ['error', { checkLoops: false }],
'no-constructor-return': 'error',
'no-control-regex': 'error',
'no-debugger': 'error',
'no-delete-var': 'error',
'no-dupe-args': 'error',
'no-dupe-class-members': 'error',
'no-dupe-keys': 'error',
'no-dupe-else-if': 'error',
'no-duplicate-case': 'error',
'no-duplicate-imports': 'error',
'no-else-return': ['error', { allowElseIf: true }],
'no-empty-character-class': 'error',
'no-ex-assign': 'error',
'no-extra-boolean-cast': 'error',
'no-extra-parens': ['error', 'functions'],
'no-extra-semi': 'error',
'no-fallthrough': 'error',
'no-func-assign': 'error',
'no-global-assign': 'error',
'no-invalid-regexp': 'error',
'no-irregular-whitespace': 'error',
'no-lonely-if': 'error',
'no-misleading-character-class': 'error',
'no-mixed-requires': 'error',
'no-mixed-spaces-and-tabs': 'error',
'no-multi-spaces': ['error', { ignoreEOLComments: true }],
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0, maxBOF: 0 }],
'no-new-require': 'error',
'no-new-symbol': 'error',
'no-obj-calls': 'error',
'no-octal': 'error',
'no-path-concat': 'error',
'no-proto': 'error',
'no-redeclare': ['error', { 'builtinGlobals': false }],
'no-restricted-modules': ['error', 'sys'],
/* eslint-disable max-len */
'no-restricted-properties': [
'error',
{
Expand Down Expand Up @@ -209,40 +241,29 @@ module.exports = {
message: 'Use Number.isNaN() instead of the global isNaN() function.',
},
],
/* eslint-enable max-len */
'no-return-await': 'error',
'no-self-assign': 'error',
'no-self-compare': 'error',
'no-setter-return': 'error',
'no-shadow-restricted-names': 'error',
'no-tabs': 'error',
'no-template-curly-in-string': 'error',
'no-this-before-super': 'error',
'no-throw-literal': 'error',
'no-trailing-spaces': 'error',
'no-undef': ['error', { typeof: true }],
'no-undef-init': 'error',
'no-unexpected-multiline': 'error',
'no-unreachable': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'no-unused-labels': 'error',
'no-unused-expressions': ['error', { allowShortCircuit: true }],
'no-unused-vars': ['error', { args: 'none', caughtErrors: 'all' }],
'no-use-before-define': ['error', {
classes: true,
functions: false,
variables: false,
}],
'no-useless-backreference': 'error',
'no-useless-call': 'error',
'no-useless-catch': 'error',
'no-useless-concat': 'error',
'no-useless-constructor': 'error',
'no-useless-escape': 'error',
'no-useless-return': 'error',
'no-var': 'error',
'no-void': 'error',
'no-whitespace-before-property': 'error',
'no-with': 'error',
'object-curly-newline': 'error',
'object-curly-spacing': ['error', 'always'],
'one-var': ['error', { initialized: 'never' }],
'one-var-declaration-per-line': 'error',
Expand All @@ -252,6 +273,7 @@ module.exports = {
{ blankLine: 'always', prev: 'function', next: 'function' },
],
'prefer-const': ['error', { ignoreReadBeforeAssign: true }],
'prefer-object-has-own': 'error',
'quotes': ['error', 'single', { avoidEscape: true }],
'quote-props': ['error', 'consistent'],
'rest-spread-spacing': 'error',
Expand All @@ -274,22 +296,51 @@ module.exports = {
'symbol-description': 'error',
'template-curly-spacing': 'error',
'unicode-bom': 'error',
'use-isnan': 'error',
'valid-typeof': 'error',
'valid-typeof': ['error', { requireStringLiterals: true }],

// ESLint recommended rules that we disable
'no-inner-declarations': 'off',

// JSDoc recommended rules that we disable
'jsdoc/require-jsdoc': 'off',
'jsdoc/require-param-description': 'off',
'jsdoc/newline-after-description': 'off',
'jsdoc/require-returns-description': 'off',
'jsdoc/valid-types': 'off',
'jsdoc/no-undefined-types': 'off',
'jsdoc/require-param': 'off',
'jsdoc/check-tag-names': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/require-property-description': 'off',

// Custom rules from eslint-plugin-node-core
'node-core/no-unescaped-regexp-dot': 'error',
'node-core/no-duplicate-requires': 'error',
},
globals: {
AbortController: 'readable',
Atomics: 'readable',
BigInt: 'readable',
BigInt64Array: 'readable',
BigUint64Array: 'readable',
TextEncoder: 'readable',
TextDecoder: 'readable',
queueMicrotask: 'readable',
globalThis: 'readable',
ByteLengthQueuingStrategy: 'readable',
CompressionStream: 'readable',
CountQueuingStrategy: 'readable',
Crypto: 'readable',
CryptoKey: 'readable',
DecompressionStream: 'readable',
fetch: 'readable',
FormData: 'readable',
ReadableStream: 'readable',
ReadableStreamDefaultReader: 'readable',
ReadableStreamBYOBReader: 'readable',
ReadableStreamBYOBRequest: 'readable',
ReadableByteStreamController: 'readable',
ReadableStreamDefaultController: 'readable',
Response: 'readable',
TextDecoderStream: 'readable',
TextEncoderStream: 'readable',
TransformStream: 'readable',
TransformStreamDefaultController: 'readable',
ShadowRealm: 'readable',
SubtleCrypto: 'readable',
WritableStream: 'readable',
WritableStreamDefaultWriter: 'readable',
WritableStreamDefaultController: 'readable',
},
};