Skip to content

Commit

Permalink
chore: refactor ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
jill64 committed Dec 1, 2023
1 parent d8ddb50 commit 90ef9c3
Show file tree
Hide file tree
Showing 11 changed files with 135 additions and 228 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

15 changes: 0 additions & 15 deletions .eslintrc.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

1 change: 0 additions & 1 deletion demo/.eslintignore

This file was deleted.

26 changes: 0 additions & 26 deletions demo/.eslintrc.yml

This file was deleted.

4 changes: 4 additions & 0 deletions demo/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { svelteTsConfig } from '@jill64/eslint-config-svelte'

/** @type {import('@jill64/eslint-config-svelte').FlatConfig[]} */
export default svelteTsConfig()
7 changes: 3 additions & 4 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
"build": "vite build",
"preview": "npm run build && vite preview",
"lint": "npm run check && npx eslint .",
"format": "npx prettier --write . --plugin prettier-plugin-svelte .",
"format": "npx @jill64/psx",
"check": "svelte-kit sync && npx svelte-check"
},
"prettier": "@jill64/prettier-config",
"devDependencies": {
"@jill64/eslint-config-svelte": "0.0.3",
"@jill64/svelte-toast": "1.2.1",
"@sentry/vite-plugin": "2.10.2",
"@sveltejs/adapter-cloudflare": "2.3.3",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-svelte": "2.35.1",
"prettier-plugin-svelte": "3.1.2",
"svelte": "4.2.8",
"vite": "5.0.4"
}
Expand Down
9 changes: 9 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { tsConfig } from '@jill64/eslint-config-ts'

/** @type {import('@jill64/eslint-config-ts').FlatConfig[]} */
export default [
...tsConfig(),
{
ignores: ['tests', 'demo', 'scripts']
}
]
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"publishConfig": {
"access": "public"
},
"prettier": "@jill64/prettier-config",
"scripts": {
"dev": "cd demo && npm run dev",
"build": "npm run build:lib && npm run build:demo && npx publint",
Expand All @@ -53,21 +54,21 @@
"lint:lib": "npx eslint .",
"lint:demo": "cd demo && npm run lint",
"format": "npm run format:lib && npm run format:demo",
"format:lib": "npx prettier --write .",
"format:lib": "npx prettier -w .",
"format:demo": "cd demo && npm run format"
},
"peerDependencies": {
"@sveltejs/kit": "^1.0.0"
},
"devDependencies": {
"@jill64/eslint-config-ts": "0.1.2",
"@jill64/prettier-config": "0.0.1",
"@jill64/playwright-config": "0.0.1",
"@playwright/test": "1.40.1",
"@sentry/core": "7.84.0",
"@sentry/utils": "7.84.0",
"@sveltejs/kit": "1.27.6",
"@typescript-eslint/eslint-plugin": "6.13.1",
"@typescript-eslint/parser": "6.13.1",
"esbuild": "0.19.8",
"eslint-plugin-deprecation": "2.0.0",
"typescript": "5.3.2"
},
"dependencies": {
Expand Down
32 changes: 3 additions & 29 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,12 @@
import { defineConfig, devices } from '@playwright/test'
import { extendsConfig } from '@jill64/playwright-config'

const ref_name = process.env.GITHUB_REF_NAME

export default defineConfig({
export default extendsConfig({
use: {
baseURL:
ref_name === 'main'
? 'https://sentry-sveltekit-cloudflare.pages.dev'
: `https://${ref_name}.sentry-sveltekit-cloudflare.pages.dev`
},
testDir: 'tests',
fullyParallel: true,
workers: '100%',
retries: process.env.CI ? 2 : 0,
projects: [
{
name: 'chromium',
use: devices['Desktop Chrome']
},
{
name: 'firefox',
use: devices['Desktop Firefox']
},
{
name: 'webkit',
use: devices['Desktop Safari']
},
{
name: 'Mobile Chrome',
use: devices['Pixel 5']
},
{
name: 'Mobile Safari',
use: devices['iPhone 12']
}
]
}
})
Loading

0 comments on commit 90ef9c3

Please sign in to comment.