Skip to content

Commit

Permalink
Address outstanding lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Alhadis committed Oct 5, 2018
1 parent bdfe576 commit 4cdecd8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lib/index.js
test/mocha.js
test/*.mjs
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,8 @@
},{
"files": ["lib/**/*.mjs"],
"rules": {"indent": 0}
},{
"files": ["lib/adapters/utils.mjs"],
"rules": {"quotes": 0}
}]
}
3 changes: 1 addition & 2 deletions lib/postproc/canvas/renderer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -625,11 +625,10 @@ export default class TroffCanvasRenderer extends Postprocessor{
data = data.map(a => Math.round(a / 257));
return `rgb(${ data.join() })`;

/** FIXME: Look into this and decide if the fall-through
is deliberate (and if so, WHY?!) */
// Greyscale
case "G": // Legacy `Df` command
data = [Math.round((1 - data[0] / 1000) * 65536)];
// Fall-through
case "g":
data = new Array(3).fill(Math.round(data[0] / 257));
return `rgb(${ data.join() })`;
Expand Down
2 changes: 1 addition & 1 deletion lib/postproc/tables/symbol-maps.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default {
"ζ": 122,
"∼": 126,
"€": 160,
"Υ": 161,
"ϒ": 161,
"′": 162,
"≤": 163,
"⁄": 164,
Expand Down
2 changes: 1 addition & 1 deletion lib/postproc/tty/viewer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export default class TTYViewer {
*/
on(eventName, handler){
if("function" !== typeof handler)
throw new TypeError(`[TTYViewer::on] Handler is not a function`);
throw new TypeError("[TTYViewer::on] Handler is not a function");

const handlers = this.listeners.get(eventName);
if(!Array.isArray(handlers))
Expand Down

0 comments on commit 4cdecd8

Please sign in to comment.