Solid adapter
Extract prose from .tsx and .jsx SolidJS files.
@faircopy/solid extracts prose from SolidJS .tsx and .jsx files. Same JSX parsing as the React adapter with one addition: it skips attribute extraction on SolidJS control-flow components, since their props are code expressions, not prose.
Install
npm install -D @faircopy/solid
Usage
import { solid } from '@faircopy/solid'
import { defineConfig } from '@faircopy/config'
export default defineConfig({
files: ['src/**/*.{tsx,jsx}'],
adapters: [solid()],
rules: {
'no-em-dash': 'error',
'no-weasel-words': 'error',
'no-rhetorical-scaffolding': 'error',
},
})
Control-flow exceptions
For these SolidJS components, faircopy skips attribute extraction (the props are code, not prose). Children are still extracted.
<Show when={...} fallback={...}><For each={...} fallback={...}><Switch>/<Match><Dynamic component={...}><Portal><ErrorBoundary>
Options
Same shape as the React adapter. See Adapters / React.
solid({
lintExpressionStrings: true,
lintProseProps: { props: ['label', 'subtitle'] },
skipTags: ['CodeBlock'],
})