initial npm project structure, linting / ts

feature/modern-browsers
Inga 🏳‍🌈 1 month ago
parent 28ac67bd49
commit 830b6734a1
  1. 1
      .gitignore
  2. 4
      .prettierrc
  3. 25
      README.md
  4. 18
      eslint.config.js
  5. 6213
      package-lock.json
  6. 25
      package.json
  7. 0
      src/lib/stub.spec.ts
  8. 0
      src/lib/stub.ts
  9. 10
      tsconfig.json

1
.gitignore vendored

@ -130,3 +130,4 @@ dist
.yarn/install-state.gz
.pnp.*
.tap

@ -0,0 +1,4 @@
{
"tabWidth": 2,
"useTabs": false
}

@ -1,2 +1,25 @@
# test-assignment-tictactoe
# Assignment
Source: https://www.programmfabrik.de/en/assignment-frontend-backend-developer-job-berlin/
> Code a tic-tac-toe game
> Depending on the job you are applying for, you can code in Javascript (ECMA) or C++.
> Requirements
>
> * Use your own code only and start from scratch
> * Player can choose the opponent to be human or computer
> * Use [L]GPL'ed libraries if necessary, please include copyright notes
> * Let us know how long it took you to code the game
>
> JavaScript version
>
> * Implement in Javascript so that it works in Mozilla Firefox
> * Make use of CSS, provide nice visuals
> * Make the back button work
>
> C++ version
>
> * Implement in C++, so that i works on the command line under Linux
> * The opponent has to be unbeatable

@ -0,0 +1,18 @@
import eslint from "@eslint/js";
import tsEslint from "typescript-eslint";
import prettierEslintRecommended from "eslint-plugin-prettier/recommended";
export default tsEslint.config(
eslint.configs.recommended,
...tsEslint.configs.strictTypeChecked,
...tsEslint.configs.stylisticTypeChecked,
prettierEslintRecommended,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
);

6213
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,25 @@
{
"name": "test-assignment-tictactoe",
"version": "1.0.0",
"scripts": {
"lint": "eslint src",
"prerelease": "npm run lint && npm run typecheck && npm run test",
"test": "tap",
"typecheck": "tsc --noEmit --project tsconfig.json"
},
"author": "Inga",
"license": "CNPLv7",
"type": "module",
"devDependencies": {
"@eslint/js": "^9.15.0",
"@tsconfig/strictest": "^2.0.5",
"@types/eslint__js": "^8.42.3",
"eslint": "9.14.x",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"prettier": "^3.3.3",
"tap": "^21.0.1",
"typescript": "^5.6.3",
"typescript-eslint": "^8.14.0"
}
}

@ -0,0 +1,10 @@
{
"extends": "@tsconfig/strictest",
"include": ["src/**/*"],
"compilerOptions": {
"target": "ES2020",
"module": "Preserve",
"forceConsistentCasingInFileNames": true
}
}
Loading…
Cancel
Save