aboutsummaryrefslogtreecommitdiffstats
path: root/src/packages/svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/packages/svelte')
-rw-r--r--src/packages/svelte/README.md4
-rw-r--r--src/packages/svelte/eslint.config.mjs (renamed from src/packages/svelte/eslint.config.js)20
-rw-r--r--src/packages/svelte/package.json152
-rw-r--r--src/packages/svelte/src/demo.spec.ts2
4 files changed, 84 insertions, 94 deletions
diff --git a/src/packages/svelte/README.md b/src/packages/svelte/README.md
index e638873..5fee47e 100644
--- a/src/packages/svelte/README.md
+++ b/src/packages/svelte/README.md
@@ -5,8 +5,8 @@
## Description
-Locusts is a series of libraries that allows you to introduce locusts into your codebase.
-Why would you want to do that? I don't know.
+Locusts is a series of libraries that allows you to introduce locusts into your
+codebase. Why would you want to do that? I don't know.
## Installation
diff --git a/src/packages/svelte/eslint.config.js b/src/packages/svelte/eslint.config.mjs
index a526565..7a1890c 100644
--- a/src/packages/svelte/eslint.config.js
+++ b/src/packages/svelte/eslint.config.mjs
@@ -1,24 +1,11 @@
-import prettier from 'eslint-config-prettier';
-import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
-import globals from 'globals';
import ts from 'typescript-eslint';
+import library from '@repo/eslint-config/eslint.library.config.js';
-export default ts.config(
- js.configs.recommended,
- ...ts.configs.recommended,
+const svelteConfig = ts.config(
...svelte.configs['flat/recommended'],
- prettier,
...svelte.configs['flat/prettier'],
{
- languageOptions: {
- globals: {
- ...globals.browser,
- ...globals.node
- }
- }
- },
- {
files: ['**/*.svelte'],
languageOptions: {
@@ -31,3 +18,6 @@ export default ts.config(
ignores: ['build/', '.svelte-kit/', 'dist/']
}
);
+
+/** @type {import("eslint").Linter.Config[]} */
+export default [...library, ...svelteConfig];
diff --git a/src/packages/svelte/package.json b/src/packages/svelte/package.json
index 863f062..713a633 100644
--- a/src/packages/svelte/package.json
+++ b/src/packages/svelte/package.json
@@ -1,77 +1,77 @@
{
- "name": "@locusts/svelte",
- "description": "A svelte component that introduces locusts into your website.",
- "version": "0.0.0",
- "author": "Matt Strapp <matt+locusts@mattstrapp.net> (https://mattstrapp.net)",
- "bugs": "https://github.com/locusts-r-us/locusts/issues",
- "scripts": {
- "dev": "vite dev",
- "build": "vite build && npm run package",
- "preview": "vite preview",
- "package": "svelte-kit sync && svelte-package && publint",
- "prepublishOnly": "npm run package",
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
- "format": "prettier --write .",
- "lint": "prettier --check . && eslint .",
- "test:unit": "vitest",
- "test": "npm run test:unit -- --run"
- },
- "keywords": [
- "svelte",
- "component",
- "why",
- "joke"
- ],
- "repository": {
- "type": "git",
- "url": "git+https://github.com/locusts-r-us/locusts.git",
- "directory": "packages/svelte"
- },
- "license": "0BSD",
- "files": [
- "dist",
- "!dist/**/*.test.*",
- "!dist/**/*.spec.*"
- ],
- "sideEffects": [
- "**/*.css"
- ],
- "svelte": "./dist/index.js",
- "types": "./dist/index.d.ts",
- "type": "module",
- "exports": {
- ".": {
- "types": "./dist/index.d.ts",
- "svelte": "./dist/index.js"
- }
- },
- "peerDependencies": {
- "svelte": "^5.0.0"
- },
- "devDependencies": {
- "@repo/eslint-config": "workspace:*",
- "@repo/typescript-config": "workspace:*",
- "@sveltejs/adapter-auto": "^3.0.0",
- "@sveltejs/kit": "^2.0.0",
- "@sveltejs/package": "^2.0.0",
- "@sveltejs/vite-plugin-svelte": "^4.0.0",
- "@types/eslint": "^9.6.0",
- "eslint": "^9.7.0",
- "eslint-config-prettier": "^9.1.0",
- "eslint-plugin-svelte": "^2.36.0",
- "globals": "^15.0.0",
- "prettier": "^3.3.2",
- "prettier-plugin-svelte": "^3.2.6",
- "publint": "^0.2.0",
- "svelte": "^5.0.0",
- "svelte-check": "^4.0.0",
- "typescript": "^5.6.3",
- "typescript-eslint": "^8.0.0",
- "vite": "^5.0.11",
- "vitest": "^2.0.4"
- },
- "publishConfig": {
- "access": "public"
- }
-} \ No newline at end of file
+ "name": "@locusts/svelte",
+ "description": "A svelte component that introduces locusts into your website.",
+ "version": "0.0.0",
+ "author": "Matt Strapp <matt+locusts@mattstrapp.net> (https://mattstrapp.net)",
+ "bugs": "https://github.com/locusts-r-us/locusts/issues",
+ "scripts": {
+ "dev": "vite dev",
+ "build": "vite build && npm run package",
+ "preview": "vite preview",
+ "package": "svelte-kit sync && svelte-package && publint",
+ "prepublishOnly": "npm run package",
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
+ "format": "prettier --write .",
+ "lint": "prettier --check . && eslint --fix .",
+ "test:unit": "vitest",
+ "test": "npm run test:unit -- --run"
+ },
+ "keywords": [
+ "svelte",
+ "component",
+ "why",
+ "joke"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/locusts-r-us/locusts.git",
+ "directory": "packages/svelte"
+ },
+ "license": "0BSD",
+ "files": [
+ "dist",
+ "!dist/**/*.test.*",
+ "!dist/**/*.spec.*"
+ ],
+ "sideEffects": [
+ "**/*.css"
+ ],
+ "svelte": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "type": "module",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "svelte": "./dist/index.js"
+ }
+ },
+ "peerDependencies": {
+ "svelte": "^5.0.0"
+ },
+ "devDependencies": {
+ "@repo/eslint-config": "workspace:*",
+ "@repo/typescript-config": "workspace:*",
+ "@sveltejs/adapter-auto": "^3.0.0",
+ "@sveltejs/kit": "^2.0.0",
+ "@sveltejs/package": "^2.0.0",
+ "@sveltejs/vite-plugin-svelte": "^4.0.0",
+ "@types/eslint": "^9.6.0",
+ "eslint": "^9.7.0",
+ "eslint-config-prettier": "^9.1.0",
+ "eslint-plugin-svelte": "^2.36.0",
+ "globals": "^15.0.0",
+ "prettier": "^3.3.2",
+ "prettier-plugin-svelte": "^3.2.6",
+ "publint": "^0.2.0",
+ "svelte": "^5.0.0",
+ "svelte-check": "^4.0.0",
+ "typescript": "^5.6.3",
+ "typescript-eslint": "^8.0.0",
+ "vite": "^5.0.11",
+ "vitest": "^2.0.4"
+ },
+ "publishConfig": {
+ "access": "public"
+ }
+}
diff --git a/src/packages/svelte/src/demo.spec.ts b/src/packages/svelte/src/demo.spec.ts
index 682c26c..d2c1a85 100644
--- a/src/packages/svelte/src/demo.spec.ts
+++ b/src/packages/svelte/src/demo.spec.ts
@@ -1,4 +1,4 @@
-import { describe, it, expect } from 'vitest';
+import { describe, expect, it } from 'vitest';
describe('Locusts should exist', () => {
it('Locusts should exist', () => {