Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into solid-markdown-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
andi23rosca committed Oct 31, 2023
2 parents 1787d12 + 33f63ab commit 7288cae
Show file tree
Hide file tree
Showing 12 changed files with 87 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
example
dist
17 changes: 17 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"extends": ["eslint:recommended", "prettier", "plugin:solid/recommended"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["solid"]
}
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish

permissions:
contents: write
issues: write
pull-requests: write

on:
push:
branches:
- "main"

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: latest
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- run: pnpm i
- run: pnpm lint
- run: pnpm build

- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
HUSKY: 0
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
dist
.eslintcache
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
example
.husky
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": false,
"semi": true,
"trailingComma": "es5",
"proseWrap": "preserve"
}
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Render markdown as solid components.
The implementation is 90% shamelessly copied from https://github.com/remarkjs/react-markdown.

Changes include:

- Replacing React specific component creation with SolidJS components
- Porting the implementation from javascript with JSDoc types to typescript

Expand All @@ -31,11 +32,12 @@ const markdown = `
- here's
- a
- list
`
`;
const App = () => {
return <SolidMarkdown children={markdown} />
}
return <SolidMarkdown children={markdown} />;
};
```

## TODO

- [ ] Port unit tests from from original library
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
{
"name": "High1",
"url": "https://github.com/high1"
},
{
"name": "Patrick Heneise",
"url": "https://github.com/patrickheneise"
}
],
"repository": {
Expand Down Expand Up @@ -116,4 +120,4 @@
"node": ">=18",
"pnpm": ">=8.6.0"
}
}
}
1 change: 1 addition & 0 deletions src/rehype-filter.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-unused-vars */
import { visit } from "unist-util-visit";
import type { Element as HElement, Root as HRoot } from "hast";
import type { Plugin } from "unified";
Expand Down

0 comments on commit 7288cae

Please sign in to comment.