@asd14/eslint-plugin 1.0.0 → 1.1.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.
Files changed (3) hide show
  1. package/README.md +5 -4
  2. package/SKILL.md +4 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -20,7 +20,8 @@
20
20
  npm install @asd14/eslint-plugin --save-dev
21
21
  ```
22
22
 
23
- > NOTE: requires peerDependency `eslint^9` or `eslint^10`
23
+ > [!NOTE]
24
+ > Works with either `eslint ^9` or `eslint ^10`.
24
25
 
25
26
  ## Rules
26
27
 
@@ -29,7 +30,7 @@ npm install @asd14/eslint-plugin --save-dev
29
30
  Enforce consistent error message format in `throw` statements.
30
31
 
31
32
  - Per error class: `Error`, `TypeError` or custom `DBError`
32
- - Each is an array of `RegExp` patterns
33
+ - Each class is an array of `RegExp` patterns
33
34
  - `OR` matching, first match wins
34
35
 
35
36
  ```js
@@ -64,7 +65,7 @@ export default [
64
65
  ]
65
66
  ```
66
67
 
67
- Examples of **correct** code:
68
+ **Correct** message examples:
68
69
 
69
70
  ```js
70
71
  // Template literal with interpolation
@@ -86,7 +87,7 @@ throw new TypeError(
86
87
  throw new Error("something went wrong")
87
88
  ```
88
89
 
89
- Examples of **incorrect** code:
90
+ **Incorrect** message examples:
90
91
 
91
92
  ```js
92
93
  // Missing @asd14/m/ prefix
package/SKILL.md CHANGED
@@ -12,12 +12,11 @@ Requires `eslint ^9 || ^10` as peer dependency.
12
12
 
13
13
  ## error-message-format
14
14
 
15
- Enforces consistent format in `throw new Error(...)` statements.
15
+ Enforce consistent error message format in `throw` statements.
16
16
 
17
- - Configured per error class (`TypeError`, `Error`, custom classes)
18
- - Each class: array of `{ pattern, message }` checks
19
- - `pattern`: plain regex string, no `/` delimiters, passed to `new RegExp()`
20
- - OR matching: first match wins, reports if none match
17
+ - Per error class: `Error`, `TypeError` or custom `DBError`
18
+ - Each class is an array of `RegExp` patterns
19
+ - `OR` matching, first match wins
21
20
  - Supports string literals, template literals, and string concatenation
22
21
  - Variables or function calls as the sole argument are flagged as non-evaluable
23
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asd14/eslint-plugin",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "ESLint rules for opinionated DX not covered by existing plugins",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,