Skip to content

Commit a438c1a

Browse files
authored
chore: Use Nuxt3 offical starter instead of sidebase/merino (#36)
1 parent 80ef34c commit a438c1a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+5328
-8556
lines changed

Diff for: .eslintrc

-39
This file was deleted.

Diff for: .github/workflows/ci.yaml

+52-15
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,73 @@ jobs:
1010
testCodebase:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
14+
- name: Use Node.js 20.6.1
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 20.6.1
1418

15-
- name: Use Node.js 16.14.2
16-
uses: actions/setup-node@v3
19+
- uses: pnpm/action-setup@v3
20+
name: Install pnpm
21+
id: pnpm-install
1722
with:
18-
node-version: 16.14.2
23+
version: 8
24+
25+
- name: Get pnpm store directory
26+
shell: bash
27+
run: |
28+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
1929
20-
- run: npm ci
30+
- uses: actions/cache@v4
31+
name: Setup pnpm cache
32+
with:
33+
path: ${{ env.STORE_PATH }}
34+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
35+
restore-keys: |
36+
${{ runner.os }}-pnpm-store-
2137
22-
- run: npm run lint
23-
- run: npm run typecheck
38+
- run: pnpm install
39+
40+
- run: pnpm run lint
41+
- run: pnpm run typecheck
2442

2543
testCli:
2644
runs-on: ubuntu-latest
2745
steps:
28-
- uses: actions/checkout@v3
29-
- name: Use Node.js 16.14.2
30-
uses: actions/setup-node@v3
46+
- uses: actions/checkout@v4
47+
- name: Use Node.js 20.6.1
48+
uses: actions/setup-node@v4
49+
with:
50+
node-version: 20.6.1
51+
52+
- uses: pnpm/action-setup@v3
53+
name: Install pnpm
54+
id: pnpm-install
55+
with:
56+
version: 8
57+
58+
- name: Get pnpm store directory
59+
shell: bash
60+
run: |
61+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
62+
63+
- uses: actions/cache@v4
64+
name: Setup pnpm cache
3165
with:
32-
node-version: 16.14.2
66+
path: ${{ env.STORE_PATH }}
67+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
68+
restore-keys: |
69+
${{ runner.os }}-pnpm-store-
3370
34-
- run: npm ci
35-
- run: npm run dev -- -- --ci
71+
- run: pnpm install
72+
- run: pnpm dev:ci
3673

3774
# This is what the user would do, minus actually starting the application
3875
- run: cd my-sidebase-app && npx prisma db push
3976

4077
# code should be 100% correct at the start
41-
- run: cd my-sidebase-app && npm run lint
42-
- run: cd my-sidebase-app && npm exec nuxi prepare && npm run typecheck
78+
- run: cd my-sidebase-app && pnpm lint
79+
- run: cd my-sidebase-app && npm exec nuxi prepare && pnpm run typecheck
4380

4481
# start dev-app, all of the following adapted from https://stackoverflow.com/a/60996259
4582
- run: "cd my-sidebase-app && timeout 30 npm run dev || ( [[ $? -eq 124 ]] && echo \"app started and did not exit within first 30 seconds, thats good\" )"

Diff for: .vscode/extensions.json

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
22
"recommendations": [
33
"editorconfig.editorconfig",
4-
"dbaeumer.vscode-eslint",
5-
"vue.volar"
64
]
75
}

Diff for: .vscode/settings.json

+37-14
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,45 @@
11
{
2+
// Enable the ESlint flat config support
3+
"eslint.experimental.useFlatConfig": true,
4+
5+
// Disable the default formatter, use eslint instead
6+
"prettier.enable": false,
7+
"editor.formatOnSave": false,
8+
9+
// Auto fix
210
"editor.codeActionsOnSave": {
3-
"source.fixAll.eslint": true
4-
},
5-
"[vue]": {
6-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
7-
},
8-
"[js]": {
9-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
10-
},
11-
"[ts]": {
12-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
13-
},
14-
"[typescript]": {
15-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
11+
"source.fixAll.eslint": "explicit",
12+
"source.organizeImports": "never"
1613
},
14+
15+
// Silent the stylistic rules in you IDE, but still auto fix them
16+
"eslint.rules.customizations": [
17+
{ "rule": "style/*", "severity": "off" },
18+
{ "rule": "format/*", "severity": "off" },
19+
{ "rule": "*-indent", "severity": "off" },
20+
{ "rule": "*-spacing", "severity": "off" },
21+
{ "rule": "*-spaces", "severity": "off" },
22+
{ "rule": "*-order", "severity": "off" },
23+
{ "rule": "*-dangle", "severity": "off" },
24+
{ "rule": "*-newline", "severity": "off" },
25+
{ "rule": "*quotes", "severity": "off" },
26+
{ "rule": "*semi", "severity": "off" }
27+
],
28+
29+
// Enable eslint for all supported languages
1730
"eslint.validate": [
1831
"javascript",
32+
"javascriptreact",
1933
"typescript",
20-
"vue"
34+
"typescriptreact",
35+
"vue",
36+
"html",
37+
"markdown",
38+
"json",
39+
"jsonc",
40+
"yaml",
41+
"toml",
42+
"gql",
43+
"graphql"
2144
]
2245
}

Diff for: eslint.config.js

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import antfu from '@antfu/eslint-config'
2+
3+
const ignores = [
4+
'.nuxt',
5+
'**/.nuxt/**',
6+
'.output',
7+
'**/.output/**',
8+
'node_modules',
9+
'**/node_modules/**',
10+
'public',
11+
'**/public/**',
12+
]
13+
14+
export default antfu({
15+
// .eslintignore is no longer supported in Flat config, use ignores instead
16+
ignores,
17+
18+
// Stylistic formatting rules
19+
stylistic: {
20+
indent: 2,
21+
quotes: 'single',
22+
},
23+
24+
// TypeScript and Vue are auto-detected, you can also explicitly enable them
25+
typescript: true,
26+
vue: true,
27+
28+
// Disable jsonc and yaml support
29+
jsonc: false,
30+
yaml: false,
31+
32+
// Overwrite certain rules to your preference
33+
rules: {
34+
'no-console': 'off',
35+
'style/comma-dangle': 'off',
36+
'curly': ['error', 'all'],
37+
'node/prefer-global/process': ['error', 'always'],
38+
},
39+
})

0 commit comments

Comments
 (0)