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:
NX_BRANCH: ${{ github.event.number }}
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
SAUCE_USERNAME_PR: valorkinpr
# FIREBASE_CHANNEL: ${{ fromJSON('["", "live"]')[!github.base_ref] }}
FIREBASE_CHANNEL: ${{ fromJSON('["", "live"]')[!github.base_ref] }}
CACHE_NODE_MODULES_PATH: |
~/.npm
@@ -26,7 +26,10 @@ jobs:
one_run:
runs-on: ubuntu-latest
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:

View File

@@ -2,7 +2,16 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"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"]
}

View File

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

View File

@@ -6,16 +6,17 @@
"scripts": {
"ng": "nx",
"start": "ng serve",
"build": "ng build",
"lib-build": "nx run ng2-file-upload:build",
"demo.build": "ng build",
"demo.build-prod": "ng build --prod",
"build": "nx run ng2-file-upload:build",
"build-prod": "nx run ng2-file-upload:build:production",
"build.watch": "nx run ng2-file-upload:build --watch",
"test": "nx run-many --all --target=test",
"version": "nx run ng2-file-upload:version",
"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",
"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",
"postinstall": "node ./decorate-angular-cli.js",
"flow.github-release": "conventional-github-releaser -p angular"