Skip to content

Commit

Permalink
Add prettier and autoformat hook
Browse files Browse the repository at this point in the history
Test hook

Test hook and add readme

Test hook

Test hook
  • Loading branch information
nas5w committed Apr 4, 2022
1 parent a375cb9 commit f507a74
Show file tree
Hide file tree
Showing 24 changed files with 475 additions and 167 deletions.
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 pretty-quick --staged
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.solid
dist
pnpm-lock.yaml
*.min.*
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Solid Docs

Working repo for solid docs

# Prettier

To minimize diffs, this repo uses the default prettier config. To enable autoformatting pre-commit, run the following command:

```bash
npx husky install
```
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"@mdx-js/rollup": "^2.0.0",
"@types/bad-words": "^3.0.1",
"bad-words": "^3.0.4",
"husky": "^7.0.4",
"prettier": "2.6.2",
"pretty-quick": "^3.1.3",
"rehype-autolink-headings": "^6.1.1",
"rehype-raw": "^6.1.1",
"rehype-slug": "^5.0.1",
Expand Down
176 changes: 176 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/code.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ code,
kbd,
pre,
samp {
font-family: Source Code Pro, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
Liberation Mono, Courier New, monospace;
font-family: Source Code Pro, ui-monospace, SFMono-Regular, Menlo, Monaco,
Consolas, Liberation Mono, Courier New, monospace;
}

code {
Expand Down
4 changes: 3 additions & 1 deletion src/components/ApiSection.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Component, JSX } from "solid-js";
import md from "~/md";

const ApiSection: Component<{ name: string; description: JSX.Element; }> = props => {
const ApiSection: Component<{ name: string; description: JSX.Element }> = (
props
) => {
return (
<section class="bg-gray-100 border-2 shadow-lg p-2 my-4 rounded-lg">
<md.h2>{props.name}</md.h2>
Expand Down
Loading

0 comments on commit f507a74

Please sign in to comment.