Commit ca0f896a authored by ChanHaeng Lee's avatar ChanHaeng Lee
Browse files

Set prettier

parent 8d2fe420
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lock
bun.lockb

# Miscellaneous
/static/
+13 −0
Original line number Diff line number Diff line
{
  "printWidth": 80,
  "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
  "overrides": [
    {
      "files": "*.svelte",
      "options": {
        "parser": "svelte"
      }
    }
  ],
  "tailwindStylesheet": "./src/app.css"
}
+36 −35
Original line number Diff line number Diff line
import { includeIgnoreFile } from '@eslint/compat';
import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';
import prettier from "eslint-config-prettier";
import { includeIgnoreFile } from "@eslint/compat";
import js from "@eslint/js";
import svelte from "eslint-plugin-svelte";
import globals from "globals";
import { fileURLToPath } from "node:url";
import ts from "typescript-eslint";
import svelteConfig from "./svelte.config.js";

const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
const gitignorePath = fileURLToPath(new URL("./.gitignore", import.meta.url));

export default ts.config(
  includeIgnoreFile(gitignorePath),
  js.configs.recommended,
  ...ts.configs.recommended,
  ...svelte.configs.recommended,
  prettier,
  ...svelte.configs.prettier,
  {
    languageOptions: {
			globals: { ...globals.browser, ...globals.node }
      globals: { ...globals.browser, ...globals.node },
    },
		rules: { // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
    rules: {
      // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
      // see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
		"no-undef": 'off' }
      "no-undef": "off",
    },
  },
  {
		files: [
			'**/*.svelte',
			'**/*.svelte.ts',
			'**/*.svelte.js'
		],
    files: ["**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"],
    languageOptions: {
      parserOptions: {
        projectService: true,
				extraFileExtensions: ['.svelte'],
        extraFileExtensions: [".svelte"],
        parser: ts.parser,
				svelteConfig
			}
		}
	}
        svelteConfig,
      },
    },
  },
);
+6 −1
Original line number Diff line number Diff line
@@ -16,11 +16,16 @@
    "prepare": "svelte-kit sync || echo ''",
    "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
    "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
    "lint": "eslint ."
    "format": "prettier --write .",
    "lint": "prettier --check . && eslint ."
  },
  "dependencies": {
    "@fedify/fedify": "workspace:",
    "@fedify/sveltekit": "workspace:",
    "eslint-config-prettier": "^10.1.8",
    "prettier": "^3.6.2",
    "prettier-plugin-svelte": "^3.4.0",
    "prettier-plugin-tailwindcss": "^0.6.14",
    "x-forwarded-fetch": "^0.2.0"
  },
  "devDependencies": {
+1 −1
Original line number Diff line number Diff line
@import 'tailwindcss';
@import "tailwindcss";
Loading