diff options
author | Claudius Coenen | 2018-11-14 14:10:14 +0100 |
---|---|---|
committer | Claudius Coenen | 2018-11-14 23:15:36 +0100 |
commit | 858a59529e4b99d5c13e6fce8354cd9e9b00a462 (patch) | |
tree | 08e51914a7d6dd00c993c3b7f2481521a1ba6f0e /public/js/index.js | |
parent | f9aa001ee78e604415c2a6e82f65701a1f07d3c4 (diff) |
switching to eslint for code checking
most rules degraded to WARN, so we don't go insane. This will
change over time. The aim is to conform to a common style
Signed-off-by: Claudius Coenen <opensource@amenthes.de>
Diffstat (limited to 'public/js/index.js')
-rw-r--r-- | public/js/index.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js index 98c3b6d2..0c575961 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -2511,7 +2511,9 @@ function buildCursor (user) { // editor actions function removeNullByte (cm, change) { var str = change.text.join('\n') + // eslint-disable-next-line no-control-regex if (/\u0000/g.test(str) && change.update) { + // eslint-disable-next-line no-control-regex change.update(change.from, change.to, str.replace(/\u0000/g, '').split('\n')) } } @@ -3046,7 +3048,7 @@ function checkInCode () { function checkAbove (method) { var cursor = editor.getCursor() var text = [] - for (var i = 0; i < cursor.line; i++) { // contain current line + for (var i = 0; i < cursor.line; i++) { // contain current line text.push(editor.getLine(i)) } text = text.join('\n') + '\n' + editor.getLine(cursor.line).slice(0, cursor.ch) |