Skip to content

Commit f642dc3

Browse files
committed
Docs: update no-deprecated-api.md
1 parent 1e0d9da commit f642dc3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/rules/no-deprecated-api.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ The following patterns are considered problems:
1111
/*eslint no-deprecated-api: 2*/
1212

1313
var fs = require("fs");
14-
1514
fs.exists("./foo.js", function() {}); /*ERROR: 'fs.exists' was deprecated since v4. Use 'fs.stat()' or 'fs.access()' instead.*/
1615

17-
// And other deprecated API...
16+
// Also, it can report the following patterns.
17+
var exists = require("fs").exists; /*ERROR: 'fs.exists' was deprecated since v4. Use 'fs.stat()' or 'fs.access()' instead.*/
18+
const {exists} = require("fs"); /*ERROR: 'fs.exists' was deprecated since v4. Use 'fs.stat()' or 'fs.access()' instead.*/
19+
20+
21+
// And other deprecated API below.
1822
```
1923

2024
This rule reports the following deprecated API.

0 commit comments

Comments
 (0)