mirror of
https://github.com/LukeHagar/sveltesociety.dev.git
synced 2025-12-06 04:21:38 +00:00
Tweak type checking, vitest
This commit is contained in:
11
package.json
11
package.json
@@ -9,7 +9,7 @@
|
|||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||||
"test": "jest",
|
"test": "vitest",
|
||||||
"lint": "prettier --check ./**/*.{js,ts,css,md,svelte,html,json} && eslint --ignore-path .gitignore .",
|
"lint": "prettier --check ./**/*.{js,ts,css,md,svelte,html,json} && eslint --ignore-path .gitignore .",
|
||||||
"format": "prettier --write ./**/*.{js,ts,css,md,svelte,html,json}",
|
"format": "prettier --write ./**/*.{js,ts,css,md,svelte,html,json}",
|
||||||
"prepare": "husky install"
|
"prepare": "husky install"
|
||||||
@@ -19,7 +19,6 @@
|
|||||||
"@sveltejs/adapter-static": "^2.0.2",
|
"@sveltejs/adapter-static": "^2.0.2",
|
||||||
"@sveltejs/kit": "^1.21.0",
|
"@sveltejs/kit": "^1.21.0",
|
||||||
"@types/itemsjs": "^2.1.0",
|
"@types/itemsjs": "^2.1.0",
|
||||||
"@types/jest": "^29.4.0",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^5.61.0",
|
"@typescript-eslint/eslint-plugin": "^5.61.0",
|
||||||
"@typescript-eslint/parser": "^5.61.0",
|
"@typescript-eslint/parser": "^5.61.0",
|
||||||
"eslint": "^8.44.0",
|
"eslint": "^8.44.0",
|
||||||
@@ -29,17 +28,15 @@
|
|||||||
"highlight.js": "^11.6.0",
|
"highlight.js": "^11.6.0",
|
||||||
"husky": "^7.0.2",
|
"husky": "^7.0.2",
|
||||||
"itemsjs": "^2.1.20",
|
"itemsjs": "^2.1.20",
|
||||||
"jest": "^29.6.0",
|
|
||||||
"lint-staged": "^13.2.3",
|
"lint-staged": "^13.2.3",
|
||||||
"mdsvex": "^0.11.0",
|
"mdsvex": "^0.11.0",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"prettier-plugin-svelte": "^2.2.0",
|
"prettier-plugin-svelte": "^2.2.0",
|
||||||
"rehype-slug": "^5.1.0",
|
"rehype-slug": "^5.1.0",
|
||||||
"svelte": "^3.54.0",
|
"svelte": "^4.0.3",
|
||||||
|
"svelte-check": "^3.4.4",
|
||||||
"svelte-highlight": "^7.3.0",
|
"svelte-highlight": "^7.3.0",
|
||||||
"svelte-preprocess": "^5.0.4",
|
"svelte-select": "^4.4.0",
|
||||||
"svelte-select": "^5.6.1",
|
|
||||||
"ts-jest": "^29.0.5",
|
|
||||||
"tslib": "^2.0.0",
|
"tslib": "^2.0.0",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vite": "^4.0.0",
|
"vite": "^4.0.0",
|
||||||
|
|||||||
2097
pnpm-lock.yaml
generated
2097
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
|||||||
import { localStorage, persist } from '@macfja/svelte-persistent-store';
|
import { createLocalStorage, persist } from '@macfja/svelte-persistent-store';
|
||||||
import type { PersistentStore } from '@macfja/svelte-persistent-store';
|
import type { PersistentStore } from '@macfja/svelte-persistent-store';
|
||||||
import { writable } from 'svelte/store';
|
import { writable } from 'svelte/store';
|
||||||
|
|
||||||
export const packageManager: PersistentStore<string> = persist(
|
export const packageManager: PersistentStore<string> = persist(
|
||||||
writable('npm'),
|
writable('npm'),
|
||||||
localStorage(),
|
createLocalStorage(),
|
||||||
'packageManager'
|
'packageManager'
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { describe, it, expect } from 'vitest';
|
||||||
import { extractUnique } from './extractUnique';
|
import { extractUnique } from './extractUnique';
|
||||||
|
|
||||||
describe('extractUnique', () => {
|
describe('extractUnique', () => {
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
|
import { vitePreprocess } from '@sveltejs/kit/vite';
|
||||||
import adapter from '@sveltejs/adapter-static';
|
import adapter from '@sveltejs/adapter-static';
|
||||||
import hljs from 'highlight.js';
|
import hljs from 'highlight.js';
|
||||||
import { mdsvex, escapeSvelte } from 'mdsvex';
|
import { mdsvex, escapeSvelte } from 'mdsvex';
|
||||||
import rehypeSlug from 'rehype-slug';
|
import rehypeSlug from 'rehype-slug';
|
||||||
import preprocess from 'svelte-preprocess';
|
|
||||||
|
|
||||||
const extensions = [`.svelte`, '.md', `.mdx`, '.svx'];
|
const extensions = [`.svelte`, '.md', `.mdx`, '.svx'];
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
preprocess: [
|
preprocess: [
|
||||||
preprocess(),
|
|
||||||
mdsvex({
|
mdsvex({
|
||||||
// Breaks svelte-select when .svelte extension is included
|
// Breaks svelte-select when .svelte extension is included
|
||||||
extensions: extensions.filter((ext) => ext !== '.svelte'),
|
extensions: extensions.filter((ext) => ext !== '.svelte'),
|
||||||
@@ -26,7 +25,8 @@ const config = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
rehypePlugins: [rehypeSlug]
|
rehypePlugins: [rehypeSlug]
|
||||||
})
|
}),
|
||||||
|
vitePreprocess()
|
||||||
],
|
],
|
||||||
extensions: extensions,
|
extensions: extensions,
|
||||||
kit: {
|
kit: {
|
||||||
|
|||||||
@@ -8,6 +8,6 @@
|
|||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"strict": true
|
"strict": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user