@thomaflette/eslint-plugin-solid-2 0.1.0 → 0.2.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.
@@ -0,0 +1,42 @@
1
+ # `solid/self-closing-comp`
2
+
3
+ Prefer self-closing syntax for empty JSX elements when allowed by the rule options.
4
+
5
+ This is a formatting/layout rule. It reports empty JSX elements that should be written as self-closing, or self-closing elements that should keep explicit closing tags based on the configured `html` and `component` options.
6
+
7
+ ## Bad
8
+
9
+ ```tsx
10
+ <div></div>
11
+ ```
12
+
13
+ ```tsx
14
+ <Button></Button>
15
+ ```
16
+
17
+ ## Good
18
+
19
+ ```tsx
20
+ <div />
21
+ ```
22
+
23
+ ```tsx
24
+ <Button />
25
+ ```
26
+
27
+ ```tsx
28
+ <div> </div>
29
+ ```
30
+
31
+ ## Notes
32
+
33
+ - **Why a stylistic rule lives in a correctness plugin:** this is the one deliberate scope
34
+ exception. It survives because it is _semantically inert_ (the report and both autofix
35
+ directions cannot change behavior, so the zero-FP/zero-corrupting-autofix bars are trivially
36
+ met), no formatter in the toolchain performs this normalization, and it was carried forward from
37
+ the original `eslint-plugin-solid` where users expect it. It is held to the same bars as every
38
+ other rule; it just guards style rather than correctness.
39
+ - `component` controls Solid/JSX components: `"all"` or `"none"`.
40
+ - `html` controls DOM elements: `"all"`, `"void"`, or `"none"`.
41
+ - Whitespace-only multiline children are treated as empty and can still be self-closed.
42
+ - Non-breaking spaces and explicit space expressions are treated as real children and are not self-closed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thomaflette/eslint-plugin-solid-2",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "Sound ESLint rules for Solid 2 reactivity and idiomatic control flow.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -21,7 +21,8 @@
21
21
  "url": "git+https://github.com/yumemi-thomas/eslint-plugin-solid-2.git"
22
22
  },
23
23
  "files": [
24
- "dist"
24
+ "dist",
25
+ "docs"
25
26
  ],
26
27
  "type": "module",
27
28
  "main": "./dist/index.cjs",
@@ -38,15 +39,15 @@
38
39
  "access": "public"
39
40
  },
40
41
  "dependencies": {
41
- "@typescript-eslint/utils": "^8.59.1"
42
+ "@typescript-eslint/utils": "^8.63.0"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@types/node": "^25.6.0",
45
- "@typescript-eslint/parser": "^8.59.1",
46
+ "@typescript-eslint/parser": "^8.63.0",
46
47
  "@typescript/native": "npm:typescript@^7.0.2",
47
48
  "@typescript/native-preview": "7.0.0-dev.20260502.1",
48
49
  "bumpp": "^11.0.1",
49
- "eslint": "^10.3.0",
50
+ "eslint": "10.7.0",
50
51
  "solid-js": "2.0.0-beta.17",
51
52
  "typescript": "npm:@typescript/typescript6@^6.0.2",
52
53
  "vite-plus": "^0.1.20"
@@ -60,6 +61,7 @@
60
61
  },
61
62
  "scripts": {
62
63
  "build": "vp pack",
64
+ "bench": "vp test bench",
63
65
  "dev": "vp pack --watch",
64
66
  "test": "vp test",
65
67
  "check": "vp check"