-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: write tests * chore: setup GitHub workflows * chore: update eslint * chore: CI * increase vitest timeout * prettier
- Loading branch information
Showing
35 changed files
with
8,719 additions
and
8,562 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
ci: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
- run: npm ci | ||
|
||
# https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml#L62 | ||
# Install playwright's binary under custom directory to cache | ||
- name: Set Playwright path | ||
run: | ||
echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.cache/playwright-bin" >> | ||
$GITHUB_ENV | ||
|
||
- name: Cache Playwright's binary | ||
uses: actions/cache@v4 | ||
with: | ||
# Playwright removes unused browsers automatically | ||
# So does not need to add playwright version to key | ||
key: ${{ runner.os }}-playwright-bin-v1 | ||
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }} | ||
|
||
- name: Install Playwright | ||
# does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved | ||
run: npx playwright-core install chromium | ||
|
||
- run: npm run dev:prepare | ||
- run: npm run typecheck | ||
- run: npm run lint | ||
- run: npm run prettier | ||
- run: npm run test | ||
- run: npm run prepack | ||
- run: npm run dev:build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ lib | |
dist | ||
.nuxt | ||
playground/.nuxt | ||
playground/.output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { createConfigForNuxt } from '@nuxt/eslint-config/flat' | ||
|
||
// Run `npx @eslint/config-inspector` to inspect the resolved config interactively | ||
export default createConfigForNuxt({ | ||
features: { | ||
// Rules for module authors | ||
tooling: true, | ||
}, | ||
dirs: { | ||
src: ['./playground'], | ||
}, | ||
}) | ||
.override('nuxt/vue/rules', { | ||
rules: { | ||
'vue/no-v-html': 0, | ||
'vue/multi-word-component-names': 'off', | ||
'vue/no-empty-component-block': 'error', | ||
'vue/padding-line-between-blocks': 'error', | ||
'vue/no-v-for-template-key': 'error', | ||
'vue/prefer-true-attribute-shorthand': 'error', | ||
'vue/component-api-style': 'error', | ||
'vue/block-lang': [ | ||
'error', | ||
{ | ||
script: { | ||
lang: 'ts', | ||
}, | ||
}, | ||
], | ||
'vue/block-order': [ | ||
'error', | ||
{ | ||
order: [['script', 'template'], 'style'], | ||
}, | ||
], | ||
'vue/html-self-closing': [ | ||
'error', | ||
{ | ||
html: { | ||
void: 'always', | ||
}, | ||
}, | ||
], | ||
}, | ||
}) | ||
.override('nuxt/typescript/rules', { | ||
rules: { | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
}, | ||
}) |
Oops, something went wrong.