@cascivo/eslint-config 0.2.3 → 0.3.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.
- package/package.json +4 -1
- package/src/index.d.ts +9 -1
- package/src/index.js +25 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cascivo/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Flat ESLint config for apps using cascivo — reconciles the signal-based reactivity contract with eslint-plugin-react-hooks 7",
|
|
6
6
|
"keywords": [
|
|
@@ -38,6 +38,9 @@
|
|
|
38
38
|
"access": "public",
|
|
39
39
|
"provenance": true
|
|
40
40
|
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@cascivo/eslint-plugin": "0.1.1"
|
|
43
|
+
},
|
|
41
44
|
"scripts": {
|
|
42
45
|
"build": "echo 'eslint-config: plain ESM, no build'",
|
|
43
46
|
"test": "node --test src/index.test.js"
|
package/src/index.d.ts
CHANGED
|
@@ -22,6 +22,14 @@ export interface CascadeFlatConfig {
|
|
|
22
22
|
*/
|
|
23
23
|
export declare const cascivoSignals: CascadeFlatConfig
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Enables `cascivo/prop-vocabulary` at **warn** — the rule that answers a wrong prop guess
|
|
27
|
+
* with the prop that exists (`<Text tone=…>` → `muted`, `gap="4"` → `gap={4}`,
|
|
28
|
+
* `const { theme } = useTheme()` → the tuple). Kept at `warn` deliberately: an error over a
|
|
29
|
+
* naming opinion gets this whole config deleted.
|
|
30
|
+
*/
|
|
31
|
+
export declare const cascivoPropVocabulary: CascadeFlatConfig
|
|
32
|
+
|
|
25
33
|
/**
|
|
26
34
|
* Scopes host stylistic rules off source vendored by `cascivo add`. Copy-paste path only.
|
|
27
35
|
*
|
|
@@ -29,6 +37,6 @@ export declare const cascivoSignals: CascadeFlatConfig
|
|
|
29
37
|
*/
|
|
30
38
|
export declare function cascivoVendoredSource(glob?: string): CascadeFlatConfig
|
|
31
39
|
|
|
32
|
-
/**
|
|
40
|
+
/** Every fragment. Spread last in your flat config — last-wins. */
|
|
33
41
|
declare const cascivo: CascadeFlatConfig[]
|
|
34
42
|
export default cascivo
|
package/src/index.js
CHANGED
|
@@ -47,10 +47,11 @@
|
|
|
47
47
|
* Prefer the pieces individually when you only vendor source, or only use the package:
|
|
48
48
|
*
|
|
49
49
|
* ```js
|
|
50
|
-
* import { cascivoSignals, cascivoVendoredSource } from '@cascivo/eslint-config'
|
|
51
|
-
* export default [...yourConfig, cascivoSignals, cascivoVendoredSource()]
|
|
50
|
+
* import { cascivoSignals, cascivoPropVocabulary, cascivoVendoredSource } from '@cascivo/eslint-config'
|
|
51
|
+
* export default [...yourConfig, cascivoSignals, cascivoPropVocabulary, cascivoVendoredSource()]
|
|
52
52
|
* ```
|
|
53
53
|
*/
|
|
54
|
+
import cascivoPlugin from '@cascivo/eslint-plugin'
|
|
54
55
|
|
|
55
56
|
/**
|
|
56
57
|
* Reconciles `eslint-plugin-react-hooks@7` with cascivo's signal-based reactivity.
|
|
@@ -147,7 +148,27 @@ export function cascivoVendoredSource(glob = 'src/components/ui/**') {
|
|
|
147
148
|
}
|
|
148
149
|
}
|
|
149
150
|
|
|
150
|
-
/**
|
|
151
|
-
|
|
151
|
+
/**
|
|
152
|
+
* The near-miss prop messages, at `warn`.
|
|
153
|
+
*
|
|
154
|
+
* `<Text tone="subtle">` is a correct TypeScript error whose text — "Property 'tone' does not
|
|
155
|
+
* exist on type 'TextProps'" — names the mistake and teaches nothing, so the adopter goes
|
|
156
|
+
* looking for the docs. That is the dependency the 2026-08-21 report named: "the docs are
|
|
157
|
+
* doing work the API should eventually do itself." Most of that work moved into the types;
|
|
158
|
+
* this rule carries the part TypeScript structurally cannot say. See
|
|
159
|
+
* `@cascivo/eslint-plugin`'s `prop-vocabulary.js` for the full rationale.
|
|
160
|
+
*
|
|
161
|
+
* **`warn`, never `error`.** A lint rule that fails somebody's build over a naming opinion
|
|
162
|
+
* gets the whole config deleted — and that takes `react-hooks/immutability` with it, which is
|
|
163
|
+
* the thing this package exists for. Raise it yourself if you want it enforced.
|
|
164
|
+
*/
|
|
165
|
+
export const cascivoPropVocabulary = {
|
|
166
|
+
name: 'cascivo/prop-vocabulary',
|
|
167
|
+
plugins: { cascivo: cascivoPlugin },
|
|
168
|
+
rules: { 'cascivo/prop-vocabulary': 'warn' },
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** All three fragments, in the order flat config wants them. Spread last. */
|
|
172
|
+
const cascivo = [cascivoSignals, cascivoPropVocabulary, cascivoVendoredSource()]
|
|
152
173
|
|
|
153
174
|
export default cascivo
|