Skip to content

Commit b66074a

Browse files
authored
Merge pull request #181 from bryanmylee/sveltekit-2
Port to SvelteKit 2
2 parents 626cccc + eb6344a commit b66074a

22 files changed

+4198
-13345
lines changed

.eslintignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
node_modules
33
/build
44
/.svelte-kit
5-
/dist
5+
/package
66
.env
77
.env.*
88
!.env.example
9-
/coverage
9+
10+
# Ignore files for PNPM, NPM and YARN
1011
pnpm-lock.yaml
11-
/docs
12+
package-lock.json
13+
yarn.lock

.eslintrc.cjs

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
1+
/** @type { import("eslint").Linter.Config } */
12
module.exports = {
23
root: true,
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:svelte/recommended',
8+
'prettier'
9+
],
310
parser: '@typescript-eslint/parser',
4-
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
5-
plugins: ['svelte3', '@typescript-eslint'],
6-
ignorePatterns: ['*.cjs'],
7-
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
8-
settings: {
9-
'svelte3/typescript': () => require('typescript'),
10-
},
11+
plugins: ['@typescript-eslint'],
1112
parserOptions: {
1213
sourceType: 'module',
1314
ecmaVersion: 2020,
15+
extraFileExtensions: ['.svelte']
1416
},
1517
env: {
1618
browser: true,
1719
es2017: true,
18-
node: true,
20+
node: true
1921
},
22+
overrides: [
23+
{
24+
files: ['*.svelte'],
25+
parser: 'svelte-eslint-parser',
26+
parserOptions: {
27+
parser: '@typescript-eslint/parser'
28+
}
29+
}
30+
]
2031
};

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
- uses: actions/checkout@v1
1717
- uses: actions/setup-node@v1
1818
with:
19-
node-version: 16
20-
- run: npm install svelte
19+
node-version: 18
20+
- run: npm i svelte
2121
- run: npm ci
2222
- run: npm test
2323
- uses: coverallsapp/github-action@master

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-node@v1
1616
with:
17-
node-version: 16
17+
node-version: 18
1818
- run: npm ci
1919
- run: npm test
2020

@@ -25,10 +25,10 @@ jobs:
2525
- uses: actions/checkout@v2
2626
- uses: actions/setup-node@v1
2727
with:
28-
node-version: 16
28+
node-version: 18
2929
registry-url: https://registry.npmjs.org/
3030
- run: npm ci
3131
- run: npm run package
32-
- run: npm publish ./package
32+
- run: npm publish .
3333
env:
3434
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
.DS_Store
22
node_modules
33
/build
4-
/.svelte-kit
54
/dist
5+
/.svelte-kit
6+
/package
67
.env
78
.env.*
89
!.env.example
9-
/coverage
10+
vite.config.js.timestamp-*
11+
vite.config.ts.timestamp-*
12+
/coverage

.npmignore

Lines changed: 0 additions & 10 deletions
This file was deleted.

.prettierignore

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
.DS_Store
2-
node_modules
3-
/build
4-
/.svelte-kit
5-
/dist
6-
.env
7-
.env.*
8-
!.env.example
9-
/coverage
1+
# Ignore files for PNPM, NPM and YARN
102
pnpm-lock.yaml
11-
/docs
3+
package-lock.json
4+
yarn.lock

.prettierrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"useTabs": true,
33
"singleQuote": true,
4-
"printWidth": 100
4+
"printWidth": 100,
5+
"plugins": ["prettier-plugin-svelte"],
6+
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
57
}

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

babel.config.cjs

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)