mirror of
https://github.com/vcscsvcscs/GenerationsHeritage.git
synced 2025-08-12 22:09:07 +02:00
Add svelte ci
This commit is contained in:
4
.github/workflows/frontend-ci.yml
vendored
4
.github/workflows/frontend-ci.yml
vendored
@@ -6,11 +6,11 @@ on:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
uses: ./.github/workflows/go_lint.yml
|
||||
uses: ./.github/workflows/svelte_lint.yml
|
||||
with:
|
||||
working-directory: 'backend'
|
||||
build:
|
||||
needs: lint
|
||||
uses: ./.github/workflows/go_build.yml
|
||||
uses: ./.github/workflows/svelte_build.yml
|
||||
with:
|
||||
working-directory: 'backend'
|
||||
|
13
.github/workflows/svelte_build.yml
vendored
13
.github/workflows/svelte_build.yml
vendored
@@ -10,4 +10,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '21.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd frontend
|
||||
npm ci
|
||||
- name: Build
|
||||
run: |
|
||||
cd frontend
|
||||
npm run build
|
15
.github/workflows/svelte_lint.yml
vendored
15
.github/workflows/svelte_lint.yml
vendored
@@ -5,9 +5,20 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '21.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd frontend
|
||||
npm ci
|
||||
- name: Lint
|
||||
run: |
|
||||
cd frontend
|
||||
npm run lint
|
39
frontend/.eslintignore
Normal file
39
frontend/.eslintignore
Normal file
@@ -0,0 +1,39 @@
|
||||
/.nyc_output
|
||||
/coverage
|
||||
/lib
|
||||
/node_modules
|
||||
/*.config.js
|
||||
!/.vscode
|
||||
!/.github
|
||||
!/.devcontainer
|
||||
/prettier-playground
|
||||
/tests/fixtures/rules/indent/invalid/ts
|
||||
/tests/fixtures/rules/indent/invalid/ts-v5
|
||||
/tests/fixtures/rules/indent/invalid/snippets01-input.svelte
|
||||
/tests/fixtures/rules/indent/valid/
|
||||
/tests/fixtures/rules/no-unused-class-name/valid/invalid-style01-input.svelte
|
||||
/tests/fixtures/rules/no-unused-class-name/valid/unknown-lang01-input.svelte
|
||||
/tests/fixtures/rules/valid-compile/invalid/ts
|
||||
/tests/fixtures/rules/valid-compile/valid/babel
|
||||
/tests/fixtures/rules/valid-compile/valid/ts
|
||||
/tests/fixtures/rules/prefer-style-directive
|
||||
/tests/fixtures/rules/@typescript-eslint
|
||||
/tests/fixtures/rules/valid-compile/valid/svelte3-options-custom-element-input.svelte
|
||||
/tests/fixtures/rules/mustache-spacing/valid/always/snippet-render01-input.svelte
|
||||
/tests/fixtures/rules/mustache-spacing/invalid/snippet-render01-input.svelte
|
||||
/.svelte-kit
|
||||
/svelte.config-dist.js
|
||||
/build
|
||||
/docs-svelte-kit/shim/eslint.mjs
|
||||
/docs-svelte-kit/shim/assert.mjs
|
||||
!/.*.js
|
||||
/docs-svelte-kit/src/routes/*.md
|
||||
/docs-svelte-kit/src/routes/**/*.md
|
||||
/docs-svelte-kit/src/app.html
|
||||
|
||||
# JSONSchema bug?
|
||||
/.devcontainer/devcontainer.json
|
||||
|
||||
# Parser bug?
|
||||
/tests/fixtures/rules/indent/invalid/const-tag01-input.svelte
|
||||
/tests/fixtures/rules/indent/invalid/const-tag01-output.svelte
|
19
frontend/.eslintrc.cjs
Normal file
19
frontend/.eslintrc.cjs
Normal file
@@ -0,0 +1,19 @@
|
||||
module.exports = {
|
||||
extends: ['plugin:svelte/base', 'plugin:svelte/recommended', 'plugin:svelte/prettier'],
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.svelte'],
|
||||
parser: 'svelte-eslint-parser'
|
||||
}
|
||||
],
|
||||
env: {
|
||||
es6: true
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
experimentalObjectRestSpread: true,
|
||||
jsx: true
|
||||
},
|
||||
sourceType: 'module'
|
||||
}
|
||||
};
|
8
frontend/.prettierignore
Normal file
8
frontend/.prettierignore
Normal file
@@ -0,0 +1,8 @@
|
||||
.svelte-kit
|
||||
.type-coverage
|
||||
build
|
||||
/lib
|
||||
.npmrc
|
||||
.eslintignore
|
||||
/tests/fixtures/rules/indent/valid/
|
||||
.changeset
|
31
frontend/.prettierrc.cjs
Normal file
31
frontend/.prettierrc.cjs
Normal file
@@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
useTabs: true,
|
||||
singleQuote: true,
|
||||
trailingComma: 'none',
|
||||
printWidth: 100,
|
||||
plugins: ['prettier-plugin-svelte'],
|
||||
overrides: [
|
||||
{
|
||||
files: ['.*rc'],
|
||||
excludeFiles: ['.browserslistrc', '.npmrc', '.nvmrc'],
|
||||
options: {
|
||||
parser: 'json'
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['*.svelte'],
|
||||
options: {
|
||||
bracketSameLine: false
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['*.md', 'package.json', '**/package.json'],
|
||||
options: {
|
||||
useTabs: false,
|
||||
tabWidth: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
2101
frontend/package-lock.json
generated
2101
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,19 +1,31 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/adapter-auto": "^3.0.0",
|
||||
"@sveltejs/adapter-static": "^3.0.1",
|
||||
"@sveltejs/kit": "^2.0.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.0",
|
||||
"svelte": "^4.2.7",
|
||||
"vite": "^5.0.3"
|
||||
},
|
||||
"type": "module"
|
||||
"name": "frontend",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"format": "npx prettier --write --plugin prettier-plugin-svelte .",
|
||||
"lint": "npx eslint --ext .svelte --ext .js ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.24.0",
|
||||
"@babel/eslint-parser": "^7.23.10",
|
||||
"@sveltejs/adapter-auto": "^3.0.0",
|
||||
"@sveltejs/adapter-static": "^3.0.1",
|
||||
"@sveltejs/kit": "^2.0.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-google": "^0.14.0",
|
||||
"eslint-plugin-svelte": "^2.35.1",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier-plugin-svelte": "^3.2.2",
|
||||
"svelte": "^4.2.12",
|
||||
"vite": "^5.0.3"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"svelte-eslint-parser": "^0.33.1"
|
||||
}
|
||||
}
|
||||
|
@@ -1,2 +1,4 @@
|
||||
<h1>Welcome to SvelteKit</h1>
|
||||
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
|
||||
<p>
|
||||
Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation
|
||||
</p>
|
||||
|
Reference in New Issue
Block a user