Skip to content

Commit 31c2ca7

Browse files
committed
Update indent spacing from tabs to spaces in prettier.
1 parent ce04cb3 commit 31c2ca7

26 files changed

+278
-276
lines changed

.eslintrc.cjs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
/** @type { import("eslint").Linter.FlatConfig } */
22
module.exports = {
3-
root: true,
4-
extends: [
5-
'eslint:recommended',
6-
'plugin:@typescript-eslint/recommended',
7-
'plugin:svelte/recommended',
8-
'prettier'
9-
],
10-
parser: '@typescript-eslint/parser',
11-
plugins: ['@typescript-eslint'],
12-
parserOptions: {
13-
sourceType: 'module',
14-
ecmaVersion: 2020,
15-
extraFileExtensions: ['.svelte']
16-
},
17-
env: {
18-
browser: true,
19-
es2017: true,
20-
node: true
21-
},
22-
overrides: [
23-
{
24-
files: ['*.svelte'],
25-
parser: 'svelte-eslint-parser',
26-
parserOptions: {
27-
parser: '@typescript-eslint/parser'
28-
}
29-
}
30-
]
3+
root: true,
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:svelte/recommended',
8+
'prettier'
9+
],
10+
parser: '@typescript-eslint/parser',
11+
plugins: ['@typescript-eslint'],
12+
parserOptions: {
13+
sourceType: 'module',
14+
ecmaVersion: 2020,
15+
extraFileExtensions: ['.svelte']
16+
},
17+
env: {
18+
browser: true,
19+
es2017: true,
20+
node: true
21+
},
22+
overrides: [
23+
{
24+
files: ['*.svelte'],
25+
parser: 'svelte-eslint-parser',
26+
parserOptions: {
27+
parser: '@typescript-eslint/parser'
28+
}
29+
}
30+
]
3131
};

.prettierrc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"useTabs": true,
3-
"singleQuote": true,
4-
"trailingComma": "none",
5-
"printWidth": 100,
6-
"plugins": ["prettier-plugin-svelte"],
7-
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
2+
"useTabs": false,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"printWidth": 100,
6+
"plugins": ["prettier-plugin-svelte"],
7+
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
88
}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,13 @@ npm run test
5454
## Linting
5555

5656
Test if there are linting errors that need to be fixed:
57+
5758
```bash
5859
npm run lint
5960
```
6061

6162
Format code using Prettier:
63+
6264
```bash
6365
npm run format
6466
```

package.json

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
{
2-
"name": "pic-sure-frontend",
3-
"version": "0.0.1",
4-
"private": true,
5-
"scripts": {
6-
"dev": "vite dev",
7-
"build": "vite build",
8-
"preview": "vite preview",
9-
"test": "npm run test:integration && npm run test:unit",
10-
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
11-
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
12-
"lint": "prettier --check . && eslint .",
13-
"format": "prettier --write .",
14-
"test:integration": "playwright test --reporter=html",
15-
"test:unit": "vitest"
16-
},
17-
"devDependencies": {
18-
"@playwright/test": "^1.28.1",
19-
"@skeletonlabs/skeleton": "2.6.0",
20-
"@skeletonlabs/tw-plugin": "0.3.0",
21-
"@sveltejs/adapter-auto": "^3.0.0",
22-
"@sveltejs/adapter-node": "^2.0.0",
23-
"@sveltejs/kit": "^2.0.0",
24-
"@sveltejs/vite-plugin-svelte": "^3.0.0",
25-
"@tailwindcss/forms": "0.5.7",
26-
"@tailwindcss/typography": "0.5.10",
27-
"@types/node": "20.10.5",
28-
"@typescript-eslint/eslint-plugin": "^6.0.0",
29-
"@typescript-eslint/parser": "^6.0.0",
30-
"autoprefixer": "10.4.16",
31-
"eslint": "^8.28.0",
32-
"eslint-config-prettier": "^9.1.0",
33-
"eslint-plugin-svelte": "^2.30.0",
34-
"postcss": "8.4.32",
35-
"prettier": "^3.1.1",
36-
"prettier-plugin-svelte": "^3.1.2",
37-
"svelte": "^4.2.7",
38-
"svelte-check": "^3.6.0",
39-
"tailwindcss": "3.3.6",
40-
"tslib": "^2.4.1",
41-
"typescript": "^5.0.0",
42-
"vite": "^5.0.3",
43-
"vite-plugin-tailwind-purgecss": "0.2.0",
44-
"vitest": "^1.0.0"
45-
},
46-
"type": "module",
47-
"dependencies": {
48-
"@floating-ui/dom": "1.5.3",
49-
"@fortawesome/fontawesome-free": "^6.5.1",
50-
"dotenv": "^16.3.1"
51-
}
2+
"name": "pic-sure-frontend",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"dev": "vite dev",
7+
"build": "vite build",
8+
"preview": "vite preview",
9+
"test": "npm run test:integration && npm run test:unit",
10+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
11+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
12+
"lint": "prettier --check . && eslint .",
13+
"format": "prettier --write .",
14+
"test:integration": "playwright test --reporter=html",
15+
"test:unit": "vitest"
16+
},
17+
"devDependencies": {
18+
"@playwright/test": "^1.28.1",
19+
"@skeletonlabs/skeleton": "2.6.0",
20+
"@skeletonlabs/tw-plugin": "0.3.0",
21+
"@sveltejs/adapter-auto": "^3.0.0",
22+
"@sveltejs/adapter-node": "^2.0.0",
23+
"@sveltejs/kit": "^2.0.0",
24+
"@sveltejs/vite-plugin-svelte": "^3.0.0",
25+
"@tailwindcss/forms": "0.5.7",
26+
"@tailwindcss/typography": "0.5.10",
27+
"@types/node": "20.10.5",
28+
"@typescript-eslint/eslint-plugin": "^6.0.0",
29+
"@typescript-eslint/parser": "^6.0.0",
30+
"autoprefixer": "10.4.16",
31+
"eslint": "^8.28.0",
32+
"eslint-config-prettier": "^9.1.0",
33+
"eslint-plugin-svelte": "^2.30.0",
34+
"postcss": "8.4.32",
35+
"prettier": "^3.1.1",
36+
"prettier-plugin-svelte": "^3.1.2",
37+
"svelte": "^4.2.7",
38+
"svelte-check": "^3.6.0",
39+
"tailwindcss": "3.3.6",
40+
"tslib": "^2.4.1",
41+
"typescript": "^5.0.0",
42+
"vite": "^5.0.3",
43+
"vite-plugin-tailwind-purgecss": "0.2.0",
44+
"vitest": "^1.0.0"
45+
},
46+
"type": "module",
47+
"dependencies": {
48+
"@floating-ui/dom": "1.5.3",
49+
"@fortawesome/fontawesome-free": "^6.5.1",
50+
"dotenv": "^16.3.1"
51+
}
5252
}

playwright.config.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import type { PlaywrightTestConfig } from '@playwright/test';
22

33
const config: PlaywrightTestConfig = {
4-
webServer: {
5-
command: 'npm run build && npm run preview',
6-
port: 4173
7-
},
8-
testDir: 'tests',
9-
testMatch: /(.+\.)?(test|spec)\.[jt]s/
4+
webServer: {
5+
command: 'npm run build && npm run preview',
6+
port: 4173
7+
},
8+
testDir: 'tests',
9+
testMatch: /(.+\.)?(test|spec)\.[jt]s/
1010
};
1111

1212
export default config;

postcss.config.cjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
2-
plugins: {
3-
tailwindcss: {},
4-
autoprefixer: {}
5-
}
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {}
5+
}
66
};

src/app.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// for information about these interfaces
33
// and what to do when importing types
44
declare namespace App {
5-
// interface Locals {}
6-
// interface PageData {}
7-
// interface Error {}
8-
// interface Platform {}
5+
// interface Locals {}
6+
// interface PageData {}
7+
// interface Error {}
8+
// interface Platform {}
99
}

src/app.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<!doctype html>
22
<html lang="en" class="dark">
3-
<head>
4-
<meta charset="utf-8" />
5-
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
6-
<meta name="viewport" content="width=device-width" />
7-
%sveltekit.head%
8-
</head>
9-
<body data-sveltekit-preload-data="hover" data-theme="vintage" class="h-full overflow-hidden">
10-
<div style="display: contents">%sveltekit.body%</div>
11-
</body>
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
6+
<meta name="viewport" content="width=device-width" />
7+
%sveltekit.head%
8+
</head>
9+
<body data-sveltekit-preload-data="hover" data-theme="vintage" class="h-full overflow-hidden">
10+
<div style="display: contents">%sveltekit.body%</div>
11+
</body>
1212
</html>

src/app.postcss

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,52 @@
55

66
html,
77
body {
8-
@apply h-full overflow-hidden;
8+
@apply h-full overflow-hidden;
99
}
1010

1111
/* vintage theme */
1212
@font-face {
13-
font-family: 'Abril Fatface';
14-
src: url('/fonts/AbrilFatface.ttf');
15-
font-display: swap;
13+
font-family: 'Abril Fatface';
14+
src: url('/fonts/AbrilFatface.ttf');
15+
font-display: swap;
1616
}
1717

1818
section.main-content {
19-
width: 60%; /* The width is 60%, by default */
20-
margin: 20px auto 0;
19+
width: 60%; /* The width is 60%, by default */
20+
margin: 20px auto 0;
2121
}
2222

2323
/* Use a media query to add a breakpoint at 800px: */
2424
@media screen and (max-width: 800px) {
25-
section.main-content {
26-
width: 100%; /* The width is 100%, when the viewport is 800px or smaller */
27-
}
25+
section.main-content {
26+
width: 100%; /* The width is 100%, when the viewport is 800px or smaller */
27+
}
2828
}
2929

3030
nav#page-navigation {
31-
display: flex;
32-
flex-flow: row wrap;
33-
align-items: stretch;
34-
justify-content: flex-end;
35-
margin-left: 10px;
31+
display: flex;
32+
flex-flow: row wrap;
33+
align-items: stretch;
34+
justify-content: flex-end;
35+
margin-left: 10px;
3636
}
3737
nav#page-navigation a {
38-
font-size: 1.2em;
39-
display: flex;
40-
justify-content: center;
41-
align-items: center;
42-
text-align: center;
43-
padding: 5px 5px;
44-
height: 80px;
45-
width: 150px;
38+
font-size: 1.2em;
39+
display: flex;
40+
justify-content: center;
41+
align-items: center;
42+
text-align: center;
43+
padding: 5px 5px;
44+
height: 80px;
45+
width: 150px;
4646
}
4747
nav#page-navigation a[aria-current='page'] {
48-
/* @apply bg-primary-500; */
49-
background-color: rgba(var(--color-primary-900));
50-
color: rgba(var(--color-primary-50));
48+
/* @apply bg-primary-500; */
49+
background-color: rgba(var(--color-primary-900));
50+
color: rgba(var(--color-primary-50));
5151
}
5252
nav#page-navigation a:hover {
53-
/* @apply bg-secondary-500; */
54-
background-color: rgba(var(--color-secondary-500));
55-
color: rgba(var(--color-surface-900));
53+
/* @apply bg-secondary-500; */
54+
background-color: rgba(var(--color-secondary-500));
55+
color: rgba(var(--color-surface-900));
5656
}

src/index.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, it, expect } from 'vitest';
22

33
describe('sum test', () => {
4-
it('adds 1 + 2 to equal 3', () => {
5-
expect(1 + 2).toBe(3);
6-
});
4+
it('adds 1 + 2 to equal 3', () => {
5+
expect(1 + 2).toBe(3);
6+
});
77
});

src/lib/content.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script lang="ts">
2-
export let title = 'Unknown page title';
2+
export let title = 'Unknown page title';
33
</script>
44

55
<section class="main-content">
6-
<h1 class="h1 mb-4">
7-
{title}
8-
</h1>
9-
<slot />
6+
<h1 class="h1 mb-4">
7+
{title}
8+
</h1>
9+
<slot />
1010
</section>

0 commit comments

Comments
 (0)