Skip to content

Commit

Permalink
feat: Switch babel to typescript (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach authored Aug 31, 2023
1 parent 4038b33 commit 96f85f0
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 47 deletions.
17 changes: 14 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
{
"extends": "@appium/eslint-config-appium",
"extends": ["@appium/eslint-config-appium-ts"],
"overrides": [
{
"files": "test/**/*.js",
"rules": {
"func-names": "off"
"func-names": "off",
"@typescript-eslint/no-var-requires": "off"
}
},
{
"files": "scripts/**/*",
"parserOptions": {"sourceType": "script"},
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
}
]
],
"rules": {
"require-await": "error"
}
}
2 changes: 1 addition & 1 deletion .mocharc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
require: ['@babel/register'],
require: ['ts-node/register'],
forbidOnly: Boolean(process.env.CI)
};
25 changes: 0 additions & 25 deletions babel.config.json

This file was deleted.

41 changes: 23 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
],
"dependencies": {
"@appium/support": "^4.0.0",
"@babel/runtime": "^7.0.0",
"@types/lodash": "^4.14.192",
"@types/teen_process": "^2.0.0",
"asyncbox": "^2.3.0",
Expand All @@ -43,7 +42,9 @@
"teen_process": "^2.0.0"
},
"scripts": {
"build": "rm -rf build && babel --out-dir=build/lib lib && tsc -b",
"build": "tsc -b",
"clean": "npm run build -- --clean",
"rebuild": "npm run clean; npm run build",
"dev": "npm run build -- --watch",
"lint": "eslint .",
"lint:fix": "npm run lint -- --fix",
Expand All @@ -68,35 +69,39 @@
"singleQuote": true
},
"devDependencies": {
"@appium/eslint-config-appium": "^6.0.0",
"@appium/eslint-config-appium": "^8.0.4",
"@appium/eslint-config-appium-ts": "^0.3.1",
"@appium/tsconfig": "^0.3.0",
"@babel/cli": "^7.18.10",
"@babel/core": "^7.18.10",
"@babel/eslint-parser": "^7.18.9",
"@babel/plugin-transform-runtime": "^7.18.10",
"@babel/preset-env": "^7.18.10",
"@babel/register": "^7.18.9",
"@appium/types": "^0.13.2",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@types/chai": "^4.3.4",
"@types/bluebird": "^3.5.38",
"@types/chai": "^4.3.5",
"@types/chai-as-promised": "^7.1.5",
"@types/lodash": "^4.14.196",
"@types/mocha": "^10.0.1",
"@types/semver": "^7.3.13",
"babel-plugin-source-map-support": "^2.2.0",
"@types/node": "^20.4.7",
"@types/sinon": "^10.0.16",
"@types/sinon-chai": "^3.2.9",
"@types/teen_process": "2.0.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.1.2",
"chai-as-promised": "^7.1.1",
"conventional-changelog-conventionalcommits": "^7.0.1",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-promise": "^6.0.0",
"eslint": "^8.46.0",
"eslint-config-prettier": "^8.9.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-promise": "^6.1.1",
"lint-staged": "^14.0.0",
"mocha": "^10.0.0",
"pre-commit": "^1.1.3",
"prettier": "^3.0.0",
"semantic-release": "^21.1.0",
"typescript": "^5.0.2"
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
},
"types": "./build/lib/index.d.ts"
}

0 comments on commit 96f85f0

Please # to comment.