summaryrefslogtreecommitdiff
path: root/.eslintrc.js
AgeCommit message (Collapse)Author
2018-09-24tools: .eslintrc.js messages "default" typo styleLovingly
"Default" typo pattern for .eslintrc.js messages * all methods and syntax keywords between backticks * written numbers * moving /* eslint-disable max-len */ * Error object backtick PR-URL: https://github.com/nodejs/node/pull/22868 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-09-23lib: implement queueMicrotaskGus Caplan
PR-URL: https://github.com/nodejs/node/pull/22951 Refs: https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-09-18tools: synchronize deepStrictEqual() message rulesRich Trott
Update ESLint config to include a rule about assert.deepStrictEqual() messages and string literals. The rule is included in lib and test, but should be included everywhere else as well. PR-URL: https://github.com/nodejs/node/pull/22887 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-09-17util: make TextEncoder/TextDecoder globalJames M Snell
Fixes: https://github.com/nodejs/node/issues/20365 PR-URL: https://github.com/nodejs/node/pull/22281 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-09-16tools: prevent string literals in some assertionsRich Trott
String literals provided as the third argument to assert.strictEqual() or assert.deepStrictEqual() will mask the values that are causing issues. Use a lint rule to prevent such usage. PR-URL: https://github.com/nodejs/node/pull/22849 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-08-18tools: simplify ESLint invocation in MakefileRich Trott
Makefile currently enforces .eslintrc.js linting on the command line but it is already enforced in the .estlintignore file. This also simplifies an arguably-related comment in .estlinrc.js. PR-URL: https://github.com/nodejs/node/pull/22348 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-12tools: add no-misleading-character-class ESLint ruleVse Mozhet Byt
Refs: https://eslint.org/docs/rules/no-misleading-character-class PR-URL: https://github.com/nodejs/node/pull/22278 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: Colin Ihrig <cjihrig@gmail.com>
2018-07-12tools: add no-duplicate-requires ruleGus Caplan
PR-URL: https://github.com/nodejs/node/pull/21712 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-07-06tools: lint doc code examples in strict modeVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/21615 Refs: https://github.com/eslint/eslint-plugin-markdown#strict Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-21tools: fix typo in .eslintrc.jsChristopher Hiller
Refs: https://github.com/nodejs/node/pull/18566 PR-URL: https://github.com/nodejs/node/pull/21449 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-21atomis: add notify aliasGus Caplan
PR-URL: https://github.com/nodejs/node/pull/21413 Refs: https://github.com/nodejs/node/issues/21219 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-17tools: do not disable `quotes` rule in .eslintrc.jsRich Trott
Re-enable `quotes` rule in .eslintrc.js and fix code to abide by the rule. As a bonus, this makes the code (IMO, anyway) more readable. (It certainly isn't *less* readable, at least not IMO.) PR-URL: https://github.com/nodejs/node/pull/21338 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-14tools: add BigInt64Array and BigUint64Array to globalsJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/21255 Refs: https://github.com/nodejs/node/pull/21237 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-06-10tools: add BigInt to globalsNikolai Vavilov
PR-URL: https://github.com/nodejs/node/pull/21237 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-16tools: add eslintrc rule for `assert.rejects`Ruben Bridgewater
This makes sure `assert.rejects` is always called with a second argument. Besides that it is also changes a eslint error message to suggest objects instead of a regular expression. PR-URL: https://github.com/nodejs/node/pull/19885 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-13tools: stricter no-undef eslint ruleRuben Bridgewater
By default eslint does not validate variables that are placed in a typeof check. PR-URL: https://github.com/nodejs/node/pull/19926 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-01tools: add 'spaced-comment' into eslint rulesWeijia Wang
PR-URL: https://github.com/nodejs/node/pull/19596 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-03-21tools,lib: forbid native Error constructorsMichaël Zasso
This adds a rule that forbids the use of native Error constructors in the `lib` directory. This is to encourage use of the `internal/errors` mechanism. The rule is disabled for errors that are not created with the `internal/errors` module but are still assigned an error code. PR-URL: https://github.com/nodejs/node/pull/19373 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-07tools: enable ESLint quote-props ruleRich Trott
Refs: https://github.com/nodejs/node/pull/19100#discussion_r171993685 PR-URL: https://github.com/nodejs/node/pull/19156 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Roman Reiss <me@silverwind.io>
2018-03-06src: move internal loaders out of bootstrap_node.jsJoyee Cheung
- Moves the creation of `process.binding()`, `process._linkedBinding()` `internalBinding()` and `NativeModule` into a separate file `lib/internal/bootstrap_loaders.js`, and documents them there. This file will be compiled and run before `bootstrap_node.js`, which means we now bootstrap the internal module & binding system before actually bootstrapping Node.js. - Rename the special ID that can be used to require `NativeModule` as `internal/bootstrap_loaders` since it is setup there. Also put `internalBinding` in the object exported by `NativeModule.require` instead of putting it inside the `NativeModule.wrapper` - Use the original `getBinding()` to get the source code of native modules instead of getting it from `process.binding('native')` so that users cannot fake native modules by modifying the binding object. - Names the bootstrapping functions so their names show up in the stack trace. PR-URL: https://github.com/nodejs/node/pull/19112 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2018-03-05tools: alphabetize ESLint rulesRich Trott
I have never found it useful that the ESLint rules (in the configuration file) are organized by the categorization the rules are given in the ESLint documentation. It has only been a source of annoyance as one has to look up where the rule is in the docs to figure out where it should go in the configuration file. This change re-orders the rules so they are in alphabetical order. Simple! PR-URL: https://github.com/nodejs/node/pull/19100 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-01src: Remove lttng support.Glen Keane
This cleans up and removes lttng support completely. Recent discussion on a PR to deprecate lttng suggested that we remove it completely pending feedback from the TSC. This should be considered a non breaking change, as a recent PR reveals that compiling with this system has been broken for nearly two years. Refs: https://github.com/nodejs/node/issues/18971 Refs: https://github.com/nodejs/node/pull/18975 Refs: https://github.com/nodejs/node/pull/18945 PR-URL: https://github.com/nodejs/node/pull/18982 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jackson Tian <shyvo1987@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-22tools: update eslint ruleRuben Bridgewater
The former notation was deprecated. This updates it as recommended. PR-URL: https://github.com/nodejs/node/pull/18831 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-22tools: enable eslint one-var ruleRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/18831 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-22tools: enable eslint no-whitespace-before-property ruleRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/18831 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-22tools: enable eslint strict key-spacingRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/18831 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-22tools: enable eslint no-undef-init ruleRuben Bridgewater
This also fixes the three entries that did not pass. PR-URL: https://github.com/nodejs/node/pull/18831 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-22tools: add falsely removed eslint rulesRuben Bridgewater
This adds the eslint rules back in that were falsely removed while landing https://github.com/nodejs/node/pull/18566. PR-URL: https://github.com/nodejs/node/pull/18933 Refs: https://github.com/nodejs/node/pull/18566 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-20lint: move eslint to new plugin systemGus Caplan
PR-URL: https://github.com/nodejs/node/pull/18566 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>