Skip to content

Commit

Permalink
feat: add tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
john-d-pelingo committed Dec 2, 2020
1 parent f9da7a0 commit 3b8193c
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/npm-publish.yml
Expand Up @@ -36,3 +36,8 @@ jobs:
with:
package: './packages/prettier-config/package.json'
token: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Publish tsconfig
uses: JS-DevTools/npm-publish@v1
with:
package: './packages/tsconfig/package.json'
token: ${{ secrets.NPM_AUTH_TOKEN }}
4 changes: 4 additions & 0 deletions .versionrc
Expand Up @@ -19,6 +19,10 @@
{
"filename": "packages/prettier-config/package.json",
"type": "json"
},
{
"filename": "packages/tsconfig/package.json",
"type": "json"
}
]
}
1 change: 0 additions & 1 deletion docs/TODOS.md
Expand Up @@ -2,5 +2,4 @@

- add stylelint configuration
- add commitlint configuration
- add typescript configuration
- add css reset
14 changes: 14 additions & 0 deletions packages/tsconfig/__tests__/index.js
@@ -0,0 +1,14 @@
const test = require('tape')

test('entry point parses', (t) => {
t.doesNotThrow(() => require('../tsconfig.base.json'), 'index does not throw')
t.doesNotThrow(
() => require('../tsconfig.react.json'),
'index does not throw',
)
t.doesNotThrow(
() => require('../tsconfig.react.dev.json'),
'index does not throw',
)
t.end()
})
39 changes: 39 additions & 0 deletions packages/tsconfig/package.json
@@ -0,0 +1,39 @@
{
"name": "@jdp-dev/tsconfig",
"version": "0.0.8",
"description": "My shareable TypeScript config.",
"private": false,
"homepage": "https://github.com/john-d-pelingo/jdp-scripts",
"author": {
"email": "johndarrylpelingo@gmail.com",
"name": "John Darryl Pelingo",
"url": "https://johndpelingo.com"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/john-d-pelingo/jdp-scripts",
"directory": "packages/tsconfig"
},
"bugs": {
"url": "https://github.com/john-d-pelingo/jdp-scripts/issues"
},
"keywords": [
"typescript",
"tsconfig"
],
"main": "tsconfig.base.json",
"scripts": {
"prepublishOnly": "npm run test",
"test": "tape __tests__/*.js"
},
"peerDependencies": {
"typescript": ">= 4.1"
},
"dependencies": {
"typescript": "^4.1.2"
},
"devDependencies": {
"tape": "^5.0.1"
}
}
32 changes: 32 additions & 0 deletions packages/tsconfig/tsconfig.base.json
@@ -0,0 +1,32 @@
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"alwaysStrict": true,
"emitDecoratorMetadata": false,
"experimentalDecorators": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true,
"isolatedModules": true,
"lib": ["ESNext", "DOM"],
"module": "esnext",
"moduleResolution": "node",
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"pretty": true,
"removeComments": true,
"resolveJsonModule": true,
"skipLibCheck": false,
"sourceMap": true,
"strict": true,
"stripInternal": true,
"target": "esnext"
},
"exclude": ["node_modules"]
}
6 changes: 6 additions & 0 deletions packages/tsconfig/tsconfig.react.dev.json
@@ -0,0 +1,6 @@
{
"extends": "tsconfig.react.json",
"compilerOptions": {
"jsx": "react-jsxdev"
}
}
6 changes: 6 additions & 0 deletions packages/tsconfig/tsconfig.react.json
@@ -0,0 +1,6 @@
{
"extends": "tsconfig.base.json",
"compilerOptions": {
"jsx": "react-jsx"
}
}

0 comments on commit 3b8193c

Please sign in to comment.