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",
settings: { ],
'svelte3/typescript': () => require('typescript') plugins: ["svelte3", "@typescript-eslint"],
}, ignorePatterns: ["*.cjs"],
parserOptions: { overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }],
sourceType: 'module', settings: {
ecmaVersion: 2020 "svelte3/typescript": () => require("typescript"),
}, },
env: { parserOptions: {
browser: true, sourceType: "module",
es2017: true, ecmaVersion: 2020,
node: true },
} env: {
}; browser: true,
es2017: true,
node: true,
},
}

View file

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

13060
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,40 +1,40 @@
{ {
"name": "tricoteuses-legal", "name": "tricoteuses-legal",
"version": "0.0.1", "version": "0.0.1",
"scripts": { "scripts": {
"dev": "vite dev", "dev": "vite dev",
"build": "vite build", "build": "vite build",
"package": "svelte-kit package", "package": "svelte-kit package",
"preview": "vite preview", "preview": "vite preview",
"test": "playwright test", "test": "playwright test",
"check": "svelte-check --tsconfig ./tsconfig.json", "check": "svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch", "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check --plugin-search-dir=. . && eslint .", "lint": "prettier --check --plugin-search-dir=. . && eslint .",
"format": "prettier --write --plugin-search-dir=. ." "format": "prettier --write --plugin-search-dir=. ."
}, },
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.22.2", "@playwright/test": "^1.22.2",
"@sveltejs/adapter-auto": "next", "@sveltejs/adapter-auto": "next",
"@sveltejs/kit": "next", "@sveltejs/kit": "next",
"@typescript-eslint/eslint-plugin": "^5.27.0", "@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0", "@typescript-eslint/parser": "^5.27.0",
"eslint": "^8.16.0", "eslint": "^8.16.0",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"eslint-plugin-svelte3": "^4.0.0", "eslint-plugin-svelte3": "^4.0.0",
"prettier": "^2.6.2", "prettier": "^2.6.2",
"prettier-plugin-svelte": "^2.7.0", "prettier-plugin-svelte": "^2.7.0",
"svelte": "^3.44.0", "svelte": "^3.44.0",
"svelte-check": "^2.7.1", "svelte-check": "^2.7.1",
"svelte-preprocess": "^4.10.7", "svelte-preprocess": "^4.10.7",
"tslib": "^2.3.1", "tslib": "^2.3.1",
"typescript": "^4.7.4", "typescript": "^4.7.4",
"vite": "^3.0.0", "vite": "^3.0.0",
"postcss": "^8.4.14", "postcss": "^8.4.14",
"postcss-load-config": "^4.0.1", "postcss-load-config": "^4.0.1",
"autoprefixer": "^10.4.7", "autoprefixer": "^10.4.7",
"tailwindcss": "^3.1.5", "tailwindcss": "^3.1.5",
"@tailwindcss/typography": "^0.5.3", "@tailwindcss/typography": "^0.5.3",
"daisyui": "^2.18.1" "daisyui": "^2.18.1"
}, },
"type": "module" "type": "module"
} }

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

12
src/app.d.ts vendored
View file

@ -2,10 +2,10 @@
// for information about these interfaces // for information about these interfaces
// and what to do when importing types // and what to do when importing types
declare namespace App { declare namespace App {
// interface Locals {} // interface Locals {}
// interface Platform {} // interface Platform {}
// interface PrivateEnv {} // interface PrivateEnv {}
// interface PublicEnv {} // interface PublicEnv {}
// interface Session {} // interface Session {}
// interface Stuff {} // interface Stuff {}
} }

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" /> <meta name="viewport" content="width=device-width" />
%sveltekit.head% %sveltekit.head%
</head> </head>
<body> <body>
<div>%sveltekit.body%</div> <div>%sveltekit.body%</div>
</body> </body>
</html> </html>

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,19 +1,19 @@
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 = {
// Consult https://github.com/sveltejs/svelte-preprocess // Consult https://github.com/sveltejs/svelte-preprocess
// 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,13 +1,13 @@
{ {
"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
} }
} }

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