Change prettier configuration.

This commit is contained in:
Emmanuel 2022-08-09 10:44:30 +02:00
parent 7af25b7a80
commit 031eaf8ea0
16 changed files with 6674 additions and 6670 deletions

View file

@ -1,20 +1,24 @@
module.exports = { module.exports = {
root: true, root: true,
parser: '@typescript-eslint/parser', parser: "@typescript-eslint/parser",
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], extends: [
plugins: ['svelte3', '@typescript-eslint'], "eslint:recommended",
ignorePatterns: ['*.cjs'], "plugin:@typescript-eslint/recommended",
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], "prettier",
],
plugins: ["svelte3", "@typescript-eslint"],
ignorePatterns: ["*.cjs"],
overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }],
settings: { settings: {
'svelte3/typescript': () => require('typescript') "svelte3/typescript": () => require("typescript"),
}, },
parserOptions: { parserOptions: {
sourceType: 'module', sourceType: "module",
ecmaVersion: 2020 ecmaVersion: 2020,
}, },
env: { env: {
browser: true, browser: true,
es2017: true, es2017: true,
node: true node: true,
} },
}; }

View file

@ -1,6 +0,0 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100
}

View file

@ -1,10 +1,10 @@
import type { PlaywrightTestConfig } from '@playwright/test'; import type { PlaywrightTestConfig } from "@playwright/test"
const config: PlaywrightTestConfig = { const config: PlaywrightTestConfig = {
webServer: { webServer: {
command: 'npm run build && npm run preview', command: "npm run build && npm run preview",
port: 4173 port: 4173,
} },
}; }
export default config; export default config

View file

@ -1,13 +1,13 @@
const tailwindcss = require('tailwindcss'); const tailwindcss = require("tailwindcss")
const autoprefixer = require('autoprefixer'); const autoprefixer = require("autoprefixer")
const config = { const config = {
plugins: [ plugins: [
//Some plugins, like tailwindcss/nesting, need to run before Tailwind, //Some plugins, like tailwindcss/nesting, need to run before Tailwind,
tailwindcss(), tailwindcss(),
//But others, like autoprefixer, need to run after, //But others, like autoprefixer, need to run after,
autoprefixer autoprefixer,
] ],
}; }
module.exports = config; module.exports = config

4
prettier.config.cjs Normal file
View file

@ -0,0 +1,4 @@
module.exports = {
semi: false,
trailingComma: "all",
}

View file

@ -1,5 +1,5 @@
<script> <script>
import '../app.css'; import "../app.css"
</script> </script>
<slot /> <slot />

View file

@ -1,2 +1,4 @@
<h1>Welcome to SvelteKit</h1> <h1>Welcome to SvelteKit</h1>
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p> <p>
Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation
</p>

View file

@ -1,5 +1,5 @@
import adapter from '@sveltejs/adapter-auto'; import adapter from "@sveltejs/adapter-auto"
import preprocess from 'svelte-preprocess'; import preprocess from "svelte-preprocess"
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */
const config = { const config = {
@ -7,13 +7,13 @@ const config = {
// for more information about preprocessors // for more information about preprocessors
preprocess: [ preprocess: [
preprocess({ preprocess({
postcss: true postcss: true,
}) }),
], ],
kit: { kit: {
adapter: adapter() adapter: adapter(),
} },
}; }
export default config; export default config

View file

@ -1,14 +1,14 @@
const daisyui = require('daisyui'); const daisyui = require("daisyui")
const typography = require('@tailwindcss/typography'); const typography = require("@tailwindcss/typography")
const config = { const config = {
content: ['./src/**/*.{html,js,svelte,ts}'], content: ["./src/**/*.{html,js,svelte,ts}"],
theme: { theme: {
extend: {} extend: {},
}, },
plugins: [typography, daisyui] plugins: [typography, daisyui],
}; }
module.exports = config; module.exports = config

View file

@ -1,6 +1,6 @@
import { expect, test } from '@playwright/test'; import { expect, test } from "@playwright/test"
test('index page has expected h1', async ({ page }) => { test("index page has expected h1", async ({ page }) => {
await page.goto('/'); await page.goto("/")
expect(await page.textContent('h1')).toBe('Welcome to SvelteKit'); expect(await page.textContent("h1")).toBe("Welcome to SvelteKit")
}); })

View file

@ -1,8 +1,8 @@
import { sveltekit } from '@sveltejs/kit/vite'; import { sveltekit } from "@sveltejs/kit/vite"
/** @type {import('vite').UserConfig} */ /** @type {import('vite').UserConfig} */
const config = { const config = {
plugins: [sveltekit()] plugins: [sveltekit()],
}; }
export default config; export default config