Skip to content

Commit

Permalink
chore: run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
berkaltiok committed Apr 17, 2024
1 parent 332dff5 commit 9e118dd
Show file tree
Hide file tree
Showing 18 changed files with 280 additions and 163 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to GitHub Pages
name: Deploy

on:
push:
Expand Down
102 changes: 102 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
###
# Place your Prettier ignore content here

###
# .gitignore content is duplicated here due to https://github.com/prettier/prettier/issues/8506

# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# Nuxt generate
dist

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless

# IDE / Editor
.idea

# Service worker
sw.*

# macOS
.DS_Store

# Vim swap files
*.swp

static

.output

pnpm-lock.yaml
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"htmlWhitespaceSensitivity": "ignore",
"printWidth": 120,
"trailingComma": "none"
}
4 changes: 2 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
presets: [require.resolve("@docusaurus/core/lib/babel/preset")]
}
4 changes: 2 additions & 2 deletions blog/2021-08-01-mdx-blog-post.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/mar
Use the power of React to create interactive blog posts.

```js
<button onClick={() => alert('button clicked!')}>Click me!</button>
<button onClick={() => alert("button clicked!")}>Click me!</button>
```

<button onClick={() => alert('button clicked!')}>Click me!</button>
<button onClick={() => alert("button clicked!")}>Click me!</button>

:::
18 changes: 9 additions & 9 deletions docs/tutorial-basics/create-a-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Add metadata to customize the sidebar label and position:

```md title="docs/hello.md" {1-4}
---
sidebar_label: 'Hi!'
sidebar_label: "Hi!"
sidebar_position: 3
---

Expand All @@ -44,14 +44,14 @@ It is also possible to create your sidebar explicitly in `sidebars.js`:
```js title="sidebars.js"
export default {
tutorialSidebar: [
'intro',
"intro",
// highlight-next-line
'hello',
"hello",
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
};
type: "category",
label: "Tutorial",
items: ["tutorial-basics/create-a-document"]
}
]
}
```
6 changes: 3 additions & 3 deletions docs/tutorial-basics/create-a-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ Add **Markdown or React** files to `src/pages` to create a **standalone page**:
Create a file at `src/pages/my-react-page.js`:

```jsx title="src/pages/my-react-page.js"
import React from 'react';
import Layout from '@theme/Layout';
import React from "react"
import Layout from "@theme/Layout"

export default function MyReactPage() {
return (
<Layout>
<h1>My React page</h1>
<p>This is a React page</p>
</Layout>
);
)
}
```

Expand Down
21 changes: 11 additions & 10 deletions docs/tutorial-basics/markdown-features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ Markdown code blocks are supported with Syntax highlighting.
````md
```jsx title="src/components/HelloDocusaurus.js"
function HelloDocusaurus() {
return <h1>Hello, Docusaurus!</h1>;
return <h1>Hello, Docusaurus!</h1>
}
```
````

```jsx title="src/components/HelloDocusaurus.js"
function HelloDocusaurus() {
return <h1>Hello, Docusaurus!</h1>;
return <h1>Hello, Docusaurus!</h1>
}
```

Expand Down Expand Up @@ -131,21 +131,22 @@ This is <Highlight color="#25c2a0">Docusaurus green</Highlight> !
This is <Highlight color="#1877F2">Facebook blue</Highlight> !
```

export const Highlight = ({children, color}) => (
export const Highlight = ({ children, color }) => (
<span
style={{
backgroundColor: color,
borderRadius: '20px',
color: '#fff',
padding: '10px',
cursor: 'pointer',
borderRadius: "20px",
color: "#fff",
padding: "10px",
cursor: "pointer"
}}
onClick={() => {
alert(`You clicked the color ${color} with label ${children}`);
}}>
alert(`You clicked the color ${color} with label ${children}`)
}}
>
{children}
</span>
);
)

This is <Highlight color="#25c2a0">Docusaurus green</Highlight> !

Expand Down
12 changes: 6 additions & 6 deletions docs/tutorial-extras/manage-docs-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ export default {
items: [
// highlight-start
{
type: 'docsVersionDropdown',
},
type: "docsVersionDropdown"
}
// highlight-end
],
},
},
};
]
}
}
}
```

The docs version dropdown appears in your navbar:
Expand Down
20 changes: 10 additions & 10 deletions docs/tutorial-extras/translate-your-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Modify `docusaurus.config.js` to add support for the `fr` locale:
```js title="docusaurus.config.js"
export default {
i18n: {
defaultLocale: 'en',
locales: ['en', 'fr'],
},
};
defaultLocale: "en",
locales: ["en", "fr"]
}
}
```

## Translate a doc
Expand Down Expand Up @@ -60,13 +60,13 @@ export default {
items: [
// highlight-start
{
type: 'localeDropdown',
},
type: "localeDropdown"
}
// highlight-end
],
},
},
};
]
}
}
}
```

The locale dropdown now appears in your navbar:
Expand Down
Loading

0 comments on commit 9e118dd

Please sign in to comment.