Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/yellow-files-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'vite-plugin-watch-and-run': patch
---

add viteDevServer in run() args
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ jobs:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: 🌐 Checkout Repository
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- uses: jycouet/jycouet/shared-config/setup@main
name: setup env
- name: 🧑‍💻 Setup env
uses: jycouet/jycouet/shared-config/setup@main
# with:
# nodeVersion: 18

- name: 🚧 Build Packages
run: pnpm run build

- name: 🧹 Prettier Check
run: pnpm run lint

- name: 👌 Run Tests
run: pnpm run test

- name: 🧹 Prettier Check
run: pnpm run format:check
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ coverage/
.next/
.idea/
.svelte-kit/
.env
.env

stats.html
25 changes: 4 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
"type": "module",
"scripts": {
"dev:w": "cd website && npm run dev",
"lint": "eslint --ignore-path .prettierignore .",
"format": "prettier --write --list-different .",
"format:check": "prettier --check .",
"test": "pnpm -F !website test",
"test:ci": "pnpm -F !website test",
"prebuild": "rimraf packages/*/dist",
"build": "pnpm -F !website build",
"build": "rimraf packages/*/dist && pnpm -F !website build",
"lint": "pnpm -r lint",
"format": "pnpm -r format",
"release:version": "npm run changeset version",
"release": "npm run build && changeset publish",
"reset": "git clean -xdf",
Expand All @@ -21,21 +19,6 @@
"devDependencies": {
"@changesets/changelog-github": "0.4.8",
"@changesets/cli": "2.26.1",
"@theguild/eslint-config": "0.9.0",
"@theguild/prettier-config": "1.1.3",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@vitest/coverage-c8": "0.31.0",
"@vitest/coverage-v8": "^0.34.6",
"@vitest/ui": "0.31.0",
"@vue/compiler-sfc": "^3.3.2",
"c8": "7.13.0",
"check-code-coverage": "1.10.4",
"eslint": "8.40.0",
"jsdom": "22.0.0",
"prettier": "2.8.8",
"prettier-plugin-svelte": "2.10.0",
"rimraf": "5.0.0",
"svelte": "3.59.1",
"typescript": "5.0.4"
"rimraf": "5.0.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
.DS_Store
# prj files
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# svelte files
build
.svelte-kit

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-kitql/.eslintrc.cjs
11 changes: 11 additions & 0 deletions packages/eslint-config-kitql/cmd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
declare SCRIPT_DIR
SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
if [ "${1-x}" == "--fix" ]; then
eslint --fix --ignore-path ../../.prettierignore "*"
prettier --ignore-path ../../.prettierignore --write --plugin-search-dir="$SCRIPT_DIR" .
else
eslint --ignore-path ../../.prettierignore "*"
prettier --ignore-path ../../.prettierignore --check --plugin-search-dir="$SCRIPT_DIR" .
fi
43 changes: 43 additions & 0 deletions packages/eslint-config-kitql/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['unused-imports', 'svelte', '@typescript-eslint'],
rules: {
'no-console': ['error', { allow: ['info', 'warn', 'error', 'time', 'timeEnd'] }],
'unused-imports/no-unused-imports': 'error',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
},
},
{
files: ['*.graphql', '*.gql'],
parserOptions: {
operations: '**/*.gql',
schema: '**/*.graphql',
},
extends: ['plugin:@graphql-eslint/schema-all', 'plugin:@graphql-eslint/operations-all'],
rules: {
'@graphql-eslint/alphabetize': 'off',
},
},
],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
},
env: {
browser: true,
es2017: true,
node: true,
},
}
31 changes: 31 additions & 0 deletions packages/eslint-config-kitql/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "eslint-config-kitql",
"version": "0.0.1",
"private": true,
"bin": {
"kitql-lint": "./cmd.sh"
},
"main": "index.cjs",
"scripts": {
"lint:example": "kitql-lint",
"format:example": "kitql-lint --fix"
},
"dependencies": {
"@graphql-eslint/eslint-plugin": "3.20.1",
"@theguild/prettier-config": "1.2.0",
"@trivago/prettier-plugin-sort-imports": "4.1.1",
"@typescript-eslint/eslint-plugin": "5.60.1",
"@typescript-eslint/parser": "5.60.1",
"@vue/compiler-sfc": "3.3.4",
"eslint": "8.43.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-svelte": "2.33.0",
"eslint-plugin-unused-imports": "2.0.0",
"prettier": "2.8.8",
"prettier-plugin-sh": "0.12.8",
"prettier-plugin-svelte": "2.10.1",
"prettier-plugin-tailwindcss": "0.3.0",
"svelte": "4.2.0",
"typescript": "5.2.2"
}
}
31 changes: 2 additions & 29 deletions packages/handles/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2017: true,
node: true
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
]
};
extends: ['eslint-config-kitql'],
}
13 changes: 0 additions & 13 deletions packages/handles/.prettierignore

This file was deleted.

9 changes: 0 additions & 9 deletions packages/handles/.prettierrc

This file was deleted.

18 changes: 9 additions & 9 deletions packages/handles/jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"moduleResolution": "NodeNext"
}
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"moduleResolution": "NodeNext"
}
}
13 changes: 4 additions & 9 deletions packages/handles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,27 @@
"build": "vite build && svelte-package && node ../../scripts/package.js",
"preview": "vite preview",
"package": "npm run build && publint",
"prepublishOnly2": "npm run package",
"check": "svelte-check --tsconfig ./jsconfig.json",
"check:watch": "svelte-check --tsconfig ./jsconfig.json --watch",
"test": "vitest",
"test:ci": "vitest --coverage",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write ."
"lint": "kitql-lint",
"format": "kitql-lint --fix"
},
"peerDependencies": {
"@sveltejs/kit": "^1.25.2",
"svelte": "^4.0.0"
},
"devDependencies": {
"eslint-config-kitql": "workspace:*",
"@sveltejs/adapter-node": "1.3.1",
"@sveltejs/kit": "1.25.2",
"@sveltejs/package": "2.2.2",
"publint": "0.1.9",
"eslint": "8.28.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-svelte": "2.30.0",
"prettier": "2.8.0",
"prettier-plugin-svelte": "2.10.1",
"svelte": "4.0.5",
"svelte-check": "3.5.2",
"tslib": "2.5.0",
"typescript": "^5.0.4",
"typescript": "5.2.2",
"vite": "4.3.5",
"vitest": "0.31.0"
},
Expand Down
14 changes: 7 additions & 7 deletions packages/handles/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}
}

export {};
export {}
18 changes: 9 additions & 9 deletions packages/handles/src/app.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body>
<div>%sveltekit.body%</div>
</body>
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body>
<div>%sveltekit.body%</div>
</body>
</html>
10 changes: 5 additions & 5 deletions packages/handles/src/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest';
import { describe, expect, it } from 'vitest'

describe('sum test', () => {
it('adds 1 + 2 to equal 3', () => {
expect(1 + 2).toBe(3);
});
});
it('adds 1 + 2 to equal 3', () => {
expect(1 + 2).toBe(3)
})
})
Loading