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 = {
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' }],
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')
"svelte3/typescript": () => require("typescript"),
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020
sourceType: "module",
ecmaVersion: 2020,
},
env: {
browser: 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 = {
webServer: {
command: 'npm run build && npm run preview',
port: 4173
command: "npm run build && npm run preview",
port: 4173,
},
}
};
export default config;
export default config

View file

@ -1,13 +1,13 @@
const tailwindcss = require('tailwindcss');
const autoprefixer = require('autoprefixer');
const tailwindcss = require("tailwindcss")
const autoprefixer = require("autoprefixer")
const config = {
plugins: [
//Some plugins, like tailwindcss/nesting, need to run before Tailwind,
tailwindcss(),
//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>
import '../app.css';
import "../app.css"
</script>
<slot />

View file

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

View file

@ -1,14 +1,14 @@
const daisyui = require('daisyui');
const typography = require('@tailwindcss/typography');
const daisyui = require("daisyui")
const typography = require("@tailwindcss/typography")
const config = {
content: ['./src/**/*.{html,js,svelte,ts}'],
content: ["./src/**/*.{html,js,svelte,ts}"],
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 }) => {
await page.goto('/');
expect(await page.textContent('h1')).toBe('Welcome to SvelteKit');
});
test("index page has expected h1", async ({ page }) => {
await page.goto("/")
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} */
const config = {
plugins: [sveltekit()]
};
plugins: [sveltekit()],
}
export default config;
export default config