@plumeria/eslint-plugin 18.2.15 → 18.2.17

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 (2) hide show
  1. package/README.md +54 -34
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -64,7 +64,10 @@ A single rule can override that if you need it to:
64
64
  The name must match whatever the loader or unplugin was given. If they disagree,
65
65
  the lint rules report against a prop the compiler never transforms.
66
66
 
67
- ## Rules
67
+ ## Recommended rules
68
+
69
+ The following rules are enabled by `plumeria.configs.recommended` with the
70
+ severity shown in [Recommended configuration](#recommended-configuration).
68
71
 
69
72
  ### props-require-import
70
73
 
@@ -118,6 +121,50 @@ properties in a vertical one, which is per element and cannot be read from the
118
121
  source. The rule reads them as one property; disable the line where an element
119
122
  is known to be vertical.
120
123
 
124
+ ### no-unknown-css-properties
125
+
126
+ Disallow unknown CSS properties in camelCase within `css.create`, `css.keyframes`, and `css.viewTransition`.
127
+
128
+ ### no-unused-keys
129
+
130
+ Warns when object keys are defined but not used, mainly in component files.
131
+
132
+ ### sort-properties
133
+
134
+ Automatically sorts CSS properties in the recommended order for consistency and maintainability.
135
+
136
+ ### format-properties
137
+
138
+ Automatically format for consistency and maintainability.
139
+
140
+ - Formats a line into a multi-line.
141
+ - Formats by filling in blank lines.
142
+
143
+ ### validate-values
144
+
145
+ Validates CSS property values for correctness. Only standard CSS properties are checked; properties with string literal keys (e.g., computed or dynamic property names) are not validated.
146
+
147
+ ### validate-pseudos
148
+
149
+ Validates CSS pseudo-classes and pseudo-elements inside `css.create()`. It checks for typos and structural correctness and supports validation of computed keys when TypeScript is available.
150
+
151
+ ## Optional rules
152
+
153
+ These rules are not enabled by `plumeria.configs.recommended`. Enable only the
154
+ policy or transformation that fits the project:
155
+
156
+ ```js
157
+ export default [
158
+ plumeria.configs.recommended,
159
+ {
160
+ rules: {
161
+ '@plumeria/no-physical-properties': 'warn',
162
+ '@plumeria/expand-border-shorthands': 'warn',
163
+ },
164
+ },
165
+ ];
166
+ ```
167
+
121
168
  ### expand-border-shorthands
122
169
 
123
170
  Expands a border shorthand that bundles a width, a style and a color —
@@ -128,7 +175,7 @@ them turns the last unrankable pairs into ordinary shorthand-to-longhand ones.
128
175
 
129
176
  Fixable. A value it cannot split, such as `var(--edge)` or `inherit`, is
130
177
  reported without a fix: leaving it silent would let the expanded declarations
131
- elsewhere outrank it. Not part of `recommended`.
178
+ elsewhere outrank it.
132
179
 
133
180
  ```js
134
181
  borderTop: '1px solid red'
@@ -149,38 +196,11 @@ Accepts `{ sizes }`, which adds `width`, `height`, their `min`/`max` forms,
149
196
  default: a size is one property under either spelling, while an edge is what a
150
197
  direction reverses.
151
198
 
152
- Neither is part of `recommended`, and turning both on is contradictory. Reach
153
- for one when you want the pairs `no-order-dependent-overlap` reports to be
154
- impossible to write: a property that appears under one spelling only can never
155
- meet its other spelling on an element. A shorthand with no single counterpart,
156
- such as `borderBlockWidth`, is outside either rule and stays reported.
157
-
158
- ### no-unknown-css-properties
159
-
160
- Disallow unknown CSS properties in camelCase within `css.create`, `css.keyframes`, and `css.viewTransition`.
161
-
162
- ### no-unused-keys
163
-
164
- Warns when object keys are defined but not used, mainly in component files.
165
-
166
- ### sort-properties
167
-
168
- Automatically sorts CSS properties in the recommended order for consistency and maintainability.
169
-
170
- ### format-properties
171
-
172
- Automatically format for consistency and maintainability.
173
-
174
- - Formats a line into a multi-line.
175
- - Formats by filling in blank lines.
176
-
177
- ### validate-values
178
-
179
- Validates CSS property values for correctness. Only standard CSS properties are checked; properties with string literal keys (e.g., computed or dynamic property names) are not validated.
180
-
181
- ### validate-pseudos
182
-
183
- Validates CSS pseudo-classes and pseudo-elements inside `css.create()`. It checks for typos and structural correctness and supports validation of computed keys when TypeScript is available.
199
+ Turning both rules on is contradictory. Reach for one when you want the pairs
200
+ `no-order-dependent-overlap` reports to be impossible to write: a property that
201
+ appears under one spelling only can never meet its other spelling on an element.
202
+ A shorthand with no single counterpart, such as `borderBlockWidth`, is outside
203
+ either rule and stays reported.
184
204
 
185
205
  ## CLI (plumerialint)
186
206
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/eslint-plugin",
3
- "version": "18.2.15",
3
+ "version": "18.2.17",
4
4
  "description": "Plumeria ESLint plugin",
5
5
  "author": "Refirst 11",
6
6
  "license": "MIT",