@geonosis/oxlint-plugin-biological-architecture 0.3.0 → 0.4.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/corpus/features/invoice/cells/bad-relative-cross-feature-store.tsx +9 -0
- package/corpus/features/invoice/cells/good-relative-own-store.tsx +8 -0
- package/corpus/features/invoice/organelles/bad-relative-cross-feature-organelle.tsx +11 -0
- package/corpus/features/invoice/organelles/good-relative-same-feature-organelle.tsx +11 -0
- package/dist/index.js +307 -532
- package/package.json +2 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// The same breach as bad-cross-feature-store.tsx, written the way a file two directories away
|
|
2
|
+
// writes it. The source names no feature until it is resolved against THIS file — which is exactly
|
|
3
|
+
// what no-cross-feature-stores used to be blind to.
|
|
4
|
+
import { useBillingStore } from '../../billing/stores/billing-store'
|
|
5
|
+
|
|
6
|
+
export function BadRelativeCrossFeatureStore() {
|
|
7
|
+
const total = useBillingStore((state) => state.total)
|
|
8
|
+
return <span>{total}</span>
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// A relative import of this feature's OWN store — allowed, and it must stay allowed once relative
|
|
2
|
+
// sources are resolved.
|
|
3
|
+
import { useInvoiceStore } from '../stores/invoice-store'
|
|
4
|
+
|
|
5
|
+
export function GoodRelativeOwnStore() {
|
|
6
|
+
const total = useInvoiceStore((state) => state.total)
|
|
7
|
+
return <span>{total}</span>
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// A relative climb out of this feature into ANOTHER feature's organelle. organelle-dependency must
|
|
2
|
+
// fire: where the import LANDS is the fact, not how it was spelled.
|
|
3
|
+
import { BillingTotals } from '../../billing/organelles/billing-totals'
|
|
4
|
+
|
|
5
|
+
export function BadRelativeCrossFeatureOrganelle() {
|
|
6
|
+
return (
|
|
7
|
+
<section>
|
|
8
|
+
<BillingTotals />
|
|
9
|
+
</section>
|
|
10
|
+
)
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// A sub-organelle in the SAME feature — the nucleolus in the nucleus. Allowed, and it must stay
|
|
2
|
+
// allowed once relative sources are resolved.
|
|
3
|
+
import { InvoiceLines } from './invoice-lines'
|
|
4
|
+
|
|
5
|
+
export function GoodRelativeSameFeatureOrganelle() {
|
|
6
|
+
return (
|
|
7
|
+
<section>
|
|
8
|
+
<InvoiceLines />
|
|
9
|
+
</section>
|
|
10
|
+
)
|
|
11
|
+
}
|