-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b60eb14
commit 1744723
Showing
11 changed files
with
103 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true, | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], | ||
rules: { | ||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], | ||
}, | ||
ignorePatterns: ['node_modules/', 'dist/'], | ||
} |
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,2 +1,3 @@ | ||
node_modules | ||
dist | ||
dist | ||
package-lock.json |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 4, | ||
"printWidth": 100, | ||
"semi": false, | ||
"singleQuote": true, | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"*.yaml", | ||
"*.yml" | ||
], | ||
"options": { | ||
"tabWidth": 2 | ||
} | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Advent of Code 2021 | ||
|
||
## Getting started: | ||
|
||
``` | ||
npm install | ||
``` | ||
|
||
## Running solutions: | ||
|
||
``` | ||
npm start -w day-<x> | ||
``` | ||
|
||
``` | ||
npm start -w day-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { getInputAsLines, getTestInputAsLines } from '../shared/input' | ||
|
||
const partOne = undefined | ||
const partTwo = undefined | ||
|
||
console.log('Part one:', partOne) | ||
console.log('Part two:', partTwo) |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"scripts": { | ||
"start": "ts-node index.ts" | ||
} | ||
} |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "aoc2021", | ||
"version": "1.0.0", | ||
"description": "Advent of Code 2021", | ||
"scripts": { | ||
"start": "echo \"Specify a workspace, e.g: npm start -w day-1\" && exit 1", | ||
"format": "prettier -w '**/*.ts'" | ||
}, | ||
"workspaces": [ | ||
"./day-*" | ||
], | ||
"author": "Bas Verhoeven", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@types/node": "^16.11.11", | ||
"@typescript-eslint/eslint-plugin": "^5.5.0", | ||
"@typescript-eslint/parser": "^5.5.0", | ||
"eslint": "^8.3.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"prettier": "^2.5.0", | ||
"ts-node": "^10.4.0", | ||
"typescript": "^4.5.2" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { readFileSync } from 'node:fs' | ||
|
||
export function getInput(filename = 'input.txt'): string { | ||
return readFileSync(filename, 'utf8').trim() | ||
} | ||
|
||
export function getInputAsLines(filename = 'input.txt'): string[] { | ||
return getInput(filename).split('\n') | ||
} | ||
|
||
export function getTestInputAsLines(filename = 'test_input.txt'): string[] { | ||
return getInputAsLines(filename) | ||
} |