@pragmatiks/lint 0.2.0 → 0.4.1

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,47 @@
1
1
  # Changelog
2
2
 
3
+ ## js-v0.4.1 (2026-07-30)
4
+
5
+ ### Bug Fixes
6
+
7
+ - **js**: declare the pnpm workspace packages field
8
+
9
+ ## js-v0.4.0 (2026-07-30)
10
+
11
+ ### Features
12
+
13
+ - **rules**: flag db_* and *_db compounds in the abbreviation rule
14
+
15
+ ## js-v0.3.4 (2026-05-25)
16
+
17
+ ### Bug Fixes
18
+
19
+ - **js**: upgrade npm in CI to enable OIDC trusted publishers
20
+
21
+ ## js-v0.3.3 (2026-05-25)
22
+
23
+ ### Bug Fixes
24
+
25
+ - **js**: remove registry-url from setup-node so npm uses OIDC
26
+
27
+ ## js-v0.3.2 (2026-05-25)
28
+
29
+ ### Bug Fixes
30
+
31
+ - **js**: add OIDC subject debug step to publish workflow
32
+
33
+ ## js-v0.3.1 (2026-05-25)
34
+
35
+ ### Bug Fixes
36
+
37
+ - **js**: use npm publish for OIDC compatibility
38
+
39
+ ## js-v0.3.0 (2026-05-25)
40
+
41
+ ### Features
42
+
43
+ - **rules**: recognize pathlib + subprocess + shutil I/O in pra-io-prefix-mismatch (#4)
44
+
3
45
  ## js-v0.2.0 (2026-05-10)
4
46
 
5
47
  ### Misc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pragmatiks/lint",
3
- "version": "0.2.0",
3
+ "version": "0.4.1",
4
4
  "description": "Pragmatiks engineering principles eslint config and bundled semgrep rules.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,6 +23,12 @@
23
23
  "LICENSE",
24
24
  "CHANGELOG.md"
25
25
  ],
26
+ "scripts": {
27
+ "build": "tsup",
28
+ "format": "prettier --write .",
29
+ "check": "eslint . && tsc --noEmit",
30
+ "test": "vitest run"
31
+ },
26
32
  "peerDependencies": {
27
33
  "eslint": "^9.0.0",
28
34
  "eslint-plugin-sonarjs": "^4.0.0",
@@ -47,6 +53,11 @@
47
53
  "publishConfig": {
48
54
  "access": "public"
49
55
  },
56
+ "pnpm": {
57
+ "onlyBuiltDependencies": [
58
+ "esbuild"
59
+ ]
60
+ },
50
61
  "keywords": [
51
62
  "eslint",
52
63
  "eslint-config",
@@ -60,11 +71,5 @@
60
71
  "type": "git",
61
72
  "url": "git+https://github.com/pragmatiks/pragma-lint.git",
62
73
  "directory": "js"
63
- },
64
- "scripts": {
65
- "build": "tsup",
66
- "format": "prettier --write .",
67
- "check": "eslint . && tsc --noEmit",
68
- "test": "vitest run"
69
74
  }
70
- }
75
+ }
@@ -36,6 +36,67 @@ rules:
36
36
  ...
37
37
  requests.$METHOD(...)
38
38
  ...
39
+ - pattern-not: |
40
+ def $NAME(...):
41
+ ...
42
+ $PATH.read_text(...)
43
+ ...
44
+ - pattern-not: |
45
+ def $NAME(...):
46
+ ...
47
+ $PATH.read_bytes(...)
48
+ ...
49
+ - pattern-not: |
50
+ def $NAME(...):
51
+ ...
52
+ $PATH.write_text(...)
53
+ ...
54
+ - pattern-not: |
55
+ def $NAME(...):
56
+ ...
57
+ $PATH.write_bytes(...)
58
+ ...
59
+ - pattern-not: |
60
+ def $NAME(...):
61
+ ...
62
+ $PATH.unlink(...)
63
+ ...
64
+ - pattern-not: |
65
+ def $NAME(...):
66
+ ...
67
+ $PATH.mkdir(...)
68
+ ...
69
+ - pattern-not: |
70
+ def $NAME(...):
71
+ ...
72
+ $PATH.exists(...)
73
+ ...
74
+ - pattern-not: |
75
+ def $NAME(...):
76
+ ...
77
+ $PATH.iterdir(...)
78
+ ...
79
+ - pattern-not: |
80
+ def $NAME(...):
81
+ ...
82
+ $PATH.glob(...)
83
+ ...
84
+ - pattern-not: |
85
+ def $NAME(...):
86
+ ...
87
+ $PATH.rmdir(...)
88
+ ...
89
+ - pattern-not: |
90
+ def $NAME(...):
91
+ ...
92
+ shutil.$METHOD(...)
93
+ ...
94
+ - pattern-not: |
95
+ def $NAME(...):
96
+ ...
97
+ subprocess.$METHOD(...)
98
+ ...
99
+ - pattern-not-regex: '(?s)\bos\.(mkdir|makedirs|rmdir|removedirs|remove|unlink|rename|replace|kill|chdir|chmod|chown|symlink|link|stat|lstat|listdir|scandir|access|system|popen|path\.(exists|isfile|isdir|islink|getsize))\('
39
100
  - pattern-not-regex: '(?s)(database|session|connection|cursor|client)\.(execute|fetch|get|post|put|delete|query|read|write|save)\('
40
101
  message: "principle #7 I/O-prefixed function appears pure. Rename it with compute, build, derive, format, or parse."
41
102
  severity: WARNING
@@ -15,7 +15,7 @@ rules:
15
15
  - pattern: self.$NAME = $VALUE
16
16
  - metavariable-regex:
17
17
  metavariable: $NAME
18
- regex: '^(k8s|cfg|db|req|res|ctx|tmp|pkg|svc|mgr|repo|usr|pwd|idx|cnt|msg|err|btn|txt|num|val)$'
18
+ regex: '^(k8s|cfg|req|res|ctx|tmp|pkg|svc|mgr|repo|usr|pwd|idx|cnt|msg|err|btn|txt|num|val)$|^_*db(_\w+)?$|^\w*_db$'
19
19
  message: "principle #11 Abbreviated identifier hides meaning. Rename it with full words."
20
20
  severity: WARNING
21
21
  languages: [python]