feat(strict): added strict mode

This commit is contained in:
svetlanaMuravlova
2021-09-01 10:02:39 +03:00
parent f9ec79864e
commit bc9361ebe0
4 changed files with 28 additions and 15 deletions

View File

@@ -9,10 +9,10 @@ on:
env: env:
NX_BRANCH: ${{ github.event.number }} NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }} NX_RUN_GROUP: ${{ github.run_id }}
# NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }} NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
MOZ_HEALESS: 1 MOZ_HEALESS: 1
SAUCE_USERNAME_PR: valorkinpr SAUCE_USERNAME_PR: valorkinpr
# FIREBASE_CHANNEL: ${{ fromJSON('["", "live"]')[!github.base_ref] }} FIREBASE_CHANNEL: ${{ fromJSON('["", "live"]')[!github.base_ref] }}
CACHE_NODE_MODULES_PATH: | CACHE_NODE_MODULES_PATH: |
~/.npm ~/.npm
@@ -26,7 +26,10 @@ jobs:
one_run: one_run:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
# install dependencies # install dependencies
install: install:

View File

@@ -2,7 +2,16 @@
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"types": ["node"] "types": ["node"],
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
"strictTemplates": true,
"fullTemplateTypeCheck": true
}, },
"files": ["src/main.ts"] "files": ["src/main.ts"]
} }

View File

@@ -14,15 +14,15 @@
} }
], ],
"compilerOptions": { "compilerOptions": {
"forceConsistentCasingInFileNames": false, "forceConsistentCasingInFileNames": true,
"strict": false, "strict": true,
"noImplicitReturns": false, "noImplicitReturns": true,
"noFallthroughCasesInSwitch": false "noFallthroughCasesInSwitch": true
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"strictInjectionParameters": false, "strictInjectionParameters": true,
"strictTemplates": false, "strictTemplates": true,
"fullTemplateTypeCheck": false "fullTemplateTypeCheck": true
} }
} }

View File

@@ -6,16 +6,17 @@
"scripts": { "scripts": {
"ng": "nx", "ng": "nx",
"start": "ng serve", "start": "ng serve",
"build": "ng build", "demo.build": "ng build",
"lib-build": "nx run ng2-file-upload:build", "demo.build-prod": "ng build --prod",
"build": "nx run ng2-file-upload:build",
"build-prod": "nx run ng2-file-upload:build:production", "build-prod": "nx run ng2-file-upload:build:production",
"build.watch": "nx run ng2-file-upload:build --watch", "build.watch": "nx run ng2-file-upload:build --watch",
"test": "nx run-many --all --target=test", "test": "nx run-many --all --target=test",
"version": "nx run ng2-file-upload:version", "version": "nx run ng2-file-upload:version",
"lint": "nx run-many --all --target=lint", "lint": "nx run-many --all --target=lint",
"pretest": "run-s lint lib-build", "pretest": "run-s lint build",
"test-coverage": "nx run-many --all --target=test --codeCoverage", "test-coverage": "nx run-many --all --target=test --codeCoverage",
"demo.gh-pages": "run-s lib-build build demo.deploy", "demo.gh-pages": "run-s build demo.build demo.deploy",
"demo.deploy": "gh-pages -d dist/apps/ng2-file-upload", "demo.deploy": "gh-pages -d dist/apps/ng2-file-upload",
"postinstall": "node ./decorate-angular-cli.js", "postinstall": "node ./decorate-angular-cli.js",
"flow.github-release": "conventional-github-releaser -p angular" "flow.github-release": "conventional-github-releaser -p angular"