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,7 +1,4 @@
{ {
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100, "printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [ "overrides": [

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,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";

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,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import '../app.css'; import "../app.css";
let { children } = $props(); let { children } = $props();
</script> </script>

View File

@@ -1,5 +1,5 @@
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 = {
@@ -11,8 +11,8 @@ const config = {
// 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,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()],
}); });