Skip to content
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.

Commit

Permalink
Add support for message severities
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jun 8, 2016
1 parent 383296f commit 2da0000
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ var alex;

var config = atom.config;

/*
* Message levels.
*/

var map = {
'0': 'info',
'1': 'warning',
'2': 'error',
'undefined': 'warning'
};

/**
* Activate.
*/
Expand Down Expand Up @@ -80,7 +91,7 @@ function linter() {
*/
function transform(message) {
return {
'type': 'Error',
'type': map[message.profanitySeverity] || map.undefined,
'html': toHTML(message.reason),
'filePath': this.getPath(),
'range': toRange(message.location)
Expand Down

0 comments on commit 2da0000

Please sign in to comment.