Skip to content

Commit

Permalink
Switch to prettier-plugin-organize-imports and apply.
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Sep 4, 2023
1 parent 0144af3 commit 23f3295
Show file tree
Hide file tree
Showing 24 changed files with 166 additions and 145 deletions.
12 changes: 11 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
{
"semi": false
"overrides": [
{
"files": "*.ts",
"options": {
"semi": false
}
}
],
"plugins": [
"prettier-plugin-organize-imports"
]
}
26 changes: 12 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
"scripts": {
"ci": "yarn install --frozen-lockfile",
"clean": "rimraf dist",
"organize-imports": "find src -maxdepth 3 -name \\*.ts | grep -v node_modules | xargs --verbose --max-args=64 --max-procs=8 npx organize-imports-cli",
"preprettier": "yarn organize-imports",
"prettier": "prettier --write src/*.ts",
"lint": "yarn eslint src --ext .ts",
"compile": "tsc",
Expand Down Expand Up @@ -56,26 +54,26 @@
"@types/chai-string": "^1.4.2",
"@types/chai-subset": "^1.3.3",
"@types/mocha": "^10.0.1",
"@types/node": "^20.1.7",
"@typescript-eslint/eslint-plugin": "^5.59.6",
"@typescript-eslint/parser": "^5.59.6",
"chai": "^4.3.7",
"@types/node": "^20.5.9",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"chai": "^4.3.8",
"chai-as-promised": "^7.1.1",
"chai-string": "^1.5.0",
"chai-subset": "^1.6.0",
"chai-withintoleranceof": "^1.0.1",
"eslint": "^8.40.0",
"eslint-plugin-import": "^2.27.5",
"eslint": "^8.48.0",
"eslint-plugin-import": "^2.28.1",
"mocha": "^10.2.0",
"organize-imports-cli": "^0.10.0",
"prettier": "^2.8.8",
"prettier": "^3.0.3",
"prettier-plugin-organize-imports": "^3.2.3",
"rimraf": "^5.0.1",
"seedrandom": "^3.0.5",
"serve": "^14.2.0",
"serve": "^14.2.1",
"source-map-support": "^0.5.21",
"split2": "^4.2.0",
"timekeeper": "^2.2.0",
"typedoc": "^0.24.7",
"typescript": "~5.0.4"
"timekeeper": "^2.3.1",
"typedoc": "^0.25.0",
"typescript": "~5.2.2"
}
}
2 changes: 1 addition & 1 deletion src/Array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function filterInPlace<T>(arr: T[], filter: (t: T) => boolean): T[] {

export function count<T>(
arr: T[],
predicate: (t: T, idx: number) => boolean
predicate: (t: T, idx: number) => boolean,
): number {
let acc = 0
for (let idx = 0; idx < arr.length; idx++) {
Expand Down
4 changes: 2 additions & 2 deletions src/Async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function delay(millis: number, unref = false): Promise<void> {
export async function until(
f: (count: number) => boolean | Promise<boolean>,
timeoutMs: number,
delayMs = 50
delayMs = 50,
): Promise<boolean> {
const timeoutAt = Date.now() + timeoutMs
let count = 0
Expand All @@ -36,7 +36,7 @@ export async function until(
*/
export function ratelimit<T>(
f: () => T,
minDelayMs: number
minDelayMs: number,
): () => T | undefined {
let next = 0
return (force?: boolean) => {
Expand Down
Loading

0 comments on commit 23f3295

Please sign in to comment.