@pragmatiks/lint 0.10.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## js-v0.11.0 (2026-11-20)
4
+
5
+ ### Features
6
+
7
+ - **rules**: ban monkeypatch and mocker fixtures in tests (PRA-997)
8
+
3
9
  ## js-v0.10.1 (2026-11-08)
4
10
 
5
11
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pragmatiks/lint",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "Pragmatiks engineering principles eslint config and bundled semgrep rules.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,16 @@
1
+ rules:
2
+ - id: pra-no-test-double-fixture
3
+ patterns:
4
+ - pattern-either:
5
+ - pattern: "def $FUNCTION(..., $NAME, ...): ..."
6
+ - pattern: "def $FUNCTION(..., $NAME: $TYPE, ...): ..."
7
+ - pattern: "async def $FUNCTION(..., $NAME, ...): ..."
8
+ - pattern: "async def $FUNCTION(..., $NAME: $TYPE, ...): ..."
9
+ - pattern: "pytest.mark.usefixtures(..., \"$NAME\", ...)"
10
+ - pattern: "$REQUEST.getfixturevalue(\"$NAME\")"
11
+ - metavariable-regex:
12
+ metavariable: $NAME
13
+ regex: '^(monkeypatch|(class_|module_|package_|session_)?mocker)$'
14
+ message: "testing policy: no mocks. The monkeypatch and mocker fixtures replace real code; test against real code and services."
15
+ severity: ERROR
16
+ languages: [python]