Skip to content

Commit

Permalink
feat: sensible initial tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenptrs committed Jul 28, 2023
0 parents commit 242ab98
Show file tree
Hide file tree
Showing 11 changed files with 1,490 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
19 changes: 19 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: node
package-name: release-please-action
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Jeroen Peeters

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<img src="https://upload.wikimedia.org/wikipedia/commons/4/4c/Typescript_logo_2020.svg" style="width: 200px; display: block; margin: auto;"/>

# <p style="text-align: center;">tsconfig</p>

This is the tsconfig file shared by any project created for @jeroenpeeters.

## Usage

In a `tsconfig.json` file, after installing `@jeroenpeeters/tsconfig` as a package, use the `extends` field to define this configuration:
```json
{
"extends": "@jeroenpeeters/tsconfig",
"compilerOptions": {
"baseUrl": "./",
"outDir": "dist"
}
}
```
27 changes: 27 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@jeroenpeeters/tsconfig",
"version": "1.0.0",
"description": "tsconfig file for @jeroenpeeters projects",
"repository": "jeroenptrs/tsconfig",
"main": "tsconfig.json",
"engines": {
"node": ">=18"
},
"keywords": [
"typescript",
"tsconfig"
],
"author": {
"name": "Jeroen Peeters",
"email": "contact@jeroenpeeters.be"
},
"license": "MIT",
"devDependencies": {
"@commitlint/cli": "^17.6.7",
"@commitlint/config-conventional": "^17.6.7",
"husky": "^8.0.0"
},
"scripts": {
"prepare": "husky install"
}
}
39 changes: 39 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"compilerOptions": {
// Type Checking
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,

// Modules
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,

// Emit
"declaration": true,
"importHelpers": true,
"newLine": "lf",
"noEmitOnError": true,

// Interop Constraints
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,

// Language and Environment
"jsx": "react",
"lib": ["ESNext"],
"useDefineForClassFields": true,

// Projects
"incremental": true,

// Output Formatting
"pretty": true,
}
}
Loading

0 comments on commit 242ab98

Please sign in to comment.