Skip to content

Commit

Permalink
Add typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoporto committed Nov 8, 2024
1 parent d53d125 commit ae82a38
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 37 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ jobs:
- name: Install Dependencies
run: npm ci --ignore-scripts

- name: Check Docs
run: npm run check-docs

- name: Check Formatting
run: npm run check-formatting

- name: Check Docs
run: npm run check-docs
- name: Check Typing
run: npm run check-typing

# - name: Lint
# run: npm run lint
4 changes: 0 additions & 4 deletions .lintstagedrc

This file was deleted.

5 changes: 5 additions & 0 deletions lint-staged.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
'*': 'prettier --check --ignore-unknown --write',
'*.md': 'remark --frail',
'*.{ts,tsx}': () => 'tsc --project tsconfig.json',
}
16 changes: 15 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
"prepare": "husky",
"start": "",
"build": "",
"checks": "npm run check-docs && npm run check-formatting && npm run check-typing",
"check-docs": "remark --frail .",
"check-formatting": "prettier --check --ignore-unknown \"**/*\"",
"check-typing": "tsc --project tsconfig.json",
"formatting:fix": "npm run check-formatting -- --write",
"lint": "",
"test": "",
Expand All @@ -42,6 +44,7 @@
"@tiagoporto/prettier-config": "^1.0.0-alpha.2",
"@tiagoporto/remark-config": "^1.0.0-alpha.1",
"husky": "^9.1.6",
"prettier": "^3.3.3"
"prettier": "^3.3.3",
"typescript": "^5.6.3"
}
}
29 changes: 0 additions & 29 deletions src/index.html

This file was deleted.

8 changes: 8 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"declaration": true,
"noEmit": false,
"noEmitOnError": true
}
}
21 changes: 21 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"compilerOptions": {
"target": "es2021",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"lib": ["es2021", "dom", "DOM.Iterable"],
"strict": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"importHelpers": true,
"outDir": "dist",
"sourceMap": true,
"inlineSources": true,
"rootDir": "./",
"incremental": true,
"skipLibCheck": true,
"noEmit": true
},
"include": ["**/*.ts"]
}

0 comments on commit ae82a38

Please sign in to comment.