Skip to content

Commit

Permalink
feat(tsconfig): add @taiga-ui/tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Oct 17, 2023
1 parent 7df5f61 commit a384eca
Show file tree
Hide file tree
Showing 13 changed files with 161 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ Monorepo for all the tooling which enables ESLint, Prettier, Stylelint to suppor
| [@taiga-ui/cspell-config](https://npmjs.com/package/@taiga-ui/cspell-config) | ![](https://img.shields.io/npm/v/%40taiga-ui%2Fcspell-config/latest.svg) | [![](https://img.shields.io/badge/README--green.svg)](projects/cspell-config/README.md) | [![](https://img.shields.io/npm/dw/@taiga-ui/cspell-config)](https://npmjs.com/package/@taiga-ui/cspell-config) |
| [@taiga-ui/commitlint-config](https://npmjs.com/package/@taiga-ui/commitlint-config) | ![](https://img.shields.io/npm/v/%40taiga-ui%2Fcommitlint-config/latest.svg) | [![](https://img.shields.io/badge/README--green.svg)](projects/commitlint-config/README.md) | [![](https://img.shields.io/npm/dw/@taiga-ui/commitlint-config)](https://npmjs.com/package/@taiga-ui/commitlint-config) |
| [@taiga-ui/browserslist-config](https://npmjs.com/package/@taiga-ui/browserslist-config) | ![](https://img.shields.io/npm/v/%40taiga-ui%2Fbrowserslist-config/latest.svg) | [![](https://img.shields.io/badge/README--green.svg)](projects/browserslist-config/README.md) | [![](https://img.shields.io/npm/dw/@taiga-ui/browserslist-config)](https://npmjs.com/package/@taiga-ui/browserslist-config) |
| [@taiga-ui/tsconfig](https://npmjs.com/package/@taiga-ui/tsconfig) | ![](https://img.shields.io/npm/v/%40taiga-ui%2Ftsconfig/latest.svg) | [![](https://img.shields.io/badge/README--green.svg)](projects/tsconfig/README.md) | [![](https://img.shields.io/npm/dw/@taiga-ui/tsconfig)](https://npmjs.com/package/@taiga-ui/tsconfig) |
2 changes: 2 additions & 0 deletions projects/browserslist-config/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
project.json
2 changes: 2 additions & 0 deletions projects/commitlint-config/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
project.json
2 changes: 2 additions & 0 deletions projects/cspell-config/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
project.json
2 changes: 1 addition & 1 deletion projects/cspell-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/taiga-family/taiga-ui.git"
"url": "https://github.com/taiga-family/linters.git"
},
"license": "Apache-2.0",
"main": "cspell.config.js",
Expand Down
2 changes: 1 addition & 1 deletion projects/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/taiga-family/taiga-ui.git"
"url": "https://github.com/taiga-family/linters.git"
},
"license": "Apache-2.0",
"main": "index.js",
Expand Down
2 changes: 2 additions & 0 deletions projects/stylelint-config/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
project.json
2 changes: 1 addition & 1 deletion projects/stylelint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/taiga-family/taiga-ui.git"
"url": "https://github.com/taiga-family/linters.git"
},
"license": "Apache-2.0",
"main": "stylelint.config.js",
Expand Down
2 changes: 2 additions & 0 deletions projects/tsconfig/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
project.json
30 changes: 30 additions & 0 deletions projects/tsconfig/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Shareable TypeScript config for Angular projects

[![image](https://badge.fury.io/js/%40taiga-ui%2Ftsconfig.svg)](https://badge.fury.io/js/%40taiga-ui%2Ftsconfig)
[![image](https://img.shields.io/npm/dw/@taiga-ui/tsconfig)](https://badge.fury.io/js/%40taiga-ui%2Ftsconfig)

### Quick start

```bash
$ npm install @taiga-ui/tsconfig -D
```

Add to your `tsconfig.json`:

```json5
{
extends: '@taiga-ui/tsconfig',
angularCompilerOptions: {
// override shared angularCompilerOptions
strictTemplates: true,
disableTypeScriptVersionCheck: true,
},
compilerOptions: {
// override shared compilerOptions
outDir: 'dist',
target: 'es2018',
lib: ['es2018'],
typeRoots: ['./node_modules/@types'],
},
}
```
18 changes: 18 additions & 0 deletions projects/tsconfig/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@taiga-ui/tsconfig",
"version": "0.1.0",
"description": "Taiga UI tsconfig",
"keywords": [
"taiga-ui",
"tsconfig"
],
"repository": {
"type": "git",
"url": "https://github.com/taiga-family/linters.git"
},
"license": "Apache-2.0",
"main": "tsconfig.json",
"publishConfig": {
"access": "public"
}
}
14 changes: 14 additions & 0 deletions projects/tsconfig/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "tsconfig",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "projects/tsconfig",
"projectType": "library",
"targets": {
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./projects/tsconfig --access=public --ignore-scripts || echo \"already published\""
}
}
}
}
85 changes: 85 additions & 0 deletions projects/tsconfig/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"compileOnSave": false,
"angularCompilerOptions": {
"enableIvy": true,
"compilationMode": "partial",
"preserveWhitespaces": false,
"annotateForClosureCompiler": false,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableResourceInlining": true,
"strictLiteralTypes": true,
"strictInputTypes": true,
"strictInputAccessModifiers": true,
"strictNullInputTypes": true,
"strictAttributeTypes": true,
"strictSafeNavigationTypes": true,
"strictDomLocalRefTypes": true,
"strictOutputEventTypes": true,
"strictDomEventTypes": true,
"strictContextGenerics": true
},
"compilerOptions": {
"strict": true,
"baseUrl": "./",
"outDir": "./dist",
"target": "es2015",
"module": "es2020",
"lib": ["es2017", "es2018.asynciterable", "dom"],
"typeRoots": ["node_modules/@types", "scripts/types"],
"types": ["ng-dev-mode", "node"],
"skipLibCheck": true,
"downlevelIteration": true,
"skipDefaultLibCheck": true,
"declaration": true,
"declarationMap": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"importHelpers": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noImplicitReturns": true,
"noUnusedParameters": true,
"incremental": false,
"newLine": "lf",
"alwaysStrict": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noStrictGenericChecks": false,
"allowUmdGlobalAccess": true,
"useDefineForClassFields": false,
"forceConsistentCasingInFileNames": true,
"tsBuildInfoFile": null,
"noImplicitOverride": true,
"preserveConstEnums": true,
"noEmitHelpers": true,
"pretty": true,
"stripInternal": true,
"noUncheckedIndexedAccess": false,
"importsNotUsedAsValues": "remove",
"noPropertyAccessFromIndexSignature": false,
"removeComments": true,
"noEmitOnError": true,
"allowJs": true,
"checkJs": true,
"disableSizeLimit": true,
"strictNullChecks": true,
"preserveSymlinks": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true
},
"ts-node": {
"files": true,
"transpileOnly": true,
"compilerOptions": {
"types": ["node"],
"module": "commonjs"
}
}
}

0 comments on commit a384eca

Please sign in to comment.