solidjs/solid
A declarative, efficient, and flexible JavaScript library for building user interfaces.
TypeScript★ 36,651+40 that day#12 on trending
D50/100
Duplication31
14.4% in typescript, tsx, javascript, rust, jsx, bashDead code99
0.1%Complexity43
61.3% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
3.01%duplicated code · 4,690 of 156,018 lines
303clones in code
298code files of 2,908 scanned
14.41%duplicated over all files · 5,775 clones
Most complex files
- packages/web/src/server.ts1741 cx
- packages/solid/src/server/signals.ts1103 cx
- packages/signals/src/store/store.ts1088 cx
- packages/web/src/client.ts1023 cx
- packages/signals/src/core/attribution.ts987 cx
- packages/solid/test/server/ssr-async.spec.ts978 cx
- packages/web/server-functions/src/server.ts951 cx
- packages/signals/tests/store/createOptimisticStore.test.ts885 cx
- packages/signals/src/core/core.ts827 cx
- packages/solid/test/client-hydration.spec.ts806 cx
Dead code 0.12% unused · 29 findings
- packages/signals/src/attribution.prod.tsunused-file
- packages/signals/scripts/store-size.mjsunused-file
- packages/diagnostics/scripts/fake-page.mjsunused-file
- packages/compiler/scripts/parity-diff.mjsunused-file
- scripts/size/sc-router-app.jsunused-file
- scripts/size/sc-live-router-app.jsunused-file
- packages/signals/scripts/scan-hangs.mjsunused-file
- packages/element/sample.jsxunused-file
- scripts/size/hydrating-store-app.jsunused-file
- scripts/size/sc-live-app.jsunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 2 generated files: packages/h/jsx-runtime/src/jsx.d.ts, packages/web/jsx/jsx.d.ts.
Largest clones in the code
- 137 lines in 2 placestypescript321 tokens
38type PreloadLinkAttributes = { 39 type?: string; 40 crossorigin?: JSX.HTMLCrossorigin; 41 integrity?: string; 42 referrerpolicy?: JSX.HTMLReferrerPolicy; 43 fetchpriority?: JSX.HTMLFetchPriority; 44 media?: string; 45}; 46 47/**First 10 of 137 lines.
- 89 lines in 2 placestypescript317 tokens
355 IS_OBSERVE ? { name: "eval conditions", sync: true } : { sync: true } 356 ) as unknown as SolidElement; 357} 358 359export type MatchProps<T, F extends ConditionalRenderCallback<T> = ConditionalRenderCallback<T>> = { 360 when: T | undefined | null | false; 361 keyed?: false; 362 children: ConditionalRenderChildren<T, F>; 363}; 364export type KeyedMatchProps<First 10 of 89 lines.
- 53 lines in 2 placestypescript316 tokens
40 : `Stale read from <${name}>.`; 41}; 42 43/** 44 * Creates a list of elements from a list. 45 * 46 * Receives a map function as its child and returns a JSX element for each 47 * list item; if the list is empty, an optional `fallback` is rendered instead. 48 * 49 * The child callback shape follows the keying mode:38 fallback?: Accessor<SolidElement>; 39}; 40 41/** 42 * Creates a list of elements from a list 43 * @description https://docs.solidjs.com/reference/solid-js/components-jsx/for 44 */ 45export function For<T extends readonly any[], U extends SolidElement>(props: { 46 each: T | undefined | null | false; 47 fallback?: SolidElement;First 10 of 53 lines, the second copy on the right.
7 more
- 59 lines in 2 placestypescript267 tokens
- 142 lines in 2 placestypescript256 tokens
- 17 lines in 3 placesrust128 tokens
- 57 lines in 2 placestypescript235 tokens
- 41 lines in 2 placestypescript225 tokens
- 20 lines in 2 placestypescript220 tokens
- 40 lines in 2 placesrust216 tokens
Largest clones over all files, tests and data included
- 4037 lines in 2 placestypescriptgenerated18,252 tokens
139type Element = SolidElement | Node | FunctionElement | ArrayElement; 140// END - difference between `jsx.d.ts` and `jsx-h.d.ts` 141 142interface ArrayElement extends Array<Element> {} 143 144interface ElementClass { 145 // empty, libs can define requirements downstream 146} 147interface ElementAttributesProperty { 148 // empty, libs can define requirements downstreamFirst 10 of 4037 lines.
- 353 lines in 4 placesjavascripttests2,341 tokenspackages/babel-plugin/test/__dom_compatible_fixtures__/attributeExpressions/code.js:1–353packages/babel-plugin/test/__dynamic_fixtures__/attributeExpressions/code.js:1–358packages/babel-plugin/test/__ssr_fixtures__/attributeExpressions/code.js:1–358packages/babel-plugin/test/__ssr_hydratable_fixtures__/attributeExpressions/code.js:1–358
1import * as styles from "./styles.module.css"; 2import { binding } from "somewhere"; 3 4function refFn() {} 5const refConst = null; 6 7const selected = true; 8let id = "my-h1"; 9let link; 10const template = (First 10 of 353 lines.
- 554 lines in 2 placesmarkdowndocs and examples3,671 tokens
87- 7182195: Move frames, server-functions, and serialization implementations into their subpath folders. Bind `@solidjs/h` and `@solidjs/html` directly to `@sol… 88- Updated dependencies [366c0eb] 89- Updated dependencies [2c9fdd9] 90- Updated dependencies [89a0531] 91- Updated dependencies [ee73e05] 92- Updated dependencies [475744c] 93- Updated dependencies [5ab6c61] 94- Updated dependencies [9b4dd76] 95- Updated dependencies [bacfb34] 96- Updated dependencies [32996e8]First 10 of 554 lines.
- 677 lines in 2 placesjavascripttests3,540 tokens
- 416 lines in 2 placesjavascripttests3,268 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| rust | 78 | 42,283 | 158 | 1,799 | 4.25% |
| typescript | 164 | 101,434 | 130 | 2,641 | 2.6% |
| javascript | 54 | 12,257 | 15 | 250 | 2.04% |
| jsx | 1 | 33 | 0 | 0 | 0% |
| bash | 1 | 11 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 990 | 308,490 | 2,225 | 36,612 | 11.87% |
| tsx | 811 | 136,982 | 1,588 | 19,288 | 14.08% |
| javascript | 713 | 85,105 | 964 | 24,847 | 29.2% |
| markdown | 137 | 90,433 | 800 | 13,763 | 15.22% |
| rust | 85 | 43,806 | 159 | 1,813 | 4.14% |
| json | 62 | 3,344 | 19 | 365 | 10.92% |
| css | 16 | 4,308 | 10 | 719 | 16.69% |
| diff | 9 | 1,368 | 3 | 51 | 3.73% |
| jsx | 44 | 1,283 | 3 | 19 | 1.48% |
| yaml | 12 | 779 | 2 | 24 | 3.08% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Nov 19, 2026 | #12 | 36,651 (+40) | 2,908 | 676,582 | 5,775 | 14.41% | 3.01% | D 50 | 0c031aa |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.