eslint 2.13.0 → 2.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
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
v2.13.1 - June 20, 2016
|
2
|
+
|
3
|
+
* 434de7f Fix: wrong baseDir (fixes #6450) (#6457) (Toru Nagashima)
|
4
|
+
* 3c9ce09 Fix: Keep indentation when fixing `padded-blocks` "never" (fixes #6454) (#6456) (Ed Lee)
|
5
|
+
* a9d4cb2 Docs: Fix typo in max-params examples (#6471) (J. William Ashton)
|
6
|
+
* 1e185b9 Fix: no-multiple-empty-lines errors when no line breaks (fixes #6449) (#6451) (strawbrary)
|
7
|
+
|
1
8
|
v2.13.0 - June 17, 2016
|
2
9
|
|
3
10
|
* cf223dd Fix: add test for a syntax error (fixes #6013) (#6378) (Toru Nagashima)
|
@@ -495,7 +495,6 @@ function resolve(filePath, relativeTo) {
|
|
495
495
|
function load(filePath, applyEnvironments, relativeTo) {
|
496
496
|
var resolvedPath = resolve(filePath, relativeTo),
|
497
497
|
dirname = path.dirname(resolvedPath.filePath),
|
498
|
-
basedir = getBaseDir(dirname),
|
499
498
|
lookupPath = getLookupPath(dirname),
|
500
499
|
config = loadConfigFile(resolvedPath);
|
501
500
|
|
@@ -514,7 +513,7 @@ function load(filePath, applyEnvironments, relativeTo) {
|
|
514
513
|
// include full path of parser if present
|
515
514
|
if (config.parser) {
|
516
515
|
if (isFilePath(config.parser)) {
|
517
|
-
config.parser = path.resolve(
|
516
|
+
config.parser = path.resolve(dirname || "", config.parser);
|
518
517
|
} else {
|
519
518
|
config.parser = resolver.resolve(config.parser, lookupPath);
|
520
519
|
}
|
@@ -528,7 +527,7 @@ function load(filePath, applyEnvironments, relativeTo) {
|
|
528
527
|
* a "parent". Load the referenced file and merge the configuration recursively.
|
529
528
|
*/
|
530
529
|
if (config.extends) {
|
531
|
-
config = applyExtends(config, filePath,
|
530
|
+
config = applyExtends(config, filePath, dirname);
|
532
531
|
}
|
533
532
|
|
534
533
|
if (config.env && applyEnvironments) {
|
@@ -78,7 +78,7 @@ module.exports = {
|
|
78
78
|
|
79
79
|
"Program:exit": function checkBlankLines(node) {
|
80
80
|
var lines = sourceCode.lines,
|
81
|
-
fullLines = sourceCode.text.match(/.*(\r\n|\r|\n|\u2028|\u2029)/g),
|
81
|
+
fullLines = sourceCode.text.match(/.*(\r\n|\r|\n|\u2028|\u2029)/g) || [],
|
82
82
|
firstNonBlankLine = -1,
|
83
83
|
trimmedLines = [],
|
84
84
|
linesRangeStart = [],
|
@@ -190,7 +190,7 @@ module.exports = {
|
|
190
190
|
node: node,
|
191
191
|
loc: { line: openBrace.loc.start.line, column: openBrace.loc.start.column },
|
192
192
|
fix: function(fixer) {
|
193
|
-
return fixer.replaceTextRange([openBrace.end, nextToken.start], "\n");
|
193
|
+
return fixer.replaceTextRange([openBrace.end, nextToken.start - nextToken.loc.start.column], "\n");
|
194
194
|
},
|
195
195
|
message: NEVER_MESSAGE
|
196
196
|
});
|
@@ -204,7 +204,7 @@ module.exports = {
|
|
204
204
|
loc: {line: closeBrace.loc.end.line, column: closeBrace.loc.end.column - 1 },
|
205
205
|
message: NEVER_MESSAGE,
|
206
206
|
fix: function(fixer) {
|
207
|
-
return fixer.replaceTextRange([previousToken.end, closeBrace.start], "\n");
|
207
|
+
return fixer.replaceTextRange([previousToken.end, closeBrace.start - closeBrace.loc.start.column], "\n");
|
208
208
|
}
|
209
209
|
});
|
210
210
|
}
|