Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add typechecking #56

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add typechecking
  • Loading branch information
win0err committed Sep 14, 2024
commit 4ff17c4054dba16e4730a4da33c86b49dadaa468
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -27,8 +27,12 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install NPM dependencies
run: npm install
- name: Lint code
run: npm install && npm run test:lint
run: npm run test:lint
- name: Typecheck
run: npm run test:typecheck
- name: Check that the translation files have been updated
run: |
make --always-make translations
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,10 +2,9 @@ build/
dist/
.idea/
.vscode/
@types/
@types/generated/
node_modules/
yarn.lock
package-lock.json
docs-lock.json
src/schemas/gschemas.compiled
po/*~
8 changes: 0 additions & 8 deletions .ts-for-girrc.json

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -68,7 +68,8 @@ To create a new translation file, use the following command: \

You need to install project JS dependencies first: `npm i`

- `npm run types:generate` — generate type definition for GJS environment;
- `npm run test` — run all available tests;
- `npm run test:typecheck` — check types;
- `npm run test:lint` — lint project files.

## macOS version
32 changes: 12 additions & 20 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
{
"compilerOptions": {
"target": "ES2022",
"allowJs": true,
"noEmit": true,
"skipLibCheck": true,
"module": "ES2022",
"allowJs": true,
"checkJs": true,
"target": "ESNext",
"lib": ["ESNext"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noUnusedLocals": true,
"noUnusedParameters": true,
"baseUrl": ".",
"paths": {
"gi://Adw": ["@types/adw-1.d.ts"],
"gi://Gtk": ["@types/gtk-4.0.d.ts"],
"gi://GLib": ["@types/glib-2.0.d.ts"],
"gi://Gio": ["@types/gio-2.0.d.ts"],
"gi://Shell": ["@types/shell-12.d.ts"],
"gi://St": ["@types/st-12.d.ts"],
"gi://Gdk": ["@types/gdk-4.0.d.ts"],
"gi://GObject": ["@types/gobject-2.0.d.ts"]
},
"rootDirs": ["src"]
"rootDirs": ["src"],
"noImplicitAny": true
},
"include": [
"src/**/*",
"@types/gjs.d.ts",
"@types/dom.d.ts"
]
"include": ["./typings/*.d.ts", "./src/**/*"],
"files": ["./src/extension.js", "./src/prefs.js"]
}
Loading
Loading