Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-03tools,doc: forbid CJS globals in ESM code snippetsAntoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/38889 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Danielle Adams <adamzdanielle@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-06-01tools: remove exception for Node.js 8 and earlierRich Trott
Remove exception in .eslintrc.js to accommodate versions of Node.js prior to 10.x. 10.x and later all support omitting catch block arguments. PR-URL: https://github.com/nodejs/node/pull/38840 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-04-07tools: relax max-len lint rule for template stringsRich Trott
Splitting template strings across multiple lines can make them harder to read. PR-URL: https://github.com/nodejs/node/pull/38097 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-04-01perf_hooks: make performance a globalJames M Snell
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/37970 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2021-03-28tools: improve valid-typeof lint ruleRich Trott
Require that `typeof` comparisons be to string literals. PR-URL: https://github.com/nodejs/node/pull/37924 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-03-25buffer: expose btoa and atob as globalsJames M Snell
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/37786 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-03-15lib: implement AbortSignal.abort()James M Snell
Refs: https://github.com/whatwg/dom/pull/960 PR-URL: https://github.com/nodejs/node/pull/37693 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-03-06tools: add support for mjs and cjs JS snippet lintingAntoine du Hamel
Refs: https://github.com/nodejs/node/pull/37162 Refs: https://github.com/nodejs/remark-preset-lint-node/pull/176 PR-URL: https://github.com/nodejs/node/pull/37311 Refs: https://github.com/eslint/eslint-plugin-markdown/pull/172 Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-03-03tools: update eslint-plugin-markdown configurationcjihrig
This commit updates the linting setup to work with eslint-plugin-markdown@2.0.0. This also allows the update-eslint script to continue to function properly without changes. PR-URL: https://github.com/nodejs/node/pull/37549 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-02-19tools: make comma-dangle ESLint rule more stringent …Rich Trott
We've been having a lot of nits lately asking people to add trailing commas, so it's probably time to incrementally make the comma-dangle rule more stringent. PR-URL: https://github.com/nodejs/node/pull/37088 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-02-12doc: refactor fs docs structureJames M Snell
* Convert examples to esm to help promote that pattern with users * Make Promises APIs more prominent to help promite that pattern * Separate callback/sync apis into distinct sections to make those more consistent with the Promises api * Improve other bits and pieces Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/37170 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-01-27tools: enable object-curly-newline in ESLint rulesRich Trott
I saw a PR review comment about newlines in desructured assignments, and this would be the rule to enforce these kinds of nits. Start by just enabling the rule. We can incrementally adjust it to be more strict. Refs: https://eslint.org/docs/rules/object-curly-newline Refs: https://github.com/nodejs/node/pull/37028#pullrequestreview-574744497 PR-URL: https://github.com/nodejs/node/pull/37040 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-01-16doc: use ESM syntax for WASI exampleAntoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/36848 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com>
2021-01-16tools: add support for top-level await syntax in linterAntoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/36911 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-12-09tools: enable no-unsafe-optional-chaining lint rulecjihrig
This rule is new in ESLint 7.15.0. PR-URL: https://github.com/nodejs/node/pull/36411 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2020-12-07tools: enable no-unused-expressions lint ruleMichaël Zasso
Fixes: https://github.com/nodejs/node/issues/36246 PR-URL: https://github.com/nodejs/node/pull/36248 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2020-12-07tools: upgrade to @babel/eslint-parser 7.12.1Antoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/36321 Fixes: https://github.com/ensure Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2020-11-23tools: enable no-nonoctal-decimal-escape lint rulecjihrig
This rule is new in ESLint 7.14.0. PR-URL: https://github.com/nodejs/node/pull/36217 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-11lib: add EventTarget-related browser globalsAnna Henningsen
Add - Event - EventTarget - MessagePort - MessageChannel - MessageEvent to the set of global objects, since they are available now and behave like they do in the browser. Fixes: https://github.com/nodejs/node/issues/35495 PR-URL: https://github.com/nodejs/node/pull/35496 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Khaidi Chu <i@2333.moe>
2020-08-29doc: move package config docs to separate pageAntoine du HAMEL
This part of the docs aims to contain documentation regarding package configuration that covers both ESM and CJS realms. * Move Enabling section * Update Enabling section * Remove -u flag * Package scopes do not carry through `node_modules` folders Refs: https://github.com/nodejs/modules/issues/539 Co-authored-by: Geoffrey Booth <webmaster@geoffreybooth.com>> Co-authored-by: Guy Bedford <guybedford@gmail.com> PR-URL: https://github.com/nodejs/node/pull/34748 Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is> Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruy Adorno <ruyadorno@github.com>
2020-08-19doc: move module core module doc to separate pageAntoine du HAMEL
The `module` core module is available for both CJS and ESM users, it deserves its own page. PR-URL: https://github.com/nodejs/node/pull/34747 Refs: https://github.com/nodejs/modules/issues/539 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-05lib: initial experimental AbortController implementationJames M Snell
AbortController impl based very closely on: https://github.com/mysticatea/abort-controller Marked experimental. Not currently used by any of the existing promise apis. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/33527 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-05-30doc: fix urls to avoid redirectionsapics
Replace redirected urls with the final ones. Replace http urls with https ones. PR-URL: https://github.com/nodejs/node/pull/33614 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-05-16tools: enable no-else-return lint ruleLuigi Pinca
Refs: https://github.com/nodejs/node/pull/32644 Refs: https://github.com/nodejs/node/pull/32662 PR-URL: https://github.com/nodejs/node/pull/32667 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-05-10tools: remove obsolete no-restricted-syntax eslint rulesRuben Bridgewater
These rules only apply for the test folder and will already be checked for. PR-URL: https://github.com/nodejs/node/pull/32161 Refs: https://github.com/nodejs/node/pull/32078 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-03-11tools: enable no-useless-backreference lint rulecjihrig
PR-URL: https://github.com/nodejs/node/pull/31400 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-03-11tools: enable default-case-last lint rulecjihrig
PR-URL: https://github.com/nodejs/node/pull/31400 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-01-08lib,tools,test: remove custom number-isnan rulecjihrig
This commit removes the custom number-isnan ESLint rule in favor of the no-restricted-syntax rule. It also applies the rule across the entire codebase, instead of just the test/ directory. PR-URL: https://github.com/nodejs/node/pull/31211 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-11-30tools: enforce blank line between functionsRich Trott
Refs: https://github.com/nodejs/node/pull/21128#discussion_r351606730 PR-URL: https://github.com/nodejs/node/pull/30696 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-11-25tools: enable more eslint rulescjihrig
This commit enables these new in ESLint 6.7.0 rules: - no-constructor-return - no-dupe-else-if - no-setter-return PR-URL: https://github.com/nodejs/node/pull/30598 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-10-14src: implement v8 host weakref hooksGus Caplan
PR-URL: https://github.com/nodejs/node/pull/29874 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-06-11tools: activate more eslint rulesRuben Bridgewater
This activates the following recommended eslint rules: - no-async-promise-executor - no-shadow-restricted-names PR-URL: https://github.com/nodejs/node/pull/27670 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2019-06-11tools: update eslint configRuben Bridgewater
This makes sure the eslint config is up to date for eslint 6.0.0. PR-URL: https://github.com/nodejs/node/pull/27670 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2019-05-24tools: edit .eslintrc.js for minor maintainability improvementsRich Trott
* Add a comment explaining the Module._findPath() hacks so that someone else doesn't do what I do and try to remove them because they seem unnecessary for `make lint` and friends. * Add a trailing comma for consistency with the rest of the file. PR-URL: https://github.com/nodejs/node/pull/27789 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2019-05-20doc: improve createRequire() examplecjihrig
Update the example to use import and import.meta.url instead of require() and require.resolve(). PR-URL: https://github.com/nodejs/node/pull/27762 Fixes: https://github.com/nodejs/node/issues/27758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-05-16tools: update capitalized-comments eslint ruleRuben Bridgewater
The regular expression is updated to ignore variable declarations which might happen while commenting out some code during development and adds a couple more exceptions to prevent false negatives. PR-URL: https://github.com/nodejs/node/pull/27675 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-05-10tools: enable block-scoped-var eslint ruleRoman Reiss
PR-URL: https://github.com/nodejs/node/pull/27616 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-04-27tools: prohibit `assert.doesNotReject()` in Node.js coreRuben Bridgewater
This makes sure we do not use `assert.doesNotReject()` anywhere in our code base. This is just a simple wrapper that catches the rejection and then rejects it again in case of an error. Thus, it is not useful to do that. The error message for `assert.doesNotThrow()` is also improved. PR-URL: https://github.com/nodejs/node/pull/27402 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-06lib: remove `env: node` in eslint config for lib filesJoyee Cheung
This patch removes the redundant `require-globals` custom eslint rule by removing `env: node` in the eslint config and whitelist the globals that can be accessed in native modules instead of black listing them. This makes sense for our `lib/` files because here we are creating the Node.js environment instead of running in a normal user land Node.js environment. PR-URL: https://github.com/nodejs/node/pull/27082 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-27esm: phase two of new esm implementationguybedford
This PR updates the current `--experimental-modules` implementation based on the work of the modules team and reflects Phase 2 of our new modules plan. The largest differences from the current implementation include * `packge.type` which can be either `module` or `commonjs` - `type: "commonjs"`: - `.js` is parsed as commonjs - default for entry point without an extension is commonjs - `type: "module"`: - `.js` is parsed as esm - does not support loading JSON or Native Module by default - default for entry point without an extension is esm * `--entry-type=[mode]` - allows you set the type on entry point. * A new file extension `.cjs`. - this is specifically to support importing commonjs in the `module` mode. - this is only in the esm loader, the commonjs loader remains untouched, but the extension will work in the old loader if you use the full file path. * `--es-module-specifier-resolution=[type]` - options are `explicit` (default) and `node` - by default our loader will not allow for optional extensions in the import, the path for a module must include the extension if there is one - by default our loader will not allow for importing directories that have an index file - developers can use `--es-module-specifier-resolution=node` to enable the commonjs specifier resolution algorithm - This is not a “feature” but rather an implementation for experimentation. It is expected to change before the flag is removed * `--experimental-json-loader` - the only way to import json when `"type": "module"` - when enable all `import 'thing.json'` will go through the experimental loader independent of mode - based on https://github.com/whatwg/html/issues/4315 * You can use `package.main` to set an entry point for a module - the file extensions used in main will be resolved based on the `type` of the module Refs: https://github.com/nodejs/modules/blob/master/doc/plan-for-new-modules-implementation.md Refs: https://github.com/GeoffreyBooth/node-import-file-specifier-resolution-proposal Refs: https://github.com/nodejs/modules/pull/180 Refs: https://github.com/nodejs/ecmascript-modules/pull/6 Refs: https://github.com/nodejs/ecmascript-modules/pull/12 Refs: https://github.com/nodejs/ecmascript-modules/pull/28 Refs: https://github.com/nodejs/modules/issues/255 Refs: https://github.com/whatwg/html/issues/4315 Refs: https://github.com/w3c/webcomponents/issues/770 Co-authored-by: Myles Borins <MylesBorins@google.com> Co-authored-by: John-David Dalton <john.david.dalton@gmail.com> Co-authored-by: Evan Plaice <evanplaice@gmail.com> Co-authored-by: Geoffrey Booth <webmaster@geoffreybooth.com> Co-authored-by: Michaël Zasso <targos@protonmail.com> PR-URL: https://github.com/nodejs/node/pull/26745 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2019-03-27tools: update capitalize-comments eslint ruleRuben Bridgewater
This strictens the rule to apply from 20 characters on instead of from 30. PR-URL: https://github.com/nodejs/node/pull/26849 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2019-03-26tools: enable getter-return lint rulecjihrig
PR-URL: https://github.com/nodejs/node/pull/26615 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-03-22assert: validate required argumentsRuben Bridgewater
This validates most `assert` functions to verify that the required arguments are indeed passed to the function. PR-URL: https://github.com/nodejs/node/pull/26641 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-03-13lib,test: improve faulty assert usage detectionRuben Bridgewater
This improves our custom eslint rules to detect assertions to detect assertions with only a single argument and fixes false negatives in case unary expressions are used. Some rules were extended to also lint our docs and tools and the lib rule was simplified to prohibit most assertion calls. PR-URL: https://github.com/nodejs/node/pull/26569 Refs: https://github.com/nodejs/node/pull/26565 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-03-12lib: move DTRACE_* probes out of global scopeJames M Snell
The DTRACE_* probes have been global for no really good reason. Move those into an internalBinding. PR-URL: https://github.com/nodejs/node/pull/26541 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-10tools: update capitalized-comments ruleRuben Bridgewater
This strictens to rule to validate comments from 30 characters on. PR-URL: https://github.com/nodejs/node/pull/26483 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-02-28benchmark,doc,lib,test: capitalize commentsRuben Bridgewater
This updates a lot of comments. PR-URL: https://github.com/nodejs/node/pull/26223 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-02-04tools: replace deprecated ESLint configurationRich Trott
For `globals`, booleans are deprecated in favor strings `'readable'`/`'writeable'`. PR-URL: https://github.com/nodejs/node/pull/25877 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
2019-01-29tools: make trailing commas consistent in .eslintrcRich Trott
.eslintrc has lots of trailing commas and lots of places where there aren't trailing commas. Use trailing commas throughout the files for consistency. PR-URL: https://github.com/nodejs/node/pull/25739 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2018-12-29tools: enable no-useless-catch lint rulecjihrig
This commit enables ESLint's no-useless-catch rule. PR-URL: https://github.com/nodejs/node/pull/25236 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>