Skip to content

Commit

Permalink
💥 update no-deprecated-api for Node 12
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed May 2, 2019
1 parent c9b69ed commit 7e0c2c5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/rules/no-deprecated-api.md
Expand Up @@ -23,7 +23,8 @@ const {exists} = require("fs"); /*ERROR: 'fs.exists' was deprecated since

This rule reports the following deprecated API.

- _linklist (undocumented)
- [_linklist](https://nodejs.org/docs/v8.0.0/api/deprecations.html#deprecations_dep0002_require_linklist)
- [_stream_wrap](https://nodejs.org/docs/v12.0.0/api/deprecations.html#deprecations_dep0125_require_stream_wrap)
- assert
- [deepEqual](https://nodejs.org/dist/v10.0.0/docs/api/assert.html#assert_assert_deepequal_actual_expected_message)
- [equal](https://nodejs.org/dist/v10.0.0/docs/api/assert.html#assert_assert_equal_actual_expected_message)
Expand Down Expand Up @@ -74,6 +75,8 @@ This rule reports the following deprecated API.
- module
- `requireRepl` (undocumented)
- [_debug](https://nodejs.org/dist/v9.0.0/docs/api/deprecations.html#deprecations_dep0077_module_debug)
- net
- [_setSimultaneousAccepts](https://nodejs.org/docs/v12.0.0/api/deprecations.html#deprecations_dep0121_net_setsimultaneousaccepts)
- os
- `tmpDir` (undocumented)
- `getNetworkInterfaces` (undocumented)
Expand Down Expand Up @@ -162,6 +165,7 @@ This rule ignores APIs that `ignoreModuleItems` includes.
This option can include the following values:

- `_linklist`
- `_stream_wrap`
- `assert.deepEqual`
- `assert.equal`
- `assert.notDeepEqual`
Expand Down Expand Up @@ -197,12 +201,14 @@ This option can include the following values:
- `module.requireRepl`
- `module.Module._debug`
- `module._debug`
- `net._setSimultaneousAccepts`
- `os.tmpDir`
- `path._makeLong`
- `process.EventEmitter`
- `process.assert`
- `process.binding`
- `process.env.NODE_REPL_HISTORY_FILE`
- `process.report.triggerReport`
- `punycode`
- `readline.codePointAt`
- `readline.getStringWidth`
Expand Down
17 changes: 17 additions & 0 deletions lib/rules/no-deprecated-api.js
Expand Up @@ -11,6 +11,10 @@ const modules = {
_linklist: {
[READ]: { since: "5.0.0", replacedBy: null },
},
//eslint-disable-next-line camelcase
_stream_wrap: {
[READ]: { since: "12.0.0", replacedBy: null },
},
assert: {
deepEqual: {
[READ]: {
Expand Down Expand Up @@ -189,6 +193,11 @@ const modules = {
[READ]: { since: "9.0.0", replacedBy: null },
},
},
net: {
_setSimultaneousAccepts: {
[READ]: { since: "12.0.0", replacedBy: null },
},
},
os: {
getNetworkInterfaces: {
[READ]: { since: "0.6.0", replacedBy: "'os.networkInterfaces()'" },
Expand Down Expand Up @@ -217,6 +226,14 @@ const modules = {
[READ]: { since: "4.0.0", replacedBy: "'NODE_REPL_HISTORY'" },
},
},
report: {
triggerReport: {
[READ]: {
since: "11.12.0",
replacedBy: "'process.report.writeReport()'",
},
},
},
},
punycode: {
[READ]: {
Expand Down

0 comments on commit 7e0c2c5

Please sign in to comment.