Skip to content

Commit 1101986

Browse files
JavierCaneismanapa
authored andcommitted
Initial commit
0 parents  commit 1101986

12 files changed

+5974
-0
lines changed

.eslintrc.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = {
2+
parser: "@typescript-eslint/parser",
3+
extends: [
4+
"plugin:@typescript-eslint/recommended",
5+
"plugin:prettier/recommended",
6+
],
7+
plugins: ["simple-import-sort", "import"],
8+
parserOptions: {
9+
ecmaVersion: 12,
10+
sourceType: "module",
11+
},
12+
rules: {
13+
"simple-import-sort/imports": "error",
14+
"simple-import-sort/exports": "error",
15+
"import/first": "error",
16+
"import/newline-after-import": "error",
17+
"import/no-duplicates": "error",
18+
},
19+
};

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on: push
4+
5+
jobs:
6+
unit:
7+
runs-on: ubuntu-latest
8+
name: 🚀 Lint and test
9+
timeout-minutes: 5
10+
steps:
11+
- name: 👍 Checkout
12+
uses: actions/checkout@v2
13+
14+
- name: 📦 Cache node modules
15+
uses: actions/cache@v2
16+
env:
17+
cache-name: cache-node-modules
18+
with:
19+
path: ~/.npm
20+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
21+
restore-keys: |
22+
${{ runner.os }}-build-${{ env.cache-name }}-
23+
${{ runner.os }}-build-
24+
${{ runner.os }}-
25+
26+
- name: 📥 Install dependencies
27+
run: npm install
28+
29+
- name: 💅 Lint code style
30+
run: npm run lint
31+
32+
- name: ✅ Run tests
33+
run: npm run test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# 🔷🌱 TypeScript Basic Skeleton
2+
3+
Template intended to serve as a starting point if you want to bootstrap a project in TypeScript.
4+
5+
The purpose of this repository is to leave it with the bare minimum dependencies and tools needed to run TypeScript snippets or start you project without any opinionated decision already made.
6+
7+
## Features
8+
9+
- [TypeScript](https://www.typescriptlang.org/) (v4)
10+
- [Prettier](https://prettier.io/)
11+
- [ESLint](https://eslint.org/) with:
12+
- [Simple Import Sort](https://github.com/lydell/eslint-plugin-simple-import-sort/)
13+
- [Import plugin](https://github.com/benmosher/eslint-plugin-import/)
14+
- And a few other ES2015+ related rules
15+
- [Jest](https://jestjs.io) with [DOM Testing Library](https://testing-library.com/docs/dom-testing-library/intro)
16+
- [GitHub Action workflows](https://github.com/features/actions) set up to run tests and linting on push
17+
- [SWC](https://swc.rs/): Execute your tests in less than 200ms
18+
19+
## Running the app
20+
21+
- Install the dependencies: `npm install`
22+
- Execute the tests: `npm run test`
23+
- Check linter errors: `npm run lint`
24+
- Fix linter errors: `npm run lint:fix`
25+
26+
## Related skeleton templates
27+
28+
Opinionated TypeScript skeletons ready for different purposes:
29+
30+
- [🔷🕸️ TypeScript Web Skeleton](https://github.com/CodelyTV/typescript-web-skeleton)
31+
- [🔷🌍 TypeScript API Skeleton](https://github.com/CodelyTV/typescript-api-skeleton)
32+
- [🔷✨ TypeScript DDD Skeleton](https://github.com/CodelyTV/typescript-ddd-skeleton)
33+
34+
This very same basic skeleton philosophy implemented in other programming languages:
35+
36+
- [✨ JavaScript Basic Skeleton](https://github.com/CodelyTV/javascript-basic-skeleton)
37+
- [☕ Java Basic Skeleton](https://github.com/CodelyTV/java-basic-skeleton)
38+
- [📍 Kotlin Basic Skeleton](https://github.com/CodelyTV/kotlin-basic-skeleton)
39+
- [🧬 Scala Basic Skeleton](https://github.com/CodelyTV/scala-basic-skeleton)
40+
- [🦈 C# Basic Skeleton](https://github.com/CodelyTV/csharp-basic-skeleton)
41+
- [🐘 PHP Basic Skeleton](https://github.com/CodelyTV/php-basic-skeleton)

jest.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
testMatch: ["**/tests/*.test.ts"],
3+
transform: {
4+
"\\.ts$": "@swc/jest",
5+
},
6+
};

0 commit comments

Comments
 (0)