Skip to content

Commit

Permalink
Merge pull request #1 from solidjs/ns-add-prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
nksaraf authored Apr 4, 2022
2 parents a375cb9 + f507a74 commit 901a3ae
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 901a3ae

Please sign in to comment.