Skip to content

Commit

Permalink
Add lineNumber in the error eslint.
Browse files Browse the repository at this point in the history
  • Loading branch information
angelozerr committed Dec 17, 2015
1 parent 9b5c6da commit f353663
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion eslint.js
Expand Up @@ -329,7 +329,8 @@
message: message.message,
severity: getSeverity(message),
from: tern.outputPos(query, file, from),
to: tern.outputPos(query, file, to)
to: tern.outputPos(query, file, to),
lineNumber: message.line
}
if (message.ruleId) error.id = message.ruleId;
if (!query.groupByFiles) error.file = file.name;
Expand Down
3 changes: 2 additions & 1 deletion test/issues.js
Expand Up @@ -8,7 +8,8 @@ exports['test issue3'] = function() {
"message" : "Parsing error: Illegal import declaration",
"severity" : "error",
"from" : 1,
"to" : 2,
"to" : 2,
"lineNumber": 1,
"file": "test1.js"}
]
}, [ "browser" ]);
Expand Down
7 changes: 5 additions & 2 deletions test/validate_default.js
Expand Up @@ -9,6 +9,7 @@ exports['test never used'] = function() {
"severity" : "error",
"from" : 4,
"to" : 5,
"lineNumber": 1,
"id": "no-unused-vars",
"file": "test1.js"}
]
Expand All @@ -23,7 +24,8 @@ exports['test var'] = function() {
"message" : "Parsing error: Unexpected end of input",
"severity" : "error",
"from" : 2,
"to" : 3,
"to" : 3,
"lineNumber": 1,
"file": "test1.js"}
]
}, [ "browser" ]);
Expand All @@ -38,7 +40,8 @@ exports['test import'] = function() {
"message" : "Parsing error: Illegal import declaration",
"severity" : "error",
"from" : 1,
"to" : 2,
"to" : 2,
"lineNumber": 1,
"file": "test1.js"}
]
}, [ "browser" ]);
Expand Down

0 comments on commit f353663

Please sign in to comment.