Skip to content

Commit 528eba7

Browse files
committed
chore: format with prettier settings of sveltekit
1 parent 04f91d5 commit 528eba7

File tree

549 files changed

+5224
-5351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

549 files changed

+5224
-5351
lines changed

.editorconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
root = true
22

3-
# Unix-style newlines with a newline ending every file
43
[*]
54
end_of_line = lf
65
insert_final_newline = true
6+
indent_style = tab
7+
indent_size = 2
78
charset = utf-8
8-
indent_style = space
9-
indent_size = 2
9+
trim_trailing_whitespace = true

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ module.exports = {
7070
}
7171
},
7272
{
73-
files: ['packages/templates/**/vite.config.js', 'packages/playground/**/vite.config.js'],
73+
files: ['packages/playground/**/vite.config.js'],
7474
rules: {
7575
'no-unused-vars': 'off',
7676
'node/no-missing-require': 'off'

.ncurc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
2-
packageFile: ['package.json', 'packages/**/package.json'],
3-
reject: ['husky']
4-
}
2+
packageFile: ['package.json', 'packages/**/package.json'],
3+
reject: ['husky']
4+
};

commitlint.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
const configConventional = require('@commitlint/config-conventional')
2-
configConventional.rules['type-enum'][2].push('release', 'wip')
3-
module.exports = configConventional
1+
const configConventional = require('@commitlint/config-conventional');
2+
configConventional.rules['type-enum'][2].push('release', 'wip');
3+
module.exports = configConventional;

jest.config.js

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
1-
const isBuildTest = !!process.env.VITE_TEST_BUILD
1+
const isBuildTest = !!process.env.VITE_TEST_BUILD;
22
module.exports = {
3-
preset: 'ts-jest',
4-
testMatch: process.env.VITE_TEST_BUILD
5-
? ['**/playground/**/*.spec.[jt]s?(x)']
6-
: ['**/*.spec.[jt]s?(x)'],
7-
testTimeout: process.env.CI ? 30000 : 10000,
8-
globalSetup: './scripts/jestGlobalSetup.js',
9-
globalTeardown: './scripts/jestGlobalTeardown.js',
10-
testEnvironment: './scripts/jestEnv.js',
11-
setupFilesAfterEnv: ['./scripts/jestPerTestSetup.ts'],
12-
watchPathIgnorePatterns: ['<rootDir>/temp'],
13-
modulePathIgnorePatterns: ['<rootDir>/temp'],
14-
moduleNameMapper: {
15-
testUtils: '<rootDir>/packages/playground/testUtils.ts'
16-
},
17-
globals: {
18-
'ts-jest': {
19-
tsconfig: './packages/playground/tsconfig.json'
20-
}
21-
},
22-
reporters: [
23-
'default',
24-
[
25-
'jest-junit',
26-
{ outputDirectory: `<rootDir>/temp/${isBuildTest ? 'build' : 'serve'}` }
27-
]
28-
]
29-
}
3+
preset: 'ts-jest',
4+
testMatch: process.env.VITE_TEST_BUILD
5+
? ['**/playground/**/*.spec.[jt]s?(x)']
6+
: ['**/*.spec.[jt]s?(x)'],
7+
testTimeout: process.env.CI ? 30000 : 10000,
8+
globalSetup: './scripts/jestGlobalSetup.js',
9+
globalTeardown: './scripts/jestGlobalTeardown.js',
10+
testEnvironment: './scripts/jestEnv.js',
11+
setupFilesAfterEnv: ['./scripts/jestPerTestSetup.ts'],
12+
watchPathIgnorePatterns: ['<rootDir>/temp'],
13+
modulePathIgnorePatterns: ['<rootDir>/temp'],
14+
moduleNameMapper: {
15+
testUtils: '<rootDir>/packages/playground/testUtils.ts'
16+
},
17+
globals: {
18+
'ts-jest': {
19+
tsconfig: './packages/playground/tsconfig.json'
20+
}
21+
},
22+
reporters: [
23+
'default',
24+
['jest-junit', { outputDirectory: `<rootDir>/temp/${isBuildTest ? 'build' : 'serve'}` }]
25+
]
26+
};
Lines changed: 61 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,75 @@
11
<script>
2-
// import './app.css'
3-
import * as pages from './pages.js'
2+
// import './app.css'
3+
import * as pages from './pages.js';
44
5-
let currentCmp
5+
let currentCmp;
66
7-
const go = (cmp) => () => {
8-
currentCmp = cmp
9-
console.log(currentCmp.name)
10-
}
7+
const go = (cmp) => () => {
8+
currentCmp = cmp;
9+
console.log(currentCmp.name);
10+
};
1111
</script>
1212

1313
<nav>
14-
<h2>This is a huge app</h2>
15-
{#each Object.entries(pages) as [name, cmp] (cmp)}
16-
<a class="App-link" href on:click|preventDefault={go(cmp)}
17-
>{name.replace('_', ' ')}</a
18-
>
19-
{/each}
14+
<h2>This is a huge app</h2>
15+
{#each Object.entries(pages) as [name, cmp] (cmp)}
16+
<a class="App-link" href on:click|preventDefault={go(cmp)}>{name.replace('_', ' ')}</a>
17+
{/each}
2018
</nav>
2119

2220
{#if currentCmp}
23-
<main>
24-
<svelte:component this={currentCmp} />
25-
</main>
21+
<main>
22+
<svelte:component this={currentCmp} />
23+
</main>
2624
{:else}
27-
<div class="App">
28-
<header class="App-header">
29-
<p>
30-
Edit
31-
<code>src/App.svelte</code>
32-
and save to reload (prepare tissues).
33-
</p>
34-
<a
35-
class="App-link"
36-
href="https://svelte.dev"
37-
target="_blank"
38-
rel="noopener noreferrer">Learn Svelte</a
39-
>
40-
</header>
41-
</div>
25+
<div class="App">
26+
<header class="App-header">
27+
<p>
28+
Edit
29+
<code>src/App.svelte</code>
30+
and save to reload (prepare tissues).
31+
</p>
32+
<a class="App-link" href="https://svelte.dev" target="_blank" rel="noopener noreferrer"
33+
>Learn Svelte</a
34+
>
35+
</header>
36+
</div>
4237
{/if}
4338

4439
<style>
45-
:global(body) {
46-
margin: 0;
47-
font-family: Arial, Helvetica, sans-serif;
48-
}
49-
nav {
50-
float: left;
51-
text-align: center;
52-
padding: 1em;
53-
height: 100vh;
54-
overflow: auto;
55-
box-sizing: border-box;
56-
}
57-
nav a {
58-
display: block;
59-
}
60-
main {
61-
overflow: auto;
62-
text-align: center;
63-
}
64-
.App {
65-
text-align: center;
66-
}
67-
.App-header {
68-
background-color: #f9f6f6;
69-
color: #333;
70-
min-height: 100vh;
71-
display: flex;
72-
flex-direction: column;
73-
align-items: center;
74-
justify-content: center;
75-
font-size: calc(10px + 2vmin);
76-
}
77-
.App-link {
78-
color: #ff3e00;
79-
}
40+
:global(body) {
41+
margin: 0;
42+
font-family: Arial, Helvetica, sans-serif;
43+
}
44+
nav {
45+
float: left;
46+
text-align: center;
47+
padding: 1em;
48+
height: 100vh;
49+
overflow: auto;
50+
box-sizing: border-box;
51+
}
52+
nav a {
53+
display: block;
54+
}
55+
main {
56+
overflow: auto;
57+
text-align: center;
58+
}
59+
.App {
60+
text-align: center;
61+
}
62+
.App-header {
63+
background-color: #f9f6f6;
64+
color: #333;
65+
min-height: 100vh;
66+
display: flex;
67+
flex-direction: column;
68+
align-items: center;
69+
justify-content: center;
70+
font-size: calc(10px + 2vmin);
71+
}
72+
.App-link {
73+
color: #ff3e00;
74+
}
8075
</style>

packages/playground/big/src/app.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
body {
2-
background-color: cyan;
3-
background-color: magenta;
2+
background-color: cyan;
3+
background-color: magenta;
44
}

packages/playground/big/src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import App from './App.svelte'
1+
import App from './App.svelte';
22

33
var app = new App({
4-
target: document.body
5-
})
4+
target: document.body
5+
});
66

7-
export default app
7+
export default app;

0 commit comments

Comments
 (0)