Add eslintignore and adhere or be ignored

cpsdqs/unified-input
cpsdqs 7 years ago
parent 87ed5491a4
commit f059a35277
Signed by untrusted user: cpsdqs
GPG Key ID: 3F59586BB7448DD1
  1. 9
      .eslintignore
  2. 2
      jssrc/term_input.js
  3. 32
      jssrc/term_screen.js
  4. 2
      jssrc/utils.js

@ -0,0 +1,9 @@
# possibly minified output
js
out
# libraries
jssrc/lib
# php generated file
jssrc/lang.js

@ -228,7 +228,7 @@ window.Input = (function () {
// Mouse events
onMouseMove: function (x, y) {
if (!opts.mt_move) return
const b = mb1 ? 1 : mb2 ? 2 : mb3 ? 3 : 0;
const b = mb1 ? 1 : mb2 ? 2 : mb3 ? 3 : 0
const m = packModifiersForMouse()
Conn.send('m' + encode2B(y) + encode2B(x) + encode2B(b) + encode2B(m))
},

@ -47,26 +47,22 @@ const themes = [
// should not be used to look up 0-15 (will return transparent)
const colorTable256 = new Array(16).fill('rgba(0, 0, 0, 0)')
{
// fill color table
// colors 16-231 are a 6x6x6 color cube
for (let red = 0; red < 6; red++) {
for (let green = 0; green < 6; green++) {
for (let blue = 0; blue < 6; blue++) {
let redValue = red * 40 + (red ? 55 : 0)
let greenValue = green * 40 + (green ? 55 : 0)
let blueValue = blue * 40 + (blue ? 55 : 0)
colorTable256.push(`rgb(${redValue}, ${greenValue}, ${blueValue})`)
}
// fill color table
// colors 16-231 are a 6x6x6 color cube
for (let red = 0; red < 6; red++) {
for (let green = 0; green < 6; green++) {
for (let blue = 0; blue < 6; blue++) {
let redValue = red * 40 + (red ? 55 : 0)
let greenValue = green * 40 + (green ? 55 : 0)
let blueValue = blue * 40 + (blue ? 55 : 0)
colorTable256.push(`rgb(${redValue}, ${greenValue}, ${blueValue})`)
}
}
// colors 232-255 are a grayscale ramp, sans black and white
for (let gray = 0; gray < 24; gray++) {
let value = gray * 10 + 8
colorTable256.push(`rgb(${value}, ${value}, ${value})`)
}
}
// colors 232-255 are a grayscale ramp, sans black and white
for (let gray = 0; gray < 24; gray++) {
let value = gray * 10 + 8
colorTable256.push(`rgb(${value}, ${value}, ${value})`)
}
class TermScreen {

@ -48,7 +48,7 @@ function extend (defaults, options) {
/** Escape string for use as literal in RegExp */
function rgxe (str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&')
return str.replace(/[-[\]/{}()*+?.\\^$|]/g, '\\$&')
}
/** Format number to N decimal places, output as string */

Loading…
Cancel
Save