diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 9e4d807..0000000 --- a/.dockerignore +++ /dev/null @@ -1,11 +0,0 @@ -docker-compose.yml -node_modules -/.svelte-kit -.eslintrc.cjs -.git -.gitattributes -.gitignore -.npmrc -.prettierignore -.prettierrc -README.md \ No newline at end of file diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 6829602..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = { - root: true, - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:svelte/recommended", - "prettier" - ], - parser: "@typescript-eslint/parser", - plugins: ["@typescript-eslint", "simple-import-sort"], - parserOptions: { - sourceType: "module", - ecmaVersion: 2020, - extraFileExtensions: [".svelte"], - }, - overrides: [ - { - files: ["*.svelte"], - parser: "svelte-eslint-parser", - parserOptions: { - parser: { - ts: "@typescript-eslint/parser", - js: "espree", - typescript: "@typescript-eslint/parser", - }, - }, - }, - ], - env: { - browser: true, - es2017: true, - node: true, - }, - rules: { - "simple-import-sort/imports": "error", - "simple-import-sort/exports": "error", - "import/first": "error", - "import/newline-after-import": "error", - "import/no-duplicates": "error" - }, -} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 9c9c407..0000000 --- a/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM node:20.13-alpine as build - -WORKDIR /app - -COPY . . - -RUN npm install -RUN npm run build - -FROM nginx:stable - -COPY nginx.conf /etc/nginx/conf.d/default.conf -COPY --from=build /app/build /usr/share/nginx/html \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index f56d073..0000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,11 +0,0 @@ -services: - - sveltekit-app: - container_name: sveltekit-static-template - image: sveltekit-static - restart: unless-stopped - build: - context: . - dockerfile: Dockerfile - ports: - - "8080:80" \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js index 1b3dac9..4912bc8 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,13 +1,65 @@ +import js from "@eslint/js"; +import tsPlugin from "@typescript-eslint/eslint-plugin"; +import tsParser from "@typescript-eslint/parser"; +import sveltePlugin from "eslint-plugin-svelte"; +import svelteParser from "svelte-eslint-parser"; +import prettierConfig from "eslint-config-prettier"; +import simpleImportSort from "eslint-plugin-simple-import-sort"; +import importPlugin from "eslint-plugin-import"; + export default [ + js.configs.recommended, { - ignores: [ - "package.json", - "package-lock.json", - ".svelte-kit/", - "node_modules/", - "test-results/", - "static/ebd/", - "build/*", - ], + files: ["**/*.{js,ts,svelte}"], + plugins: { + "@typescript-eslint": tsPlugin, + svelte: sveltePlugin, + "simple-import-sort": simpleImportSort, + import: importPlugin, + }, + languageOptions: { + parser: tsParser, + parserOptions: { + ecmaVersion: 2020, + sourceType: "module", + extraFileExtensions: [".svelte"], + }, + globals: { + // Browser globals + window: "readonly", + document: "readonly", + console: "readonly", + fetch: "readonly", + setTimeout: "readonly", + clearTimeout: "readonly", + Blob: "readonly", + URL: "readonly", + HTMLDivElement: "readonly", + CustomEvent: "readonly", + // Node.js globals + process: "readonly", + }, + }, + rules: { + ...tsPlugin.configs.recommended.rules, + ...sveltePlugin.configs.recommended.rules, + "simple-import-sort/imports": "error", + "simple-import-sort/exports": "error", + "import/first": "error", + "import/newline-after-import": "error", + "import/no-duplicates": "error", + "svelte/no-at-html-tags": "warn", // Changed from 'error' to 'warn' + "no-undef": "error", + }, }, + { + files: ["**/*.svelte"], + languageOptions: { + parser: svelteParser, + parserOptions: { + parser: tsParser, + }, + }, + }, + prettierConfig, ]; diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index a7bb716..0000000 --- a/nginx.conf +++ /dev/null @@ -1,15 +0,0 @@ -server { - listen 80; - listen [::]:80; - server_name _; - - location / { - root /usr/share/nginx/html; - try_files $uri $uri/index.html $uri.html /index.html; - } - - include mime.types; - types { - application/javascript js mjs; - } -} \ No newline at end of file diff --git a/package.json b/package.json index b1683f3..53999f5 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "format": "prettier '**/*.{svelte,js,jsx,ts,tsx,html,css,scss,json,yml,md}' --write", "format:check": "prettier '**/*.{svelte,js,jsx,ts,tsx,html,css,scss,json,yml,md}' --check", - "lint": "eslint .", + "lint": "eslint 'src/**/*.{js,ts,svelte}'", "postinstall": "npx playwright install", "test": "npx playwright test" }, diff --git a/src/lib/components/footer.svelte b/src/lib/components/footer.svelte index 096fba6..6a67216 100644 --- a/src/lib/components/footer.svelte +++ b/src/lib/components/footer.svelte @@ -1,6 +1,7 @@ diff --git a/src/lib/features/ebd-form-header.svelte b/src/lib/features/ebd-form-header.svelte index acaa9d6..e61994d 100644 --- a/src/lib/features/ebd-form-header.svelte +++ b/src/lib/features/ebd-form-header.svelte @@ -1,7 +1,7 @@ diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 0c9acc3..c221298 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,5 +1,6 @@ diff --git a/src/routes/ebd/+page.svelte b/src/routes/ebd/+page.svelte index b7fdec6..a8f5604 100644 --- a/src/routes/ebd/+page.svelte +++ b/src/routes/ebd/+page.svelte @@ -1,7 +1,8 @@