@pragmatiks/lint 0.6.0 → 0.7.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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## js-v0.7.0 (2026-10-07)
4
+
5
+ ### Bug Fixes
6
+
7
+ - **rules**: recognize Path.open and with-open as file I/O in pra-io-prefix-mismatch
8
+
9
+ ### Features
10
+
11
+ - **rules**: drop the Python comment rules the strict comment check replaces
12
+
3
13
  ## js-v0.6.0 (2026-09-27)
4
14
 
5
15
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pragmatiks/lint",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Pragmatiks engineering principles eslint config and bundled semgrep rules.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -26,6 +26,23 @@ rules:
26
26
  ...
27
27
  open(...)
28
28
  ...
29
+ - pattern-not: |
30
+ def $NAME(...):
31
+ ...
32
+ with open(...) as $HANDLE:
33
+ ...
34
+ ...
35
+ - pattern-not: |
36
+ def $NAME(...):
37
+ ...
38
+ $PATH.open(...)
39
+ ...
40
+ - pattern-not: |
41
+ def $NAME(...):
42
+ ...
43
+ with $PATH.open(...) as $HANDLE:
44
+ ...
45
+ ...
29
46
  - pattern-not: |
30
47
  def $NAME(...):
31
48
  ...
@@ -0,0 +1,6 @@
1
+ rules:
2
+ - id: pra-no-block-comments-js
3
+ pattern-regex: '/\*(?!\*)[\s\S]*?\*/'
4
+ message: "principle #10 Block comments make code harder to trust. Delete the comment; rationale worth keeping goes in the owning docstring."
5
+ severity: ERROR
6
+ languages: [typescript, javascript]
@@ -0,0 +1,6 @@
1
+ rules:
2
+ - id: pra-no-todo-comments-js
3
+ pattern-regex: '(?i)(//|/\*)\s*(TODO(?!\(PRA-[0-9]+\))|FIXME|XXX)\b'
4
+ message: "principle #10 Planning comments decay. Track the work as an issue and delete the comment."
5
+ severity: ERROR
6
+ languages: [typescript, javascript]
@@ -1,11 +0,0 @@
1
- rules:
2
- - id: pra-no-block-comments-python
3
- pattern-regex: '(?m)^[ \t]*#(?![ \t]*WHY:).*\n[ \t]*#(?![ \t]*WHY:).*$'
4
- message: "principle #10 Block comments make code harder to trust. Delete the comment or replace it with one WHY line."
5
- severity: ERROR
6
- languages: [python]
7
- - id: pra-no-block-comments-js
8
- pattern-regex: '/\*(?!\*)[\s\S]*?\*/'
9
- message: "principle #10 Block comments make code harder to trust. Delete the comment or replace it with one WHY line."
10
- severity: ERROR
11
- languages: [typescript, javascript]
@@ -1,11 +0,0 @@
1
- rules:
2
- - id: pra-no-todo-comments-python
3
- pattern-regex: '(?i)#\s*(TODO(?!\(PRA-[0-9]+\))|FIXME|XXX)\b'
4
- message: "principle #10 Planning comments decay. Link a Linear issue or remove the comment."
5
- severity: ERROR
6
- languages: [python]
7
- - id: pra-no-todo-comments-js
8
- pattern-regex: '(?i)(//|/\*)\s*(TODO(?!\(PRA-[0-9]+\))|FIXME|XXX)\b'
9
- message: "principle #10 Planning comments decay. Link a Linear issue or remove the comment."
10
- severity: ERROR
11
- languages: [typescript, javascript]