├── bin └── solid-codemod.js ├── .gitignore ├── src ├── transforms │ ├── solid@v2 │ │ ├── jsx-classlist-to-class │ │ │ ├── test │ │ │ │ ├── expected.tsx │ │ │ │ └── input.tsx │ │ │ └── index.js │ │ ├── jsx-array-map-to-for │ │ │ ├── test │ │ │ │ ├── expected.tsx │ │ │ │ └── input.tsx │ │ │ └── index.ts │ │ └── jsx-properties-to-attributes │ │ │ ├── test │ │ │ ├── input.tsx │ │ │ └── expected.tsx │ │ │ └── index.js │ └── shared.js ├── data │ └── solid@v2 │ │ ├── solid-jsx-types-to-json.js │ │ └── solid-markup.js ├── bin │ ├── run-transformer.js │ └── solid-codemod.js └── utils.js ├── tsconfig.json ├── release.mjs ├── LICENSE ├── package.json ├── .github └── ISSUE_TEMPLATE │ └── feature_request.yml └── README.md /bin/solid-codemod.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import '../src/bin/solid-codemod.js' 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json 3 | output.js 4 | output.jsx 5 | output.ts 6 | output.tsx 7 | data/test-data.json -------------------------------------------------------------------------------- /src/transforms/solid@v2/jsx-classlist-to-class/test/expected.tsx: -------------------------------------------------------------------------------- 1 | const test = [ 2 |
, 3 | , 7 | , 11 | ] 12 | -------------------------------------------------------------------------------- /src/transforms/solid@v2/jsx-classlist-to-class/test/input.tsx: -------------------------------------------------------------------------------- 1 | const test = [ 2 | , 3 | , 7 | , 11 | ] 12 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "checkJs": true, 5 | "strict": true, 6 | 7 | "target": "ESNext", 8 | "module": "ESNext", 9 | "moduleResolution": "node", 10 | "allowSyntheticDefaultImports": true, 11 | "esModuleInterop": true, 12 | "jsx": "preserve", 13 | "jsxImportSource": "solid-js", 14 | "types": ["solid-js", "node", "@types/jscodeshift"], 15 | "noEmit": true, 16 | "isolatedModules": true, 17 | 18 | "resolveJsonModule": true 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/transforms/solid@v2/jsx-array-map-to-for/test/expected.tsx: -------------------------------------------------------------------------------- 1 | import { createSignal, For } from 'solid-js' 2 | 3 | const test = [ 4 |
2 |
3 |