You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The most important change in 10.0.0 is that **using deprecated Node.js APIs is now
19
+
considered an error**. It's finally time to update those dusty old APIs!
20
+
21
+
Deprecated APIs are problematic because they may print warning messages in the
22
+
console in recent versions of Node.js. This often confuses users and leads to
23
+
unecessary support tickets for project maintainers.
24
+
25
+
Some deprecated APIs are even insecure (or at least prone to incorrect usage) which
26
+
can have serious security implications. For that reason, `standard` now prevents
27
+
usage of `Buffer(num)` or `new Buffer(num)` since these functions return uninitialized
28
+
program memory which could contain private user information, secret keys, etc.
29
+
Instead of `Buffer(num)` use the new `Buffer.alloc(num)` or `Buffer.from(obj)`
30
+
functions which make programmer intent clearer and work in all currently supported
31
+
versions of Node.js, including Node.js 4.x. For more background,
32
+
[see this Node.js issue](https://github.com/nodejs/node/issues/4660).
33
+
34
+
We also improved some rules to support common patterns in codebases that use React,
35
+
JSX, and Flow.
36
+
37
+
When you upgrade, consider running `standard --fix` to automatically fix some of
38
+
the issues caught by this new version.
9
39
10
40
### New features
11
41
12
-
- Update ESLint from 3.15.x to 3.18.x.
42
+
- Update ESLint from 3.15.x to 3.19.x.
43
+
- Node.js API: Add `standard.lintTextSync` method
13
44
14
45
### New rules
15
46
@@ -19,15 +50,16 @@ TODO: FINALIZE RELEASE NOTES
19
50
- Ensures that code always runs without warnings on the lastest versions of Node
20
51
- Ensures that safe Buffer methods (`Buffer.from()`, `Buffer.alloc()`) are used instead of `Buffer()`
21
52
- Enforce callbacks always called with Node.js-style error first ([standard/no-callback-literal](https://github.com/xjamundx/eslint-plugin-standard#rules-explanations)) [#623](https://github.com/feross/standard/issues/623) (3%)
22
-
- Functions named `callback`, `cb`, or `next` must be called with `null`, `undefined`, or an `Error` object as the first argument
23
-
-Prevents accidentally using a string instead of an `Error` object
24
-
-Prevents confusing callbacks that do not follow the Node.js pattern
53
+
- Functions named `callback`or `cb` must be invoked with `null`, `undefined`, or an `Error` as the first argument
54
+
-Disallows using a string instead of an `Error` object
55
+
-Disallows confusing callbacks that do not follow the standard Node.js pattern
25
56
- Disallow any imports that come after non-import statements ([import/first](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md)) [#806](https://github.com/feross/standard/issues/806) (1%)
0 commit comments