Skip to content
forked from nodejs/node
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

Full trailing slash deprecation #4

Open
wants to merge 6,321 commits into
base: master
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
6321 commits
Select commit Hold shift + click to select a range
0b773a1
doc: add VoltrexMaster to triagers
VoltrexKeyva Aug 27, 2021
c67dc3e
doc: add FrankQiu to a triager
iam-frankqiu Aug 28, 2021
d14878d
doc: add docs for duplex.allowHalfOpen property
pimterry Jun 23, 2021
b63e449
test: pass URL's toascii.window.js WPT
XadillaX Aug 27, 2021
50930a0
deps: update V8 to 9.3.345.16
targos Aug 29, 2021
d9df416
build: reset embedder string to "-node.0"
targos Aug 29, 2021
e9b0552
src: update NODE_MODULE_VERSION to 96
targos Jul 20, 2021
5952c0c
deps: V8: un-cherry-pick bd019bd
refack Mar 27, 2019
6d1dfaf
deps: V8: patch register-arm64.h
refack May 22, 2019
6f4338d
deps: V8: forward declaration of `Rtl*FunctionTable`
refack May 22, 2019
c65a987
deps: make v8.h compatible with VS2015
joaocgreis Nov 1, 2019
a00971f
deps: fix V8 build issue with inline methods
gengjiawen Oct 14, 2020
e232c9b
deps: silence irrelevant V8 warnings
targos Jan 30, 2021
47db6ae
deps: silence irrelevant V8 warning
targos May 1, 2021
583d1f2
deps: V8: cherry-pick 81814ed44574
Aug 9, 2021
66af7e9
deps: V8: cherry-pick 00bb1a77c03e
RaisinTen Aug 21, 2021
bcc449d
tools: update V8 gypfiles for 9.3
targos Jun 12, 2021
3cc328a
build: adapt v8_pch.h to V8 9.3
targos Jun 20, 2021
d0ab290
test: adapt test-v8-flags to V8 9.3
targos Jun 20, 2021
27cbbf0
test: adapt test-util-inspect to V8 9.3
targos Jul 3, 2021
660b1d1
test: adapt test-fs-read to V8 9.3
targos Jul 17, 2021
e8718b2
build: update token used for pull requests
Trott Aug 27, 2021
5763d47
build: fix find-inactive-collaborators workflow token
Trott Aug 27, 2021
9eff819
doc: move reference to OpenSSL flags SSL_OP_*
tniessen Aug 29, 2021
4e11817
meta: add mailmap entry for Ethan-Arrowood
Trott Aug 29, 2021
d989186
2021-08-31, Version 12.22.6 'Erbium' (LTS)
MylesBorins Aug 28, 2021
f172c5a
2021-08-31, Version 14.17.6 'Fermium' (LTS)
MylesBorins Aug 28, 2021
162f07b
doc: update WASI example to use import.meta.url
guybedford Aug 28, 2021
508890d
test: use `assert.match` instead of `regexp.test`
targos Aug 29, 2021
926152a
async_hooks: use resource stack for AsyncLocalStorage run
Aug 26, 2021
5b2ab7a
doc: add nodejs/tweet issue creation to sec. doc
danbev Aug 30, 2021
6155499
doc: add missing changes to generateKeyPair(Sync)
tniessen Aug 31, 2021
73d5f8a
crypto: fix regression in RSA-PSS keygen
tniessen Aug 29, 2021
4595a0e
tools: update gyp-next to v0.10.0
targos Aug 30, 2021
c5eadb4
build: add support for Visual Studio 2022
targos Aug 24, 2021
13b569c
build: add windows-2022 to GitHub test matrix
targos Aug 24, 2021
0c35fe0
doc: remove danbev from TSC member list
danbev Sep 2, 2021
95dffe7
Revert "build: add windows-2022 to GitHub test matrix"
targos Sep 3, 2021
c68faa9
meta: remove duplicate AUTHORS entry for NigelKibodeaux
Trott Sep 1, 2021
9fdb726
doc: add descriptions about when `options.mode` is ignored
rayw000 Aug 25, 2021
7cc96b2
src: remove usage of AllocatedBuffer from src/node_buffer.cc
RaisinTen Aug 30, 2021
f26c2ce
tools: add support for import assertions in linter
aduh95 Aug 28, 2021
338ab0d
build: preserves symbols during LTO with macOS linker
jesec Aug 21, 2021
c6b0ae8
crypto: add rsa-pss keygen parameters
panva Aug 29, 2021
80785f6
meta: update AUTHORS
nodejs-github-bot Aug 31, 2021
ed13228
src: register external references of dtrace for snapshot
joyeecheung Aug 31, 2021
b9ed7e5
src: register external references of node-report for snapshot
joyeecheung Aug 31, 2021
afc7760
src: register external references of BaseObject for snapshot
joyeecheung Aug 31, 2021
cf11a2b
src: register missing stream wrap external references
joyeecheung Aug 31, 2021
cca0305
src: register missing process methods external references
joyeecheung Aug 31, 2021
3ec38f7
src: register external references of SignalWrap for snapshot
joyeecheung Aug 31, 2021
995f945
src: register external references of TCPWrap for snapshot
joyeecheung Aug 31, 2021
6ddcdc3
src: register external references of TTYWrap for snapshot
joyeecheung Aug 31, 2021
1c4df35
src: register external references of PipeWrap for snapshot
joyeecheung Aug 31, 2021
3f78545
doc: fix missing history version in `fs.md`
aduh95 Sep 1, 2021
3e774a0
doc: fix history for `fs.WriteStream` `open` event
aduh95 Sep 1, 2021
8d5ed10
meta: consolidate AUTHORS entries for mithunsasidharan
Trott Sep 5, 2021
c7222b3
lib,repl: ignore non-canBeRequiredByUsers built-in
XadillaX Aug 30, 2021
6211d93
2021-09-07, Version 16.9.0 (Current)
targos Sep 6, 2021
dadea4a
src: fix C4805 MSVC warning
targos Sep 5, 2021
ff7a0df
test: make tests pass on Windows with Unix EOL
targos Sep 5, 2021
773a989
build: run AUTHORS update weekly
Trott Sep 5, 2021
77c81cb
tools,build: update YAML files in preparation for linting
Trott Sep 5, 2021
2b131a5
build: add YAML linting
Trott Sep 5, 2021
b016d5d
build: add YAML linting to GitHub Actions
Trott Sep 5, 2021
0c6f345
stream: fix highwatermark threshold and add the missing error
pd4d10 May 16, 2021
5d34ef5
crypto: check webcrypto asymmetric key types during importKey
panva Aug 31, 2021
861c3e0
doc: fix list indentation in corepack.md
alexeyten Sep 7, 2021
33b5107
src: make napi_create_reference accept symbol
JckXia Aug 29, 2021
59d3d54
errors: disp ver on fatal except that causes exit
theoludwig Sep 1, 2021
9f6fed7
deps: update Acorn to v8.5.0
targos Sep 6, 2021
200ed07
src: use Isolate::TryGetCurrent where appropriate
addaleax Aug 31, 2021
9f7412a
Revert "src: skip test_fatal/test_threads for Debug builds"
addaleax Aug 31, 2021
6e9a54c
doc: fix property name 'detail' of performanceEntry
ChristianBoehlke Sep 6, 2021
7d51c6a
lib: use standard property names
null8626 Sep 3, 2021
addb30f
repl: fix top level await with surrogate characters
Mesteery Aug 29, 2021
8c905b8
tools: update remark-html to v13.0.2
targos Sep 8, 2021
513a979
deps: patch for v8 on windows
gengjiawen Sep 6, 2021
be3af51
deps: V8: cherry-pick 9a607043cb31
gengjiawen Sep 9, 2021
b9f3606
meta: add more mailmap entries for bajtos
Trott Sep 7, 2021
5fd7a72
crypto: fix default MGF1 hash for OpenSSL 3
tniessen Sep 7, 2021
a42bd7e
crypto: fix RSA-PSS default saltLength
tniessen Sep 5, 2021
a9dd03b
src: add option to disable loading native addons
d3lm Sep 2, 2021
00ca848
doc: fix CCM cipher example in MJS
tniessen Aug 30, 2021
1b335d4
2021-09-10, Version 16.9.1 (Current)
richardlau Sep 10, 2021
f8836b2
src: fix -Wunreachable-code-return error
codebytere Sep 8, 2021
3e8eda2
doc: add Ayase-252 to collaborators
Ayase-252 Sep 11, 2021
e267467
meta: consolidate AUTHORS entry for mikemaccana
Trott Sep 9, 2021
ec555b0
test: fix internet/test-dns
Trott Sep 11, 2021
540f9d9
worker: avoid potential deadlock on NearHeapLimit
santigimeno Apr 25, 2021
df22736
esm: consolidate ESM loader hooks
JakobJingleheimer Aug 25, 2021
90c0a5c
deps: patch v8 for vs2019 in std17
gengjiawen Sep 10, 2021
dce7511
tools: update all dependencies of markdown linter
targos Sep 8, 2021
b6ac7e6
test: mark test-crypto-timing-safe-equal-benchmarks flaky
richardlau Sep 10, 2021
1b2749e
dns: default to verbatim=true in dns.lookup()
bnoordhuis Jan 29, 2020
5c1adda
module: fix $ pattern replacements
guybedford Sep 8, 2021
e016cc7
test: update OpenSSL3 error messages for 3.0.0+quic
danbev Sep 13, 2021
ed556c0
build: add daily/on-demand internet test workflow
Trott Sep 12, 2021
fa7c477
meta: update AUTHORS
nodejs-github-bot Sep 12, 2021
bbd4c6e
doc: claim ABI version for Electron v15 and v16
MarshallOfSound Aug 30, 2021
798c0cb
build: only lint version numbers for pull requests
targos Sep 7, 2021
7216fb1
module: deprecate trailing slash pattern mappings
guybedford Sep 8, 2021
6426641
tools: update ansi-regex in lint-md rollup
Trott Sep 14, 2021
bea8a90
module: support pattern trailers for imports field
guybedford Sep 8, 2021
4a31ea0
events: fix duplicate require which cause performance penalty
wwwzbwcom Sep 15, 2021
166e52b
doc: add full list of subsystems
iam-frankqiu Sep 3, 2021
8468bdb
deps: upgrade npm to 7.23.0
npm-robot Sep 9, 2021
7b4e6d4
doc: clarify that ObjectWrap requires manual cleanup on shutdown
Flarna Sep 10, 2021
f182b9b
dns: runtime deprecate type coercion of `dns.lookup` options
aduh95 Aug 17, 2021
58b7d47
src: register zlib external references for snapshot
joyeecheung Sep 6, 2021
e9fc678
http: remove CRLF variable
shfshanyue Sep 14, 2021
1f8ed09
meta: add .mailmap entry for arcanis
Trott Sep 14, 2021
d23079d
deps: patch V8 to 9.3.345.19
targos Sep 14, 2021
ecb6c84
build: add paths-ignore for build-tarball workflow
Trott Sep 14, 2021
884b478
build: add .mailmap/AUTHORS to path-ignore for test-asan
Trott Sep 14, 2021
0f1765e
build: add .mailmap/AUTHORS to paths-ignore for test-macos
Trott Sep 14, 2021
592d1c3
readline: refactor `Interface` to ES2015 class
aduh95 Apr 27, 2021
8122d24
readline: introduce promise-based API
aduh95 Apr 27, 2021
707dd77
readline: validate `AbortSignal`s and remove unused event listeners
aduh95 May 2, 2021
341312d
readline: add `autoCommit` option
aduh95 Aug 5, 2021
604c1df
src: remove unnecessary comment and add a CHECK in crypto_tls.cc
RaisinTen Sep 4, 2021
c365145
meta: update GeoffreyBooth email address
GeoffreyBooth Sep 14, 2021
de10ab2
doc: add timeout.close
galkin Sep 8, 2021
eb44d19
dns: cleanup validation
VoltrexKeyva Sep 10, 2021
3decfa7
build: run modified internet tests on GitHub Actions
Trott Sep 14, 2021
8a92018
fs: make `open` and `close` stream override optional when unused
aduh95 Sep 6, 2021
55379eb
crypto: use `validateObject`
VoltrexKeyva Aug 24, 2021
7905df1
deps: add riscv64 into openssl Makefile and gen openssl-riscv64
luyahan Sep 10, 2021
6bfe5a6
doc: fix CJS-ESM selector in Safari
bmeck Sep 17, 2021
40c6e83
dgram: tighten `address` validation in `socket.send`
VoltrexKeyva Jun 29, 2021
e4852e3
src: add option to disable global search paths
zcbenz Aug 13, 2021
d9791d9
src: add --no-global-search-paths cli option
zcbenz Aug 16, 2021
e62d464
lib: avoid creating a throw away object in `validateObject`
aduh95 Aug 19, 2021
8900a46
lib: remove useless statement
Sep 3, 2021
f4292bc
doc: correct parameters in fs and stream documentation
Sep 4, 2021
7c77db0
dns: refactor and use validators
VoltrexKeyva Sep 6, 2021
da13561
doc: clean up weird notes about reentrancy
addaleax Sep 14, 2021
6ef1d7c
meta: add mailmap entry for LPardue
Trott Sep 16, 2021
2b080cb
tools: update doc generator dependencies
targos Sep 8, 2021
3101c09
test: do not run `test-corepack-yarn-install` with no internet
aduh95 Sep 12, 2021
64287e4
module: runtime deprecate trailing slash patterns
guybedford Sep 15, 2021
088c01b
meta: update GeoffreyBooth email addresses in AUTHORS and .mailmap
Trott Sep 17, 2021
0bafe6d
doc: fix comma splice
Trott Sep 17, 2021
b0d5eec
tools,doc: fix misrendering of consecutive JS blocks
Trott Sep 18, 2021
4e8f11d
http: limit requests per connection
fatal10110 Sep 11, 2021
453bb6b
crypto: fix webcrypto ed(25519|448) spki/pkcs8 import
panva Sep 16, 2021
420cdc7
doc: prepare README.md for stricter linting
Trott Sep 17, 2021
4e7fe5a
test: fix test-dgram-udp6-link-local-address on Windows
targos Sep 5, 2021
931abc0
doc: fix markdown indentation in lists
targos Sep 18, 2021
7153d25
deps: upgrade npm to 7.24.0
npm-robot Sep 20, 2021
479658b
doc: changes default values for fs.read fns
rbrishabh Jul 14, 2021
d05cca9
meta: update AUTHORS
nodejs-github-bot Sep 19, 2021
549f968
doc: update markdown formatting for *.md files
Trott Sep 18, 2021
f367af4
tools: extend default yamllint config
targos Sep 19, 2021
0c95dea
doc: update tools .md files for upcoming lint/formatting
Trott Sep 19, 2021
f4a350d
doc: prepare markdown file for upcoming formatting/linting
Trott Sep 19, 2021
a6a5d4b
doc: update benchmarks README.md for upcoming linting/formatting
Trott Sep 19, 2021
5ca5499
doc: update markdown files in src for upcoming linting/formatting
Trott Sep 19, 2021
0991dfc
doc: add blank line between comments
Trott Sep 20, 2021
36e2ffe
module: subpath folder mappings EOL
guybedford Sep 15, 2021
61df3d8
crypto: don't call callback twice in case crypto.randomBytes fails
lbguilherme Sep 19, 2021
e1bca10
doc: fix typos in http.md
lpinca Sep 20, 2021
8d5675e
2021-09-22, Version 16.10.0 (Current)
BethGriggs Sep 21, 2021
24cc239
tools: fix find-inactive-collaborators for recent README change
Trott Sep 20, 2021
c89d519
doc: make version picker usable on mobile
evanlucas Aug 31, 2021
51d2623
tools: update remark-preset-lint-node to 3.1.0
Trott Sep 20, 2021
c7da13c
build: fix "test-internet.yml" workflows
suryapratapsinghsuryavanshi Sep 22, 2021
18e527c
build: add --no-user for pip commands in Makefile
Trott Sep 21, 2021
fd86dad
meta: update mailmap for LakshmiSwethaG
Trott Sep 21, 2021
8e84d56
meta: add mailmap entry for ralphtheninja
Trott Sep 19, 2021
3f61940
src: allow CAP_NET_BIND_SERVICE in SafeGetenv
danbev Mar 17, 2021
5f3c1b6
doc: fix typo in `async_hooks.md`
xuchaobei Sep 23, 2021
8006586
console: avoid unnecessary variables
Cinnamonsroll Sep 23, 2021
8d83c47
tools: re-implement lint-md without unified-args
Trott Sep 20, 2021
5134b0e
doc: fix buffer api example code's token error
gitwillsky Sep 15, 2021
4157317
console: use validators for consistency
VoltrexKeyva Aug 19, 2021
25ffd39
doc: fix typo in 'maxHeaderSize'
rebhialfa Sep 20, 2021
5ba7fbb
src,crypto: eliminate code duplication between StatelessDiffieHellman*
RaisinTen Sep 11, 2021
17bb7b2
crypto: handle initEDRaw pkey failure
codebytere Sep 23, 2021
026bd82
fs: add stream utilities to `FileHandle`
aduh95 Sep 5, 2021
ae876d4
doc: update minimum supported FreeBSD to 12.2
targos Sep 22, 2021
b0ef080
doc: add version when diagnostics_channel APIs were added
Flarna Sep 24, 2021
6077473
tools: implement markdown formatting
Trott Sep 22, 2021
85811d1
tools: fix lint-md autolinking
Trott Sep 24, 2021
a2ed30b
meta: add .mailmap entry for kunalspathak
Trott Sep 24, 2021
2b02d2f
doc: update fs.watchFile doc
clement-nardi Sep 17, 2021
0eb3420
typings: define types for worker and messaging bindings
targos Sep 18, 2021
281607d
typings: define types for symbols binding
targos Sep 18, 2021
0e561de
src: move `ToUSVString()` to node_util.cc
XadillaX Sep 24, 2021
b25a73f
build: pass a tuple of alternatives to str.endswith()
cclauss Sep 6, 2021
256fe21
lib: use `validateArray`
VoltrexKeyva Aug 15, 2021
95d1656
src: remove usage of AllocatedBuffer from udp_wrap.cc
RaisinTen Sep 19, 2021
b381bed
events: allow dispatch many times without listener
mrbbot Aug 15, 2021
35d9222
build: limit update authors CI scope
gengjiawen Sep 26, 2021
43291b9
deps: update `nghttp2` to v1.45.1
thunder-coding Sep 24, 2021
0ee0ed1
benchmark: add `util.toUSVString()`'s benchmark
XadillaX Sep 24, 2021
44b173e
http: use 0 as default for requests limit
fatal10110 Sep 23, 2021
4b030d0
doc: deprecate (doc-only) http abort related
dr-js Jan 18, 2021
8037d17
doc: fix example of crypto.generateKeySync
GreenSleepes Sep 27, 2021
78962d1
doc: mark readline promise implementation as experimental
aduh95 Sep 24, 2021
92ecd9f
repl: skip EmptyStatements and return result with TLA
Mesteery Sep 23, 2021
fbeeddd
meta: update gdams contact information
Trott Sep 27, 2021
fda1402
doc: fix typo in packages.md
warlock1996 Sep 27, 2021
2caa308
src: remove AllocatedBuffer from crypto_common.cc
RaisinTen Sep 25, 2021
d9ebc04
2021-09-28, Version 14.18.0 'Fermium' (LTS)
targos Sep 4, 2021
481c160
module: fix ERR_REQUIRE_ESM for parentPath null
guybedford Sep 18, 2021
02de402
v8: remove --harmony-top-level-await
GeoffreyBooth Sep 27, 2021
88b497a
doc: fix typo in fs.md
warlock1996 Sep 29, 2021
5607de8
build: set DESTCPU correctly for 'make binary' on Apple Silicon
cheister Sep 18, 2021
1798674
doc: fix typo in fs
mscdex Sep 29, 2021
e883a16
meta: move one or more collaborators to emeritus
nodejs-github-bot Sep 15, 2021
c44d683
meta: update AUTHORS
nodejs-github-bot Sep 26, 2021
afb4ad6
meta: add .mailmap entry for daguej
Trott Sep 26, 2021
b66c2e1
src: fix time-of-use vs time-of-check "bugs"
kokke Sep 14, 2021
4f3eda6
src: implement changes suggested by @addaleax
kokke Sep 27, 2021
140b25a
http: remove 'data' and 'end' listener if client parser error
mcollina Sep 28, 2021
1e89238
doc: reorder stream 'readable' paragraphs
vweevers Sep 25, 2021
35dc386
test: suppress compiler warning in test_bigint
danbev Sep 29, 2021
396b14b
util: expose stripVTControlCharacters()
cjihrig Sep 19, 2021
606bb52
util: improve ansi escape code regex
cjihrig Sep 25, 2021
4f72291
deps: update V8 to 9.4.146.18
targos Sep 17, 2021
96e3cd1
build: reset embedder string to "-node.0"
targos Sep 17, 2021
7b8736d
src: update NODE_MODULE_VERSION to 100
targos Sep 17, 2021
b512527
deps: V8: un-cherry-pick bd019bd
refack Mar 27, 2019
a8d4b0c
deps: V8: patch register-arm64.h
refack May 22, 2019
774011b
deps: V8: forward declaration of `Rtl*FunctionTable`
refack May 22, 2019
4f0ed9d
deps: make v8.h compatible with VS2015
joaocgreis Nov 1, 2019
e2dcba7
deps: fix V8 build issue with inline methods
gengjiawen Oct 14, 2020
6bbb0b0
deps: silence irrelevant V8 warnings
targos Jan 30, 2021
b479afa
deps: silence irrelevant V8 warning
targos May 1, 2021
998c890
deps: V8: cherry-pick 00bb1a77c03e
RaisinTen Aug 21, 2021
545dcad
deps: V8: cherry-pick bdcda72cd1d8
targos Aug 31, 2021
a909f69
deps: V8: cherry-pick 5681a6565828
targos Sep 6, 2021
fc056a3
deps: V8: cherry-pick 9a607043cb31
gengjiawen Sep 9, 2021
fd44fe5
tools: update V8 gypfiles for 9.4
targos Jul 28, 2021
8a58fce
tools: update remark-preset-lint-node to 3.2.0
Trott Oct 1, 2021
b5cfb26
meta: add .mailmap entry for Jimbly
Trott Sep 30, 2021
5ae72b7
meta: update AUTHORS
nodejs-github-bot Oct 3, 2021
e2382d0
lib: refactor to avoid unsafe array iteration
aduh95 Sep 30, 2021
1919b62
doc: update Forrest Norvell's pronouns
othiym23 Oct 3, 2021
d0fa1e9
test: fix typo in test/common/index.js
tniessen Oct 3, 2021
6199441
doc: correct ESM load hook table header
JakobJingleheimer Sep 27, 2021
3d11baf
lib: make structuredClone spec compliant
VoltrexKeyva Sep 29, 2021
03d25fe
doc: fix typo in esm.md
MasonM Oct 1, 2021
1811396
doc: add triagers to the table of contents
iam-frankqiu Sep 1, 2021
2a3a9b8
build: check for duplicates in new AUTHORS entries
Trott Sep 30, 2021
4bd8e0e
doc: fix typo in ESM example
tniessen Oct 1, 2021
e59461f
tools: update certdata.txt
richardlau Oct 1, 2021
7f2cb44
crypto: update root certificates
richardlau Oct 1, 2021
0a40695
doc: esm resolver spec refactoring for deprecations
guybedford Oct 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
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
Original file line number Diff line number Diff line change
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
4 changes: 1 addition & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
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
!.eslintrc.js
158 changes: 103 additions & 55 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ const ModuleFindPath = Module._findPath;
const hacks = [
'eslint-plugin-node-core',
'eslint-plugin-markdown',
'babel-eslint',
'@babel/eslint-parser',
'@babel/plugin-syntax-class-properties',
'@babel/plugin-syntax-import-assertions',
'@babel/plugin-syntax-top-level-await',
];
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 @@ -37,13 +37,21 @@ Module._findPath = (request, paths, isMain) => {
module.exports = {
root: true,
plugins: ['markdown', 'node-core'],
parser: 'babel-eslint',
parserOptions: { sourceType: 'script' },
parser: '@babel/eslint-parser',
parserOptions: {
babelOptions: {
plugins: [
Module._findPath('@babel/plugin-syntax-class-properties'),
Module._findPath('@babel/plugin-syntax-import-assertions'),
Module._findPath('@babel/plugin-syntax-top-level-await'),
],
},
requireConfigFile: false,
sourceType: 'script',
},
overrides: [
{
files: [
'doc/api/esm.md',
'doc/api/modules.md',
'test/es-module/test-esm-type-flag.js',
'test/es-module/test-esm-type-flag-alias.js',
'*.mjs',
Expand All @@ -53,13 +61,59 @@ 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
// http://eslint.org/docs/rules
// https://eslint.org/docs/rules/
'accessor-pairs': 'error',
'array-callback-return': 'error',
'arrow-parens': ['error', 'always'],
Expand All @@ -80,11 +134,18 @@ 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',
Expand All @@ -110,6 +171,7 @@ module.exports = {
code: 80,
ignorePattern: '^// Flags:',
ignoreRegExpLiterals: true,
ignoreTemplateLiterals: true,
ignoreUrls: true,
tabWidth: 2,
}],
Expand All @@ -118,14 +180,17 @@ module.exports = {
'no-class-assign': 'error',
'no-confusing-arrow': 'error',
'no-const-assign': 'error',
'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',
Expand All @@ -144,6 +209,7 @@ module.exports = {
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0, maxBOF: 0 }],
'no-new-require': 'error',
'no-new-symbol': 'error',
'no-nonoctal-decimal-escape': 'error',
'no-obj-calls': 'error',
'no-octal': 'error',
'no-path-concat': 'error',
Expand Down Expand Up @@ -186,34 +252,6 @@ module.exports = {
// as well to lib/.eslintrc.yaml.
'no-restricted-syntax': [
'error',
{
selector: "CallExpression[callee.property.name='deepStrictEqual'][arguments.2.type='Literal']",
message: 'Do not use a literal for the third argument of assert.deepStrictEqual()',
},
{
selector: "CallExpression[callee.property.name='doesNotThrow']",
message: 'Do not use `assert.doesNotThrow()`. Write the code without the wrapper and add a comment instead.',
},
{
selector: "CallExpression[callee.property.name='doesNotReject']",
message: 'Do not use `assert.doesNotReject()`. Write the code without the wrapper and add a comment instead.',
},
{
selector: "CallExpression[callee.property.name='rejects'][arguments.length<2]",
message: '`assert.rejects()` must be invoked with at least two arguments.',
},
{
selector: "CallExpression[callee.property.name='strictEqual'][arguments.2.type='Literal']",
message: 'Do not use a literal for the third argument of assert.strictEqual()',
},
{
selector: "CallExpression[callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])",
message: 'Use an object as second argument of `assert.throws()`.',
},
{
selector: "CallExpression[callee.property.name='throws'][arguments.length<2]",
message: '`assert.throws()` must be invoked with at least two arguments.',
},
{
selector: "CallExpression[callee.name='setTimeout'][arguments.length<2]",
message: '`setTimeout()` must be invoked with at least two arguments.',
Expand All @@ -227,26 +265,15 @@ module.exports = {
message: 'Use `new` keyword when throwing an `Error`.',
},
{
selector: "CallExpression[callee.property.name='notDeepStrictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])",
message: 'The first argument should be the `actual`, not the `expected` value.',
},
{
selector: "CallExpression[callee.property.name='notStrictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])",
message: 'The first argument should be the `actual`, not the `expected` value.',
},
{
selector: "CallExpression[callee.property.name='deepStrictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])",
message: 'The first argument should be the `actual`, not the `expected` value.',
},
{
selector: "CallExpression[callee.property.name='strictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])",
message: 'The first argument should be the `actual`, not the `expected` value.',
selector: "CallExpression[callee.name='isNaN']",
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',
Expand All @@ -259,13 +286,16 @@ module.exports = {
'no-unreachable': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'no-unsafe-optional-chaining': 'error',
'no-unused-expressions': ['error', { allowShortCircuit: true }],
'no-unused-labels': 'error',
'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',
Expand All @@ -275,10 +305,15 @@ module.exports = {
'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',
'operator-linebreak': ['error', 'after'],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: 'function', next: 'function' },
],
'prefer-const': ['error', { ignoreReadBeforeAssign: true }],
'quotes': ['error', 'single', { avoidEscape: true }],
'quote-props': ['error', 'consistent'],
Expand All @@ -303,19 +338,32 @@ module.exports = {
'template-curly-spacing': 'error',
'unicode-bom': 'error',
'use-isnan': 'error',
'valid-typeof': 'error',
'valid-typeof': ['error', { requireStringLiterals: true }],

// Custom rules from eslint-plugin-node-core
'node-core/no-unescaped-regexp-dot': 'error',
'node-core/no-duplicate-requires': 'error',
},
globals: {
AbortController: 'readable',
AbortSignal: 'readable',
Atomics: 'readable',
BigInt: 'readable',
BigInt64Array: 'readable',
BigUint64Array: 'readable',
DOMException: 'readable',
Event: 'readable',
EventTarget: 'readable',
MessageChannel: 'readable',
MessageEvent: 'readable',
MessagePort: 'readable',
TextEncoder: 'readable',
TextDecoder: 'readable',
queueMicrotask: 'readable',
globalThis: 'readable',
btoa: 'readable',
atob: 'readable',
performance: 'readable',
structuredClone: 'readable',
},
};
Loading