forked from mozilla/sphinx-js
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: add CI check to run tsc on the code (#142)
Hopefully it will work after I merge it?
- Loading branch information
Showing
2 changed files
with
46 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: check-ts | ||
on: | ||
pull_request: | ||
permissions: write-all | ||
|
||
jobs: | ||
ts: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get diff lines | ||
id: diff | ||
uses: Equip-Collaboration/diff-line-numbers@v1.0.0 | ||
with: | ||
include: '["\\.ts$"]' | ||
- name: Detecting files changed | ||
id: files | ||
uses: umani/changed-files@v4.0.0 | ||
with: | ||
repo-token: ${{ github.token }} | ||
pattern: '^.*\.ts$' | ||
- name: List files changed (you can remove this step, for monitoring only) | ||
run: | | ||
echo 'Files modified: ${{steps.files.outputs.files_updated}}' | ||
echo 'Files added: ${{steps.files.outputs.files_created}}' | ||
echo 'Files removed: ${{steps.files.outputs.files_deleted}}' | ||
- uses: Arhia/action-check-typescript@v1.1.0 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
use-check: true | ||
check-fail-mode: added | ||
files-changed: ${{steps.files.outputs.files_updated}} | ||
files-added: ${{steps.files.outputs.files_created}} | ||
files-deleted: ${{steps.files.outputs.files_deleted}} | ||
line-numbers: ${{steps.diff.outputs.lineNumbers}} | ||
output-behaviour: both | ||
comment-behaviour: new | ||
ts-config-path: "./sphinx_js/js/tsconfig.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,13 @@ | ||
{ | ||
"compilerOptions": { | ||
/* Projects */ | ||
"incremental": true /* Save .tsbuildinfo files to allow for incremental compilation of projects. */, | ||
"tsBuildInfoFile": "tsconfig.tsbuildinfo", | ||
|
||
/* Language and Environment */ | ||
"target": "ES2022" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, | ||
/* Modules */ | ||
"module": "NodeNext" /* Specify what module code is generated. */, | ||
"moduleResolution": "NodeNext" /* Specify how TypeScript looks up a file from a given module specifier. */, | ||
"target": "ES2022", | ||
"module": "NodeNext", | ||
"moduleResolution": "NodeNext", | ||
"noEmit": true, | ||
"allowImportingTsExtensions": true /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */, | ||
|
||
/* Interop Constraints */ | ||
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, | ||
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ | ||
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, | ||
|
||
/* Type Checking */ | ||
"strict": true /* Enable all strict type-checking options. */, | ||
|
||
/* Completeness */ | ||
"skipLibCheck": true /* Skip type checking all .d.ts files. */ | ||
"allowImportingTsExtensions": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"skipLibCheck": true | ||
} | ||
} |