Commit Graph

35 Commits

Author SHA1 Message Date
Antoine du Hamel
987740399d
tools: enforce trailing commas in test/es-module
PR-URL: https://github.com/nodejs/node/pull/60891
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-12-03 14:18:40 +01:00
Antoine du Hamel
441027af47
tools: enforce trailing commas in test/sequential
PR-URL: https://github.com/nodejs/node/pull/60892
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2025-12-03 14:17:37 +01:00
René
209a4fe812
test: lint more assert(regexp.test(...)) cases
PR-URL: https://github.com/nodejs/node/pull/60878
Refs: https://github.com/nodejs/node/pull/60832
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-30 18:39:38 +00:00
Antoine du Hamel
634dc26605
test: ensure assertions are reached on all tests
PR-URL: https://github.com/nodejs/node/pull/60845
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-11-27 09:35:25 +00:00
Antoine du Hamel
4451309e99
test: add lint rule to forbid use of assert.ok(/regex/.test(…))
PR-URL: https://github.com/nodejs/node/pull/60832
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-11-25 21:25:47 +01:00
Antoine du Hamel
fc203b36f4
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60763
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2025-11-24 23:51:26 +01:00
Antoine du Hamel
4a4fdcf390
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60761
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-24 23:47:52 +01:00
Antoine du Hamel
411ce7ed2e
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60760
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-24 22:44:48 +00:00
Antoine du Hamel
d539d6e99f
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60759
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-24 22:36:53 +00:00
Antoine du Hamel
17fba608ae
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60726
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-11-17 22:10:40 +01:00
Antoine du Hamel
ecbc22dc37
test: ensure assertions are reached on HTTP2 tests
PR-URL: https://github.com/nodejs/node/pull/60730
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-17 21:34:43 +01:00
Antoine du Hamel
42187494d3
test: ensure assertions are reached on HTTP tests
PR-URL: https://github.com/nodejs/node/pull/60729
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-17 20:12:12 +00:00
Antoine du Hamel
ef6b8cc3c3
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60728
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-11-17 17:10:24 +00:00
Antoine du Hamel
2856475f3e
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60634
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-15 13:16:37 +00:00
Antoine du Hamel
f1f6f3df84
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60641
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-11-11 09:56:18 +00:00
Antoine du Hamel
572cc6fa55
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60498
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-11-07 16:22:01 +00:00
Antoine du Hamel
5f77aebdfb
test: ensure assertions are reachable in test/es-module
PR-URL: https://github.com/nodejs/node/pull/60501
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-11-07 09:24:01 +01:00
Antoine du Hamel
e72761fe5e
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60485
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-06 09:47:01 +01:00
Antoine du Hamel
761d4f45af
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60500
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2025-11-06 08:41:55 +00:00
Antoine du Hamel
dbe45b767b
test: ensure assertions are reachable in test/internet
PR-URL: https://github.com/nodejs/node/pull/60513
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-11-02 14:35:09 +00:00
Antoine du Hamel
646e19e2b4
test: ensure assertions are reachable in test/sequential
PR-URL: https://github.com/nodejs/node/pull/60412
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-10-29 16:29:39 +01:00
Antoine du Hamel
53e325ffd0
test: ensure assertions are reachable in more folders
PR-URL: https://github.com/nodejs/node/pull/60411
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-10-29 15:16:59 +00:00
Antoine du Hamel
ba7cdf4a92
test: ensure assertions are reachable in test/addons
PR-URL: https://github.com/nodejs/node/pull/60142
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-10-25 20:44:28 +02:00
Antoine du Hamel
da9cd745c8
test: ensure assertions are reachable in test/client-proxy
PR-URL: https://github.com/nodejs/node/pull/60175
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-10-12 20:43:10 +00:00
Antoine du Hamel
bfc81ca228
test: ensure assertions are reachable in test/async-hooks
PR-URL: https://github.com/nodejs/node/pull/60150
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-10-09 21:57:24 +00:00
Antoine du Hamel
ec26b1c01a
tools: add lint rule to ensure assertions are reached
PR-URL: https://github.com/nodejs/node/pull/60125
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-10-07 12:40:05 +00:00
Richie Bendall
663554abdf
lib: expose global ErrorEvent
PR-URL: https://github.com/nodejs/node/pull/58920
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2025-08-18 08:14:54 +00:00
Anna Henningsen
4b289d047d
test: expand linting rules around assert w literal messages
Expands the existing restrictions around not using literal messages
to the `not` variants of `strictEqual` and `deepStrictEqual`, and
forbids `assert()` where the second argument is a non-string literal,
which almost always is a mis-typed `assert.strictEquals()`.

PR-URL: https://github.com/nodejs/node/pull/59147
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-07-23 16:28:06 +00:00
Antoine du Hamel
48fff6baf8
tools,test: enforce best practices to detect never settling promises
PR-URL: https://github.com/nodejs/node/pull/58992
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-07-16 10:57:22 +02:00
Antoine du Hamel
0d910706ef
tools: enable linter on some fixtures file
PR-URL: https://github.com/nodejs/node/pull/57674
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-04-01 10:36:12 +02:00
Michaël Zasso
27f98c3cd1
tools: import rather than require ESLint plugins
Refs: https://github.com/nodejs/node/pull/57314
PR-URL: https://github.com/nodejs/node/pull/57315
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-03-07 14:52:52 +00:00
Michaël Zasso
94c8178442
tools: move ESLint tools to tools/eslint
With ESLint flat config, we don't need a hack with `node_modules`
anymore to load ESLint plugins.
This commit moves the node-core plugin out of `tools/node_modules` and
creates a new `tools/eslint` directory to store ESLint tools.

PR-URL: https://github.com/nodejs/node/pull/53393
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-06-11 06:58:51 +00:00
Khafra
6ed93b4d69
lib: expose global CloseEvent
This PR adds `CloseEvent` as a global, which can be disabled
via the --no-experimental-websocket flag.

```js
const ws = new WebSocket('...')

ws.addEventListener('close', (event) => {
  assert(event instanceof CloseEvent)
})

```

Fixes: https://github.com/nodejs/node/issues/50275
PR-URL: https://github.com/nodejs/node/pull/53355
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-06-07 17:54:28 +00:00
Zihong Qu
74dff83fad
tools: move webcrypto into no-restricted-properties
Since eslint fixed https://github.com/eslint/eslint/issues/16412 and we
are on eslint v8.57.0 so that we can take advantage of
no-restricted-properties rule for webcrypto.

PR-URL: https://github.com/nodejs/node/pull/53023
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-05-30 20:55:02 +00:00
Michaël Zasso
7e6d92c485
tools: update ESLint to v9 and use flat config
Closes: https://github.com/nodejs/node/issues/52567
PR-URL: https://github.com/nodejs/node/pull/52780
Fixes: https://github.com/nodejs/node/issues/52567
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-05-23 19:45:18 +00:00