diff --git a/.eslintrc.json b/.eslintrc.json index 53bd1287..fbe0b672 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -28,5 +28,8 @@ ], "comma-dangle": 0, "no-trailing-spaces" :"warn" + }, + "parserOptions": { + "ecmaVersion": 2020 } } \ No newline at end of file diff --git a/core/ansi_escape_parser.js b/core/ansi_escape_parser.js index 73c4f377..c8101267 100644 --- a/core/ansi_escape_parser.js +++ b/core/ansi_escape_parser.js @@ -24,7 +24,7 @@ function ANSIEscapeParser(options) { this.scrollBack = 0; this.graphicRendition = {}; - if(!_.isNil(options.startRow)) { + if(!_.isNil(options?.startRow)) { this.row = options.startRow; } else { diff --git a/core/menu_module.js b/core/menu_module.js index 94331e6d..7669c2ee 100644 --- a/core/menu_module.js +++ b/core/menu_module.js @@ -105,7 +105,7 @@ exports.MenuModule = class MenuModule extends PluginModule { const options = self.menuConfig.config; - if(!_.isNil(artData) && _.isNumber(artData.height)) { + if(_.isNumber(artData?.height)) { options.startRow = artData.height + 1; } diff --git a/core/theme.js b/core/theme.js index 52ce243c..7b6d7940 100644 --- a/core/theme.js +++ b/core/theme.js @@ -585,7 +585,7 @@ function displayThemedPrompt(name, client, options, cb) { return callback(null, promptConfig, artInfo); } - if(!_.isNil(options) && !_.isNil(options.position) && !_.isNil(options.position.row)) { + if(!_.isNil(options?.position?.row)) { artInfo.startRow = options.position.row; if(client.term.termHeight > 0 && artInfo.startRow + artInfo.height > client.term.termHeight) { // in this case, we will have scrolled diff --git a/package.json b/package.json index c828edc4..b577acce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "enigma-bbs", - "version": "0.0.12-beta", + "version": "0.0.14-beta", "description": "ENiGMA½ Bulletin Board System", "author": "Bryan Ashby ", "license": "BSD-2-Clause", @@ -62,9 +62,9 @@ "yazl": "^2.5.1" }, "devDependencies": { - "eslint": "7.19.0" + "eslint": "8.12.0" }, "engines": { - "node": ">=12" + "node": ">=14" } }