-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: prepare project for adventjs 2023
- Loading branch information
Showing
24 changed files
with
1,070 additions
and
810 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ export function getCoins(change: number) { | |
|
||
return acc | ||
}, | ||
[0, 0, 0, 0, 0, 0] | ||
[0, 0, 0, 0, 0, 0], | ||
) | ||
.reverse() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// score: 400 | ||
export function getGiftsToRefill(a1: string[], a2: string[], a3: string[]) { | ||
return [...new Set(a1.concat(a2, a3))].filter( | ||
g => (a1.includes(g) as any) + a2.includes(g) + a3.includes(g) === 1 | ||
g => (a1.includes(g) as any) + a2.includes(g) + a3.includes(g) === 1, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,6 @@ export function decorateTree(base: string) { | |
|
||
return [top.join(' '), ...tree] | ||
}, | ||
[base] | ||
[base], | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,63 @@ | ||
{ | ||
"name": "adventjs-challenges", | ||
"private": true, | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"type": "module", | ||
"scripts": { | ||
"prepare": "husky install", | ||
"format": "prettier -wu .", | ||
"format:check": "prettier -cu .", | ||
"lint": "eslint --fix .", | ||
"lint:check": "eslint .", | ||
"lint": "eslint --fix ./**/*.{js,jsx,ts,tsx}", | ||
"lint:check": "eslint ./**/*.{js,jsx,ts,tsx}", | ||
"test": "vitest run", | ||
"test:cov": "vitest run --coverage", | ||
"test:watch": "vitest --watch", | ||
"typecheck": "tsc --noEmit", | ||
"check": "npm run format:check && npm run lint:check && npm run typecheck" | ||
}, | ||
"devDependencies": { | ||
"@types/kind-of": "6.0.0", | ||
"@types/node": "18.14.6", | ||
"@typescript-eslint/eslint-plugin": "5.54.1", | ||
"@typescript-eslint/parser": "5.54.1", | ||
"@vitest/coverage-c8": "0.29.2", | ||
"eslint": "8.35.0", | ||
"eslint-config-prettier": "8.7.0", | ||
"eslint-config-standard-with-typescript": "34.0.0", | ||
"eslint-plugin-import": "2.27.5", | ||
"eslint-plugin-n": "15.6.1", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"@types/kind-of": "6.0.3", | ||
"@types/node": "20.10.0", | ||
"@typescript-eslint/eslint-plugin": "6.12.0", | ||
"@typescript-eslint/parser": "6.12.0", | ||
"@vitest/coverage-v8": "0.34.6", | ||
"eslint": "8.54.0", | ||
"eslint-config-prettier": "9.0.0", | ||
"eslint-config-standard-with-typescript": "40.0.0", | ||
"eslint-plugin-import": "2.29.0", | ||
"eslint-plugin-n": "16.3.1", | ||
"eslint-plugin-prettier": "5.0.1", | ||
"eslint-plugin-promise": "6.1.1", | ||
"husky": "8.0.3", | ||
"kind-of": "6.0.3", | ||
"lint-staged": "13.1.2", | ||
"prettier": "2.8.4", | ||
"typescript": "4.9.5", | ||
"vitest": "0.29.2" | ||
"lint-staged": "15.1.0", | ||
"prettier": "3.1.0", | ||
"typescript": "5.2.2", | ||
"vitest": "0.34.6" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"standard-with-typescript", | ||
"plugin:prettier/recommended" | ||
], | ||
"parserOptions": { | ||
"project": "tsconfig.json" | ||
}, | ||
"rules": { | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/prefer-nullish-coalescing": "off", | ||
"@typescript-eslint/prefer-optional-chain": "off", | ||
"@typescript-eslint/strict-boolean-expressions": "off" | ||
} | ||
}, | ||
"prettier": { | ||
"printWidth": 80, | ||
"singleQuote": true, | ||
"semi": false, | ||
"arrowParens": "avoid" | ||
}, | ||
"lint-staged": { | ||
"*.{js,ts}": "pnpm eslint --fix", | ||
"*.{json,js,ts,md}": "pnpm prettier -w" | ||
} | ||
} |
Oops, something went wrong.