From deca91be7b4b12a9ce146c27394a641c1c5457f4 Mon Sep 17 00:00:00 2001 From: roll Date: Tue, 9 Apr 2024 15:30:16 +0100 Subject: [PATCH] Rename `check` to self-explanatory `type` --- Makefile | 7 ++++++- package.json | 4 ++-- pyproject.toml | 8 ++++---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 5dcdd6024..090a577d5 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all build client dist docs format install lint preview release server start test version +.PHONY: all build client dist docs format install lint preview release server start test type version VERSION := $(shell node -p -e "require('./package.json').version") @@ -62,6 +62,11 @@ test: hatch run test npm run test +## Checks types with pyright and typescript +type: + hatch run type + npm run type + version: @echo $(VERSION) diff --git a/package.json b/package.json index a01626390..20ca3c483 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "scripts": { "build": "electron-vite build", "dist": "electron-builder", - "check": "tsc --noEmit", "coverage": "sensible-browser coverage/index.html", "format": "prettier --write \"client/**/*.ts*\" && eslint --fix \"client/**/*.ts*\"", "lint": "prettier --check \"client/**/*.ts*\" && eslint \"client/**/*.ts*\"", @@ -32,7 +31,8 @@ "preview": "electron-vite dev", "start": "vite --open --port 8080", "spec": "vitest run", - "test": "npm run lint && npm run check && npm run spec", + "test": "npm run lint && npm run type && npm run spec", + "type": "tsc --noEmit", "update": "ncu -u" }, "dependencies": { diff --git a/pyproject.toml b/pyproject.toml index 7d6ee6d31..3076d84ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,9 +67,6 @@ dependencies = [ build = [ "python -m build", ] -check = [ - "pyright server", -] format = [ "ruff format server", ] @@ -81,9 +78,12 @@ start = [ ] test = [ "hatch run lint", - "hatch run check", + "hatch run type", "hatch run pytest", ] +type = [ + "pyright server", +] [tool.ruff] line-length = 90