@sun-asterisk/sunlint 1.3.29 → 1.3.31
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/origin-rules/common-en.md +14 -0
- package/package.json +1 -1
- package/rules/common/C006_function_naming/analyzer.js +279 -143
- package/rules/common/C067_no_hardcoded_config/symbol-based-analyzer.js +2 -1
- package/rules/security/S031_secure_session_cookies/analyzer.js +67 -112
- package/rules/security/S041_session_token_invalidation/analyzer.js +1 -1
- package/rules/security/S041_session_token_invalidation/symbol-based-analyzer.js +21 -2
- package/rules/security/S042_require_re_authentication_for_long_lived/symbol-based-analyzer.js +97 -4
- package/rules/security/S031_secure_session_cookies/regex-based-analyzer.js +0 -296
|
@@ -81,6 +81,20 @@
|
|
|
81
81
|
- Use verbs that describe specific actions
|
|
82
82
|
- Boolean functions should start with is/has/can/should
|
|
83
83
|
- Avoid generic names that lack context
|
|
84
|
+
- Accepted verbs (reference list):
|
|
85
|
+
- Getters/Queries: `get`, `fetch`, `retrieve`, `find`, `search`, `query`, `load`
|
|
86
|
+
- Setters/Modifiers: `set`, `update`, `modify`, `change`, `edit`, `alter`, `transform`
|
|
87
|
+
- Creation: `create`, `build`, `make`, `generate`, `construct`, `produce`
|
|
88
|
+
- Deletion: `delete`, `remove`, `destroy`, `clean`, `clear`, `reset`
|
|
89
|
+
- Validation: `validate`, `verify`, `check`, `confirm`, `ensure`, `test`, `compare`
|
|
90
|
+
- Computation: `calculate`, `compute`, `parse`, `format`, `convert`
|
|
91
|
+
- Communication: `send`, `receive`, `transmit`, `broadcast`, `emit`, `publish`
|
|
92
|
+
- Collections: `map`, `filter`, `sort`, `group`, `merge`, `split`, `add`, `append`, `insert`
|
|
93
|
+
- State checks: `is`, `has`, `can`, `should`, `will`, `does`
|
|
94
|
+
- UI actions: `show`, `hide`, `display`, `render`, `draw`, `toggle`, `enable`, `disable`
|
|
95
|
+
- Lifecycle: `connect`, `disconnect`, `open`, `close`, `start`, `stop`, `run`, `refresh`
|
|
96
|
+
- Event Handling: `on`, `trigger`, `fire`, `dispatch`, `invoke`, `call`
|
|
97
|
+
- Monitoring: `count`, `measure`, `monitor`, `watch`, `track`, `observe`
|
|
84
98
|
- **Applies to**: All languages
|
|
85
99
|
- **Tools**: PR review, AI Suggestion (Copilot Review)
|
|
86
100
|
- **Principles**: CODE_QUALITY
|
package/package.json
CHANGED