Skip to content

Commit b27b827

Browse files
committed
fix: prettier, eslint
1 parent 6dd7aee commit b27b827

30 files changed

+24541
-22944
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Stop the editor from looking for .editorconfig files in the parent directories
2+
# root = true
3+
4+
[*]
5+
# Non-configurable Prettier behaviors
6+
charset = utf-8
7+
insert_final_newline = true
8+
# Caveat: Prettier won’t trim trailing whitespace inside template strings, but your editor might.
9+
# trim_trailing_whitespace = true
10+
11+
# Configurable Prettier behaviors
12+
# (change these if your Prettier config differs)
13+
end_of_line = lf
14+
indent_style = space
15+
indent_size = 2
16+
max_line_length = 80

.eslintrc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"commonjs": true,
5+
"es6": true,
6+
"node": true
7+
},
8+
9+
"rules": {
10+
"brace-style": "error",
11+
"camelcase": ["error", { "properties": "never" }],
12+
"comma-dangle": ["error", "never"],
13+
"func-call-spacing": ["error", "never"],
14+
"eqeqeq": "warn",
15+
"indent": ["error", 2, { "SwitchCase": 1 }],
16+
"key-spacing": ["error", { "beforeColon": false }],
17+
"no-console": "off",
18+
"no-fallthrough": "warn",
19+
"prefer-const": "error",
20+
"quotes": ["error", "single"],
21+
"semi": ["error", "never"]
22+
}
23+
}

.github/workflows/static.yml

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,60 @@
22
name: Deploy static content to Pages
33

44
on:
5-
# Runs on pushes targeting the default branch
6-
push:
7-
branches: ["master"]
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ['master']
88

9-
# Allows you to run this workflow manually from the Actions tab
10-
workflow_dispatch:
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
1111

1212
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1313
permissions:
14-
contents: read
15-
pages: write
16-
id-token: write
14+
contents: read
15+
pages: write
16+
id-token: write
1717

1818
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1919
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2020
concurrency:
21-
group: "pages"
22-
cancel-in-progress: false
21+
group: 'pages'
22+
cancel-in-progress: false
2323

2424
env:
25-
# Hosted GitHub runners have 7 GB of memory available, let's use 6 GB
26-
NODE_OPTIONS: --max-old-space-size=6144
25+
# Hosted GitHub runners have 7 GB of memory available, let's use 6 GB
26+
NODE_OPTIONS: --max-old-space-size=6144
2727

2828
jobs:
29-
# Single deploy job since we're just deploying
30-
deploy:
31-
environment:
32-
name: github-pages
33-
url: ${{ steps.deployment.outputs.page_url }}
34-
runs-on: ubuntu-latest
35-
steps:
36-
- name: Checkout
37-
uses: actions/checkout@v4
38-
39-
- name: Set up Node.js
40-
uses: actions/setup-node@v3
41-
with:
42-
node-version: 18 # Use Node.js 18 here
43-
44-
- name: Install dependencies
45-
run: npm install
46-
47-
- name: Build site
48-
run: npm run build
49-
50-
- name: Setup Pages
51-
uses: actions/configure-pages@v5
52-
53-
- name: Upload artifact
54-
uses: actions/upload-pages-artifact@v3
55-
with:
56-
# Upload entire repository
57-
path: "build"
58-
59-
- name: Deploy to GitHub Pages
60-
id: deployment
61-
uses: actions/deploy-pages@v4
29+
# Single deploy job since we're just deploying
30+
deploy:
31+
environment:
32+
name: github-pages
33+
url: ${{ steps.deployment.outputs.page_url }}
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
39+
- name: Set up Node.js
40+
uses: actions/setup-node@v3
41+
with:
42+
node-version: 18 # Use Node.js 18 here
43+
44+
- name: Install dependencies
45+
run: npm install
46+
47+
- name: Build site
48+
run: npm run build
49+
50+
- name: Setup Pages
51+
uses: actions/configure-pages@v5
52+
53+
- name: Upload artifact
54+
uses: actions/upload-pages-artifact@v3
55+
with:
56+
# Upload entire repository
57+
path: 'build'
58+
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# Production
55
/build
6+
/dist
67

78
# Generated files
89
.docusaurus

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore artifacts:
2+
build
3+
coverage

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "none",
3+
"tabWidth": 4,
4+
"semi": false,
5+
"singleQuote": true
6+
}

blog/2021-12-07-welcome/index.md

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)