Skip to content

Commit

Permalink
chore: Remove husky and commitlint (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach authored Jan 27, 2024
1 parent 304d54d commit f7adefb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 40 deletions.
4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

11 changes: 0 additions & 11 deletions commitlint.config.js

This file was deleted.

14 changes: 1 addition & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
"dev": "npm run build -- --watch",
"lint": "eslint .",
"lint:fix": "npm run lint -- --fix",
"lint:staged": "lint-staged",
"lint:commit": "commitlint",
"prepare": "npm run rebuild",
"rebuild": "npm run clean && npm run build",
"format": "prettier -w ./lib",
"test": "mocha --exit --timeout 1m \"./test/unit/**/*-specs.js\"",
"e2e-test": "mocha --exit --timeout 5m \"./test/functional/**/*-specs.js\""
},
Expand All @@ -33,12 +32,6 @@
"directories": {
"lib": "lib"
},
"lint-staged": {
"*.(js|ts)": [
"eslint --fix",
"prettier --write"
]
},
"prettier": {
"bracketSpacing": false,
"printWidth": 100,
Expand Down Expand Up @@ -70,8 +63,6 @@
"@appium/eslint-config-appium": "^6.0.0",
"@appium/test-support": "^3.0.1",
"@appium/types": "^0.x",
"@commitlint/cli": "^18.0.0",
"@commitlint/config-conventional": "^18.1.0",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@types/async-lock": "^1.4.0",
Expand All @@ -94,14 +85,11 @@
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-promise": "^6.0.0",
"husky": "^8.0.3",
"lint-staged": "^15.0.1",
"mocha": "^10.0.0",
"prettier": "^3.0.0",
"rimraf": "^5.0.0",
"semantic-release": "^23.0.0",
"sinon": "^17.0.0",
"temp": "^0.x",
"ts-node": "^10.9.1",
"typescript": "~5.2.2"
},
Expand Down
17 changes: 9 additions & 8 deletions test/functional/adb-commands-e2e-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import chaiAsPromised from 'chai-as-promised';
import {ADB} from '../../lib/adb';
import path from 'path';
import { apiLevel, platformVersion, MOCHA_TIMEOUT } from './setup';
import { fs, mkdirp } from '@appium/support';
import temp from 'temp';
import { fs, tempDir } from '@appium/support';
import _ from 'lodash';
import { waitForCondition } from 'asyncbox';

Expand Down Expand Up @@ -195,18 +194,20 @@ describe('adb commands', function () {
return `/data/local/tmp/test${Math.random()}`;
}

let localFile = temp.path({prefix: 'appium', suffix: '.tmp'});
let tempFile = temp.path({prefix: 'appium', suffix: '.tmp'});
let localFile;
let tempFile;
let tempRoot;
const stringData = `random string data ${Math.random()}`;
before(async function () {
await mkdirp(path.dirname(localFile));
await mkdirp(path.dirname(tempFile));
tempRoot = await tempDir.openDir();
localFile = path.join(tempRoot, 'local.tmp');
tempFile = path.join(tempRoot, 'temp.tmp');

await fs.writeFile(localFile, stringData);
});
after(async function () {
if (await fs.exists(localFile)) {
await fs.unlink(localFile);
if (tempRoot) {
await fs.rimraf(tempRoot);
}
});
afterEach(async function () {
Expand Down

0 comments on commit f7adefb

Please sign in to comment.