Prettier 규칙 변경

This commit is contained in:
static
2024-12-25 22:27:43 +09:00
parent 0a2ce3f80a
commit e6f345bd3b
15 changed files with 161 additions and 164 deletions

View File

@@ -1,15 +1,12 @@
{ {
"useTabs": true, "printWidth": 100,
"singleQuote": true, "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"trailingComma": "none", "overrides": [
"printWidth": 100, {
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], "files": "*.svelte",
"overrides": [ "options": {
{ "parser": "svelte"
"files": "*.svelte", }
"options": { }
"parser": "svelte" ]
}
}
]
} }

View File

@@ -1,14 +1,14 @@
import { defineConfig } from 'drizzle-kit'; import { defineConfig } from "drizzle-kit";
if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set'); if (!process.env.DATABASE_URL) throw new Error("DATABASE_URL is not set");
export default defineConfig({ export default defineConfig({
schema: './src/lib/server/db/schema.ts', schema: "./src/lib/server/db/schema.ts",
dbCredentials: { dbCredentials: {
url: process.env.DATABASE_URL url: process.env.DATABASE_URL,
}, },
verbose: true, verbose: true,
strict: true, strict: true,
dialect: 'sqlite' dialect: "sqlite",
}); });

View File

@@ -1,34 +1,34 @@
import prettier from 'eslint-config-prettier'; import prettier from "eslint-config-prettier";
import js from '@eslint/js'; import js from "@eslint/js";
import { includeIgnoreFile } from '@eslint/compat'; import { includeIgnoreFile } from "@eslint/compat";
import svelte from 'eslint-plugin-svelte'; import svelte from "eslint-plugin-svelte";
import globals from 'globals'; import globals from "globals";
import { fileURLToPath } from 'node:url'; import { fileURLToPath } from "node:url";
import ts from 'typescript-eslint'; import ts from "typescript-eslint";
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url)); const gitignorePath = fileURLToPath(new URL("./.gitignore", import.meta.url));
export default ts.config( export default ts.config(
includeIgnoreFile(gitignorePath), includeIgnoreFile(gitignorePath),
js.configs.recommended, js.configs.recommended,
...ts.configs.recommended, ...ts.configs.recommended,
...svelte.configs['flat/recommended'], ...svelte.configs["flat/recommended"],
prettier, prettier,
...svelte.configs['flat/prettier'], ...svelte.configs["flat/prettier"],
{ {
languageOptions: { languageOptions: {
globals: { globals: {
...globals.browser, ...globals.browser,
...globals.node ...globals.node,
} },
} },
}, },
{ {
files: ['**/*.svelte'], files: ["**/*.svelte"],
languageOptions: { languageOptions: {
parserOptions: { parserOptions: {
parser: ts.parser parser: ts.parser,
} },
} },
} },
); );

View File

@@ -1,44 +1,44 @@
{ {
"name": "arkvault", "name": "arkvault",
"private": true, "private": true,
"version": "0.0.1", "version": "0.0.1",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite dev", "dev": "vite dev",
"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",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .", "format": "prettier --write .",
"lint": "prettier --check . && eslint .", "lint": "prettier --check . && eslint .",
"db:push": "drizzle-kit push", "db:push": "drizzle-kit push",
"db:migrate": "drizzle-kit migrate", "db:migrate": "drizzle-kit migrate",
"db:studio": "drizzle-kit studio" "db:studio": "drizzle-kit studio"
}, },
"devDependencies": { "devDependencies": {
"@eslint/compat": "^1.2.3", "@eslint/compat": "^1.2.3",
"@sveltejs/adapter-node": "^5.2.9", "@sveltejs/adapter-node": "^5.2.9",
"@sveltejs/kit": "^2.0.0", "@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0", "@sveltejs/vite-plugin-svelte": "^4.0.0",
"@types/better-sqlite3": "^7.6.11", "@types/better-sqlite3": "^7.6.11",
"autoprefixer": "^10.4.20", "autoprefixer": "^10.4.20",
"drizzle-kit": "^0.22.0", "drizzle-kit": "^0.22.0",
"eslint": "^9.7.0", "eslint": "^9.7.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.36.0", "eslint-plugin-svelte": "^2.36.0",
"globals": "^15.0.0", "globals": "^15.0.0",
"prettier": "^3.3.2", "prettier": "^3.3.2",
"prettier-plugin-svelte": "^3.2.6", "prettier-plugin-svelte": "^3.2.6",
"prettier-plugin-tailwindcss": "^0.6.5", "prettier-plugin-tailwindcss": "^0.6.5",
"svelte": "^5.0.0", "svelte": "^5.0.0",
"svelte-check": "^4.0.0", "svelte-check": "^4.0.0",
"tailwindcss": "^3.4.9", "tailwindcss": "^3.4.9",
"typescript": "^5.0.0", "typescript": "^5.0.0",
"typescript-eslint": "^8.0.0", "typescript-eslint": "^8.0.0",
"vite": "^5.4.11" "vite": "^5.4.11"
}, },
"dependencies": { "dependencies": {
"better-sqlite3": "^11.1.2", "better-sqlite3": "^11.1.2",
"drizzle-orm": "^0.33.0" "drizzle-orm": "^0.33.0"
} }
} }

View File

@@ -1,6 +1,6 @@
export default { export default {
plugins: { plugins: {
tailwindcss: {}, tailwindcss: {},
autoprefixer: {} autoprefixer: {},
} },
}; };

View File

@@ -1,3 +1,3 @@
@import 'tailwindcss/base'; @import "tailwindcss/base";
@import 'tailwindcss/components'; @import "tailwindcss/components";
@import 'tailwindcss/utilities'; @import "tailwindcss/utilities";

14
src/app.d.ts vendored
View File

@@ -1,13 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts // See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces // for information about these interfaces
declare global { declare global {
namespace App { namespace App {
// interface Error {} // interface Error {}
// interface Locals {} // interface Locals {}
// interface PageData {} // interface PageData {}
// interface PageState {} // interface PageState {}
// interface Platform {} // interface Platform {}
} }
} }
export {}; export {};

View File

@@ -1,12 +1,12 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" /> <link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head% %sveltekit.head%
</head> </head>
<body data-sveltekit-preload-data="hover"> <body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div> <div style="display: contents">%sveltekit.body%</div>
</body> </body>
</html> </html>

View File

@@ -1,6 +1,6 @@
import { drizzle } from 'drizzle-orm/better-sqlite3'; import { drizzle } from "drizzle-orm/better-sqlite3";
import Database from 'better-sqlite3'; import Database from "better-sqlite3";
import { env } from '$env/dynamic/private'; import { env } from "$env/dynamic/private";
if (!env.DATABASE_URL) throw new Error('DATABASE_URL is not set'); if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set");
const client = new Database(env.DATABASE_URL); const client = new Database(env.DATABASE_URL);
export const db = drizzle(client); export const db = drizzle(client);

View File

@@ -1,6 +1,6 @@
import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core'; import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
export const user = sqliteTable('user', { export const user = sqliteTable("user", {
id: integer('id').primaryKey(), id: integer("id").primaryKey(),
age: integer('age') age: integer("age"),
}); });

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import '../app.css'; import "../app.css";
let { children } = $props(); let { children } = $props();
</script> </script>
{@render children()} {@render children()}

View File

@@ -1,18 +1,18 @@
import adapter from '@sveltejs/adapter-node'; import adapter from "@sveltejs/adapter-node";
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */
const config = { const config = {
// Consult https://svelte.dev/docs/kit/integrations // Consult https://svelte.dev/docs/kit/integrations
// for more information about preprocessors // for more information about preprocessors
preprocess: vitePreprocess(), preprocess: vitePreprocess(),
kit: { kit: {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list. // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter. // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters. // See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter() adapter: adapter(),
} },
}; };
export default config; export default config;

View File

@@ -1,11 +1,11 @@
import type { Config } from 'tailwindcss'; import type { Config } from "tailwindcss";
export default { export default {
content: ['./src/**/*.{html,js,svelte,ts}'], content: ["./src/**/*.{html,js,svelte,ts}"],
theme: { theme: {
extend: {} extend: {},
}, },
plugins: [] plugins: [],
} satisfies Config; } satisfies Config;

View File

@@ -1,19 +1,19 @@
{ {
"extends": "./.svelte-kit/tsconfig.json", "extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": { "compilerOptions": {
"allowJs": true, "allowJs": true,
"checkJs": true, "checkJs": true,
"esModuleInterop": true, "esModuleInterop": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"skipLibCheck": true, "skipLibCheck": true,
"sourceMap": true, "sourceMap": true,
"strict": true, "strict": true,
"moduleResolution": "bundler" "moduleResolution": "bundler"
} }
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
// //
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in // from the referenced tsconfig.json - TypeScript does not merge them in
} }

View File

@@ -1,6 +1,6 @@
import { sveltekit } from '@sveltejs/kit/vite'; import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig } from 'vite'; import { defineConfig } from "vite";
export default defineConfig({ export default defineConfig({
plugins: [sveltekit()] plugins: [sveltekit()],
}); });