From d7a85a61efd876afa36ba81cf5defc75c8010191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= Date: Mon, 28 Dec 2020 13:19:17 +0000 Subject: [PATCH] feat: major bump and added ts eslint support --- lib/general/stack_trace.js | 2 +- package.json | 25 ++++++++++++++----------- types/.eslintrc.js | 5 +++++ 3 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 types/.eslintrc.js diff --git a/lib/general/stack_trace.js b/lib/general/stack_trace.js index 9d06aca..583e327 100644 --- a/lib/general/stack_trace.js +++ b/lib/general/stack_trace.js @@ -49,7 +49,7 @@ StackTrace.getStackTrace = function(completeStack) { var result = []; try { - // tries to acess an attribute in an undefined value to raise an exception + // tries to access an attribute in an undefined value to raise an exception // eslint-disable-next-line no-unused-expressions,no-undef invalid.invalid; } catch (exception) { diff --git a/package.json b/package.json index db4d1ad..8f6c21a 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ }, "license": "Apache-2.0", "author": "Hive Solutions", + "main": "index.js", "types": "types/index.d.ts", "typings": "types/index.d.ts", "files": [ @@ -28,7 +29,6 @@ "test/**/*.js", "types/**/*.d.ts" ], - "main": "index.js", "scripts": { "build": "gulp build", "docs": "gulp docs", @@ -42,25 +42,28 @@ "watch": "gulp watch" }, "devDependencies": { - "eslint": "^6.6.0", - "eslint-config-hive": "^0.2.0", + "@typescript-eslint/eslint-plugin": "^4.11.0", + "@typescript-eslint/parser": "^4.11.0", + "eslint": "^7.16.0", + "eslint-config-hive": "^0.5.1", "fancy-log": "^1.3.3", "gulp": "^4.0.2", - "gulp-cli": "^2.2.0", + "gulp-cli": "^2.3.0", "gulp-count": "^1.0.0", "gulp-cssnano": "^2.1.3", "gulp-eslint": "^6.0.0", - "gulp-jsdoc3": "^2.0.0", + "gulp-jsdoc3": "^3.0.0", "gulp-mocha": "^7.0.2", "gulp-replace": "^1.0.0", "gulp-size": "^3.0.0", - "gulp-terser": "^1.2.0", + "gulp-terser": "^2.0.0", "gulp-watch": "^5.0.1", - "mocha": "^6.2.2", + "mocha": "^8.2.1", "mocha-cli": "^1.0.1", - "npm-check-updates": "^3.1.25", - "prettier": "^1.18.2", - "prettier-config-hive": "^0.1.1", - "sort-package-json": "^1.22.1" + "npm-check-updates": "^10.2.5", + "prettier": "^2.2.1", + "prettier-config-hive": "^0.1.7", + "sort-package-json": "^1.48.0", + "typescript": "^4.1.3" } } diff --git a/types/.eslintrc.js b/types/.eslintrc.js new file mode 100644 index 0000000..2792462 --- /dev/null +++ b/types/.eslintrc.js @@ -0,0 +1,5 @@ +module.exports = { + extends: ["hive", "eslint:recommended", "plugin:@typescript-eslint/recommended"], + parser: "@typescript-eslint/parser", + plugins: ["@typescript-eslint"] +};