Skip to content

Commit 5416ee4

Browse files
committed
Switch to using space-based indentation
1 parent c50a77e commit 5416ee4

38 files changed

+958
-942
lines changed

.prettierignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ package-lock.json
33
pnpm-lock.yaml
44
yarn.lock
55

6-
*.md
6+
*.md
7+
8+
cookbook/

.prettierrc

+14-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
2-
"useTabs": true,
3-
"singleQuote": true,
4-
"trailingComma": "none",
5-
"printWidth": 100,
6-
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
7-
"overrides": [
8-
{
9-
"files": "*.svelte",
10-
"options": {
11-
"parser": "svelte"
12-
}
13-
}
14-
]
2+
"useTabs": false,
3+
"tabWidth": 4,
4+
"singleQuote": true,
5+
"trailingComma": "none",
6+
"printWidth": 100,
7+
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
8+
"overrides": [
9+
{
10+
"files": "*.svelte",
11+
"options": {
12+
"parser": "svelte"
13+
}
14+
}
15+
]
1516
}

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"[markdown]": {
44
"editor.formatOnSave": false
55
}
6-
}
6+
}

eslint.config.js

+24-24
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,28 @@ import globals from 'globals';
66

77
/** @type {import('eslint').Linter.FlatConfig[]} */
88
export default [
9-
js.configs.recommended,
10-
...ts.configs.recommended,
11-
...svelte.configs['flat/recommended'],
12-
prettier,
13-
...svelte.configs['flat/prettier'],
14-
{
15-
languageOptions: {
16-
globals: {
17-
...globals.browser,
18-
...globals.node
19-
}
20-
}
21-
},
22-
{
23-
files: ['**/*.svelte'],
24-
languageOptions: {
25-
parserOptions: {
26-
parser: ts.parser
27-
}
28-
}
29-
},
30-
{
31-
ignores: ['build/', '.svelte-kit/', 'dist/']
32-
}
9+
js.configs.recommended,
10+
...ts.configs.recommended,
11+
...svelte.configs['flat/recommended'],
12+
prettier,
13+
...svelte.configs['flat/prettier'],
14+
{
15+
languageOptions: {
16+
globals: {
17+
...globals.browser,
18+
...globals.node
19+
}
20+
}
21+
},
22+
{
23+
files: ['**/*.svelte'],
24+
languageOptions: {
25+
parserOptions: {
26+
parser: ts.parser
27+
}
28+
}
29+
},
30+
{
31+
ignores: ['build/', '.svelte-kit/', 'dist/']
32+
}
3333
];

package.json

+51-51
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
{
2-
"name": "immediate-docs",
3-
"version": "0.0.1",
4-
"private": true,
5-
"scripts": {
6-
"dev": "vite dev",
7-
"build": "vite build",
8-
"preview": "vite preview",
9-
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
10-
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
11-
"lint": "prettier --check . && eslint .",
12-
"format": "prettier --write ."
13-
},
14-
"devDependencies": {
15-
"@iconify-json/ri": "^1.0.0",
16-
"@sveltejs/adapter-auto": "^3.0.0",
17-
"@sveltejs/adapter-static": "^3.0.4",
18-
"@sveltejs/kit": "^2.0.0",
19-
"@sveltejs/vite-plugin-svelte": "^3.0.0",
20-
"@svelteness/kit-docs": "^1.1.5",
21-
"@types/d3": "^7.4.3",
22-
"@types/eslint": "^8.56.7",
23-
"autoprefixer": "^10.4.19",
24-
"clsx": "^1.2.1",
25-
"eslint": "^9.0.0",
26-
"eslint-config-prettier": "^9.1.0",
27-
"eslint-plugin-svelte": "^2.36.0",
28-
"globals": "^15.0.0",
29-
"postcss": "^8.4.39",
30-
"prettier": "^3.3.3",
31-
"prettier-plugin-svelte": "^3.1.2",
32-
"prettier-plugin-tailwindcss": "^0.6.6",
33-
"shiki": "^0.12.0",
34-
"svelte": "^4.2.7",
35-
"svelte-check": "^3.6.0",
36-
"svelte-highlight": "^7.6.1",
37-
"tailwindcss": "^3.4.4",
38-
"tslib": "^2.4.1",
39-
"typescript": "^5.0.0",
40-
"typescript-eslint": "^8.0.0-alpha.20",
41-
"unplugin-icons": "^0.14.0",
42-
"vite": "^5.0.3"
43-
},
44-
"type": "module",
45-
"dependencies": {
46-
"@tailwindcss/typography": "^0.5.13",
47-
"d3": "^7.9.0",
48-
"layerchart": "^0.44.0",
49-
"lucide-svelte": "^0.407.0",
50-
"tailwind-merge": "^2.4.0",
51-
"typewriter-effect": "^2.21.0"
52-
}
2+
"name": "immediate-docs",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"dev": "vite dev",
7+
"build": "vite build",
8+
"preview": "vite preview",
9+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
10+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
11+
"lint": "prettier --check . && eslint .",
12+
"format": "prettier --write ."
13+
},
14+
"devDependencies": {
15+
"@iconify-json/ri": "^1.0.0",
16+
"@sveltejs/adapter-auto": "^3.0.0",
17+
"@sveltejs/adapter-static": "^3.0.4",
18+
"@sveltejs/kit": "^2.0.0",
19+
"@sveltejs/vite-plugin-svelte": "^3.0.0",
20+
"@svelteness/kit-docs": "^1.1.5",
21+
"@types/d3": "^7.4.3",
22+
"@types/eslint": "^8.56.7",
23+
"autoprefixer": "^10.4.19",
24+
"clsx": "^1.2.1",
25+
"eslint": "^9.0.0",
26+
"eslint-config-prettier": "^9.1.0",
27+
"eslint-plugin-svelte": "^2.36.0",
28+
"globals": "^15.0.0",
29+
"postcss": "^8.4.39",
30+
"prettier": "^3.3.3",
31+
"prettier-plugin-svelte": "^3.1.2",
32+
"prettier-plugin-tailwindcss": "^0.6.6",
33+
"shiki": "^0.12.0",
34+
"svelte": "^4.2.7",
35+
"svelte-check": "^3.6.0",
36+
"svelte-highlight": "^7.6.1",
37+
"tailwindcss": "^3.4.4",
38+
"tslib": "^2.4.1",
39+
"typescript": "^5.0.0",
40+
"typescript-eslint": "^8.0.0-alpha.20",
41+
"unplugin-icons": "^0.14.0",
42+
"vite": "^5.0.3"
43+
},
44+
"type": "module",
45+
"dependencies": {
46+
"@tailwindcss/typography": "^0.5.13",
47+
"d3": "^7.9.0",
48+
"layerchart": "^0.44.0",
49+
"lucide-svelte": "^0.407.0",
50+
"tailwind-merge": "^2.4.0",
51+
"typewriter-effect": "^2.21.0"
52+
}
5353
}

postcss.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default {
2-
plugins: {
3-
tailwindcss: {},
4-
autoprefixer: {}
5-
}
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {}
5+
}
66
};

src/app.css

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
@tailwind utilities;
44

55
.kit-docs > div > div:first-child {
6-
@apply backdrop-blur-md md:backdrop-blur-lg;
6+
@apply backdrop-blur-md md:backdrop-blur-lg;
77
}
88

99
code:before {
10-
@apply !content-none;
10+
@apply !content-none;
1111
}
1212

1313
code:after {
14-
@apply !content-none;
14+
@apply !content-none;
1515
}
1616

1717
.code-fence > .code > div > pre {
18-
@apply !my-2;
18+
@apply !my-2;
1919
}
2020

2121
.admonition > div {
22-
@apply !text-sm;
22+
@apply !text-sm;
2323
}
2424

2525
.step > div > .description > p {
26-
@apply !text-base;
26+
@apply !text-base;
2727
}

src/app.d.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
// See https://kit.svelte.dev/docs/types#app
44
// for information about these interfaces
55
declare global {
6-
namespace App {
7-
// interface Error {}
8-
// interface Locals {}
9-
// interface PageData {}
10-
// interface PageState {}
11-
// interface Platform {}
12-
}
6+
namespace App {
7+
// interface Error {}
8+
// interface Locals {}
9+
// interface PageData {}
10+
// interface PageState {}
11+
// interface Platform {}
12+
}
1313
}
1414

1515
export {};

src/app.html

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8" />
5-
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
6-
<meta name="viewport" content="width=device-width, initial-scale=1" />
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
77

8-
<script>
9-
const key = 'svelteness::color-scheme';
10-
const scheme = localStorage[key];
11-
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
12-
if (scheme === 'dark' || (scheme !== 'light' && prefersDark)) {
13-
document.documentElement.classList.add('dark');
14-
} else {
15-
document.documentElement.classList.remove('dark');
16-
}
17-
</script>
8+
<script>
9+
const key = 'svelteness::color-scheme';
10+
const scheme = localStorage[key];
11+
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
12+
if (scheme === 'dark' || (scheme !== 'light' && prefersDark)) {
13+
document.documentElement.classList.add('dark');
14+
} else {
15+
document.documentElement.classList.remove('dark');
16+
}
17+
</script>
1818

19-
%sveltekit.head%
20-
</head>
21-
<body data-sveltekit-preload-data="hover">
22-
<div style="display: contents">%sveltekit.body%</div>
23-
</body>
19+
%sveltekit.head%
20+
</head>
21+
<body data-sveltekit-preload-data="hover">
22+
<div style="display: contents">%sveltekit.body%</div>
23+
</body>
2424
</html>

src/lib/code-examples/api/example.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import GetTodo from './example_src/GetTodo.cs?raw';
77
import Todo from './example_src/Todo.cs?raw';
88

99
export default {
10-
type: ExampleType.WebApi,
11-
label: 'Web API',
12-
icon: Server,
13-
contents: [
14-
{ name: 'GetTodo.cs', content: GetTodo },
15-
{ name: 'Todo.cs', content: Todo },
16-
validationAssemblyAttributes,
17-
{ name: 'Program.cs', content: Program }
18-
]
10+
type: ExampleType.WebApi,
11+
label: 'Web API',
12+
icon: Server,
13+
contents: [
14+
{ name: 'GetTodo.cs', content: GetTodo },
15+
{ name: 'Todo.cs', content: Todo },
16+
validationAssemblyAttributes,
17+
{ name: 'Program.cs', content: Program }
18+
]
1919
} as CodeExample;

src/lib/code-examples/blazor/example.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import Todo from './example_src/Todo.cs?raw';
77
import Program from './example_src/Program.cs?raw';
88

99
export default {
10-
type: ExampleType.Blazor,
11-
label: 'Blazor',
12-
icon: BlazorIcon,
13-
contents: [
14-
{ name: 'Index.razor', content: IndexRazor },
15-
{ name: 'Endpoints/GetTodos.cs', content: GetTodos },
16-
{ name: 'Todo.cs', content: Todo },
17-
{ name: 'Program.cs', content: Program }
18-
]
10+
type: ExampleType.Blazor,
11+
label: 'Blazor',
12+
icon: BlazorIcon,
13+
contents: [
14+
{ name: 'Index.razor', content: IndexRazor },
15+
{ name: 'Endpoints/GetTodos.cs', content: GetTodos },
16+
{ name: 'Todo.cs', content: Todo },
17+
{ name: 'Program.cs', content: Program }
18+
]
1919
} as CodeExample;

src/lib/code-examples/cli/example.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import RootCommand from './example_src/RootCommand.cs?raw';
66
import Query from './example_src/Queries/GetRandomNumber.cs?raw';
77

88
export default {
9-
type: ExampleType.Cli,
10-
label: 'CLI',
11-
icon: SquareChevronRight,
12-
contents: [
13-
{ name: 'Queries/GetRandomNumber.cs', content: Query },
14-
{ name: 'RootCommand.cs', content: RootCommand },
15-
{ name: 'Program.cs', content: Program }
16-
]
9+
type: ExampleType.Cli,
10+
label: 'CLI',
11+
icon: SquareChevronRight,
12+
contents: [
13+
{ name: 'Queries/GetRandomNumber.cs', content: Query },
14+
{ name: 'RootCommand.cs', content: RootCommand },
15+
{ name: 'Program.cs', content: Program }
16+
]
1717
} as CodeExample;

src/lib/code-examples/common.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { CodeFile } from '../types';
22

33
export const validationAssemblyAttributes: CodeFile = {
4-
name: 'AssemblyAttributes.cs',
5-
content: `[assembly: Behaviors(
4+
name: 'AssemblyAttributes.cs',
5+
content: `[assembly: Behaviors(
66
typeof(ValidationBehavior<,>)
77
)]`
88
};

0 commit comments

Comments
 (0)