diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..fba3861 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,20 @@ +module.exports = { + root: true, + parser: '@typescript-eslint/parser', + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], + plugins: ['svelte3', '@typescript-eslint'], + ignorePatterns: ['*.cjs'], + overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], + settings: { + 'svelte3/typescript': () => require('typescript') + }, + parserOptions: { + sourceType: 'module', + ecmaVersion: 2019 + }, + env: { + browser: true, + es2017: true, + node: true + } +}; diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..ff2677e --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100 +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a1faaed --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "kevinmidboe", + "version": "0.0.1", + "scripts": { + "dev": "svelte-kit dev", + "build": "svelte-kit build", + "start": "node ./.svelte-kit/output/server/app.js", + "preview": "svelte-kit preview", + "check": "svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .", + "format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. ." + }, + "devDependencies": { + "@sveltejs/adapter-node": "^1.0.0-next.53", + "@sveltejs/kit": "next", + "@types/cookie": "^0.4.1", + "@typescript-eslint/eslint-plugin": "^4.31.1", + "@typescript-eslint/parser": "^4.31.1", + "eslint": "^7.32.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-svelte3": "^3.2.1", + "node-sass": "6.0.1", + "prettier": "^2.4.1", + "prettier-plugin-svelte": "^2.4.0", + "svelte": "^3.34.0", + "svelte-check": "^2.2.6", + "svelte-preprocess": "^4.9.4", + "tslib": "^2.3.1", + "typescript": "^4.4.3" + }, + "type": "module" +} diff --git a/svelte.config.js b/svelte.config.js new file mode 100644 index 0000000..a58f2e9 --- /dev/null +++ b/svelte.config.js @@ -0,0 +1,17 @@ +import preprocess from 'svelte-preprocess'; +import node from '@sveltejs/adapter-node'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + // Consult https://github.com/sveltejs/svelte-preprocess + // for more information about preprocessors + preprocess: preprocess(), + + kit: { + // hydrate the