eslint 4.13.0 → 4.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/lib/rules/camelcase.js +2 -2
- package/lib/rules/eol-last.js +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
v4.13.1 - December 11, 2017
|
2
|
+
|
3
|
+
* b72dc83 Fix: eol-last allow empty-string to always pass (refs #9534) (#9696) (Kevin Partington)
|
4
|
+
* d80aa7c Fix: camelcase destructure leading/trailing underscore (fixes #9700) (#9701) (Kevin Partington)
|
5
|
+
* d49d9d0 Docs: Add missing period to the README (#9702) (Kevin Partington)
|
6
|
+
* 4564fe0 Chore: no-invalid-meta crash if no export assignment (refs #9534) (#9698) (Kevin Partington)
|
7
|
+
|
1
8
|
v4.13.0 - December 8, 2017
|
2
9
|
|
3
10
|
* 256481b Update: update handling of destructuring in camelcase (fixes #8511) (#9468) (Erin)
|
package/README.md
CHANGED
@@ -239,7 +239,7 @@ Once a language feature has been adopted into the ECMAScript standard (stage 4 a
|
|
239
239
|
|
240
240
|
### Where to ask for help?
|
241
241
|
|
242
|
-
Join our [Mailing List](https://groups.google.com/group/eslint) or [Chatroom](https://gitter.im/eslint/eslint)
|
242
|
+
Join our [Mailing List](https://groups.google.com/group/eslint) or [Chatroom](https://gitter.im/eslint/eslint).
|
243
243
|
|
244
244
|
|
245
245
|
[npm-image]: https://img.shields.io/npm/v/eslint.svg?style=flat-square
|
package/lib/rules/camelcase.js
CHANGED
@@ -109,7 +109,7 @@ module.exports = {
|
|
109
109
|
|
110
110
|
if (node.parent.parent && node.parent.parent.type === "ObjectPattern") {
|
111
111
|
|
112
|
-
if (node.parent.shorthand && node.parent.value.left && isUnderscored(
|
112
|
+
if (node.parent.shorthand && node.parent.value.left && isUnderscored(name)) {
|
113
113
|
|
114
114
|
report(node);
|
115
115
|
}
|
@@ -119,7 +119,7 @@ module.exports = {
|
|
119
119
|
return;
|
120
120
|
}
|
121
121
|
|
122
|
-
if (node.parent.value.name && isUnderscored(
|
122
|
+
if (node.parent.value.name && isUnderscored(name)) {
|
123
123
|
report(node);
|
124
124
|
}
|
125
125
|
}
|
package/lib/rules/eol-last.js
CHANGED
@@ -46,6 +46,14 @@ module.exports = {
|
|
46
46
|
CRLF = `\r${LF}`,
|
47
47
|
endsWithNewline = lodash.endsWith(src, LF);
|
48
48
|
|
49
|
+
/*
|
50
|
+
* Empty source is always valid: No content in file so we don't
|
51
|
+
* need to lint for a newline on the last line of content.
|
52
|
+
*/
|
53
|
+
if (!src.length) {
|
54
|
+
return;
|
55
|
+
}
|
56
|
+
|
49
57
|
let mode = context.options[0] || "always",
|
50
58
|
appendCRLF = false;
|
51
59
|
|