diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 635a5d79..dd1906ae 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -59,5 +59,5 @@ "initializeCommand": "sh .devcontainer/initialize-command.sh", "onCreateCommand": "sh .devcontainer/on-create-command.sh", "postStartCommand": "sh .devcontainer/post-start-command.sh" - // Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): e8f8ae22 # spellchecker:disable-line + // Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): 323225d7 # spellchecker:disable-line } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4637c4a4..b3568c93 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,9 +42,16 @@ repos: # Reformatting (should generally come before any file format or other checks, because reformatting can change things) - repo: https://github.com/crate-ci/typos - rev: 0f0ccba9ed1df83948f0c15026e4f5ccfce46109 # frozen: v1.32.0 + rev: 392b78fe18a52790c53f42456e46124f77346842 # frozen: v1.34.0 hooks: - id: typos + exclude: + | + (?x)^( + .*\.min.js| + .*\.min.css| + .*\.umd.js| + )$ - repo: https://github.com/pre-commit/pre-commit-hooks rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0 hooks: @@ -77,17 +84,21 @@ repos: .*devcontainer.json| .*pyrightconfig.json| .*tsconfig.json| + .*biome.jsonc| .*/vendor_files/.*| )$ args: [--autofix, --no-sort-keys] - repo: https://github.com/biomejs/pre-commit - rev: 748e40d32e076a6aaaf3353a2564c8fe43764f79 # frozen: v2.0.0-beta.1 + rev: a450e9c04887b1305951c298db5999cd30155f74 # frozen: v2.1.1 hooks: - id: biome-check + # exclude generated files from codegen and strawberry exclude: | (?x)^( .*generated/graphql.ts| + .*/schema.graphql| + .*pyrightconfig\.json| )$ - repo: https://github.com/pre-commit/mirrors-prettier # TODO: switch to a different approach...this was archived in 2024 @@ -102,10 +113,17 @@ repos: .*devcontainer.json| .*pyrightconfig.json| .*tsconfig.json| + .*/__snapshots__/.*| + .*.min.js| + .*.min.css| + .*.umd.js| .*.yaml| .*.yml| .*.md| + .*.jsonc| .*/vendor_files/.*| + .*/schema.graphql| + .*generated/graphql.ts| )$ files: (.*.json)|(.*.ts)|(.*.jsx)|(.*.tsx)|(.*.yaml)|(.*.yml)|(.*.md)|(.*.html)|(.*.css)|(.*.scss)|(.*.less)|(.*.vue)|(.*.graphql)|(.*.gql) @@ -204,7 +222,7 @@ repos: description: Runs hadolint to lint Dockerfiles - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 24e02b24b8ab2b7c76225602d13fa60e12d114e6 # frozen: v0.11.9 + rev: 3d44372123ca5e8617fdb65d9f11facd159b9e95 # frozen: v0.12.3 hooks: - id: ruff name: ruff-src diff --git a/biome.json b/biome.json deleted file mode 100644 index 7dbe4e1e..00000000 --- a/biome.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "formatter": { - "enabled": false - }, - "linter": { - "enabled": false - } -} diff --git a/biome.jsonc b/biome.jsonc new file mode 100644 index 00000000..e0ea5856 --- /dev/null +++ b/biome.jsonc @@ -0,0 +1,16 @@ +{ + "formatter": { + "enabled": false, + }, + "linter": { + "enabled": false, + }, + "files": { + "includes": [ + "**", + "!template/template/biome.jsonc", + "!template/biome.jsonc", + "!**/*.css", // still too many false positives, so we exclude CSS files + ], + }, +} diff --git a/extensions/context.py b/extensions/context.py index 48606550..e5553b39 100644 --- a/extensions/context.py +++ b/extensions/context.py @@ -17,9 +17,9 @@ def hook(self, context: dict[Any, Any]) -> dict[Any, Any]: context["copier_version"] = "9.7.1" context["copier_templates_extension_version"] = "0.3.1" ####### - context["pnpm_version"] = "10.12.4" + context["pnpm_version"] = "10.13.1" # These are duplicated in the pyproject.toml of this repository - context["pyright_version"] = "1.1.402" + context["pyright_version"] = "1.1.403" context["pytest_version"] = "8.4.0" context["pytest_randomly_version"] = "3.16.0" context["pytest_cov_version"] = "6.2.1" diff --git a/pyproject.toml b/pyproject.toml index 7c501d69..b8e6381f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ dependencies = [ "pytest>=8.4.0", "pytest-cov>=6.2.1", "pytest-randomly>=3.16.0", - "pyright[nodejs]>=1.1.402", + "pyright[nodejs]>=1.1.403", "copier>=9.7.1", "copier-templates-extensions>=0.3.1" ] diff --git a/ruff.toml b/ruff.toml index c76d77ba..087bc366 100644 --- a/ruff.toml +++ b/ruff.toml @@ -61,6 +61,7 @@ ignore = [ "TD002", # Adding author names to TODOs erodes shared ownership of codebase. Git history provides information about who originally created the TODO if that information is vitally needed "TD003", # Up to the author's judgement whether a TODO requires a link to an issue or not "TID252", # Sometimes it makes sense to use relative imports, that's a judgement call for us, not ruff + "TC006", # Adding quotes around classes unnecessarily confuses the IDE for automatic refactoring ] # Allow fix for all enabled rules (when `--fix`) is provided. diff --git a/template/biome.json b/template/biome.json deleted file mode 120000 index 64fa5efd..00000000 --- a/template/biome.json +++ /dev/null @@ -1 +0,0 @@ -../biome.json \ No newline at end of file diff --git a/template/biome.jsonc b/template/biome.jsonc new file mode 120000 index 00000000..f6311a58 --- /dev/null +++ b/template/biome.jsonc @@ -0,0 +1 @@ +../biome.jsonc \ No newline at end of file diff --git a/template/template/biome.json b/template/template/biome.json deleted file mode 120000 index fbaf105a..00000000 --- a/template/template/biome.json +++ /dev/null @@ -1 +0,0 @@ -../../biome.json \ No newline at end of file diff --git a/template/template/biome.jsonc b/template/template/biome.jsonc new file mode 120000 index 00000000..90d995a8 --- /dev/null +++ b/template/template/biome.jsonc @@ -0,0 +1 @@ +../../biome.jsonc \ No newline at end of file diff --git a/uv.lock b/uv.lock index b88c1cf4..c41d3f8f 100644 --- a/uv.lock +++ b/uv.lock @@ -61,7 +61,7 @@ dependencies = [ requires-dist = [ { name = "copier", specifier = ">=9.7.1" }, { name = "copier-templates-extensions", specifier = ">=0.3.1" }, - { name = "pyright", extras = ["nodejs"], specifier = ">=1.1.402" }, + { name = "pyright", extras = ["nodejs"], specifier = ">=1.1.403" }, { name = "pytest", specifier = ">=8.4.0" }, { name = "pytest-cov", specifier = ">=6.2.1" }, { name = "pytest-randomly", specifier = ">=3.16.0" }, @@ -358,15 +358,15 @@ wheels = [ [[package]] name = "pyright" -version = "1.1.402" +version = "1.1.403" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "nodeenv" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/aa/04/ce0c132d00e20f2d2fb3b3e7c125264ca8b909e693841210534b1ea1752f/pyright-1.1.402.tar.gz", hash = "sha256:85a33c2d40cd4439c66aa946fd4ce71ab2f3f5b8c22ce36a623f59ac22937683", size = 3888207, upload-time = "2025-06-11T08:48:35.759Z" } +sdist = { url = "https://files.pythonhosted.org/packages/fe/f6/35f885264ff08c960b23d1542038d8da86971c5d8c955cfab195a4f672d7/pyright-1.1.403.tar.gz", hash = "sha256:3ab69b9f41c67fb5bbb4d7a36243256f0d549ed3608678d381d5f51863921104", size = 3913526, upload-time = "2025-07-09T07:15:52.882Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/fe/37/1a1c62d955e82adae588be8e374c7f77b165b6cb4203f7d581269959abbc/pyright-1.1.402-py3-none-any.whl", hash = "sha256:2c721f11869baac1884e846232800fe021c33f1b4acb3929cff321f7ea4e2982", size = 5624004, upload-time = "2025-06-11T08:48:33.998Z" }, + { url = "https://files.pythonhosted.org/packages/49/b6/b04e5c2f41a5ccad74a1a4759da41adb20b4bc9d59a5e08d29ba60084d07/pyright-1.1.403-py3-none-any.whl", hash = "sha256:c0eeca5aa76cbef3fcc271259bbd785753c7ad7bcac99a9162b4c4c7daed23b3", size = 5684504, upload-time = "2025-07-09T07:15:50.958Z" }, ] [package.optional-dependencies]