Skip to content

Commit fe8a9ce

Browse files
dummdidummRich-Harristrueadm
committed
breaking: init Svelte 5
Co-authored-by: Rich Harris <[email protected]> Co-authored-by: Simon Holthausen <[email protected]> Co-authored-by: Dominic Gannaway <[email protected]>
1 parent 1369aa5 commit fe8a9ce

File tree

7,233 files changed

+86262
-86797
lines changed

Some content is hidden

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

7,233 files changed

+86262
-86797
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"fixed": [],
66
"linked": [],
77
"access": "public",
8-
"baseBranch": "svelte-4",
8+
"baseBranch": "svelte-5",
99
"bumpVersionsWithWorkspaceProtocolOnly": true,
1010
"ignore": ["!(@sveltejs/*|svelte)"]
1111
}

.eslintignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# NOTE: In general this should be kept in sync with .eslintignore
2+
3+
**/dist/**
4+
**/config/**
5+
**/build/**
6+
**/playgrounds/sandbox/**
7+
**/npm/**
8+
**/*.js.flow
9+
**/*.d.ts
10+
**/playwright*/**
11+
**/vite.config.js
12+
**/vite.prod.config.js
13+
**/node_modules
14+
15+
**/tests/**
16+
17+
# documentation can contain invalid examples
18+
documentation/**
19+
20+
# contains a fork of the REPL which doesn't adhere to eslint rules
21+
sites/svelte-5-preview/**
22+
# Wasn't checked previously, reenable at some point
23+
sites/svelte.dev/**

.eslintrc.cjs

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
module.exports = {
2+
extends: ['@sveltejs'],
3+
4+
// TODO: add runes to eslint-plugin-svelte
5+
globals: {
6+
$state: true,
7+
$derived: true,
8+
$effect: true,
9+
$props: true
10+
},
11+
12+
overrides: [
13+
{
14+
// scripts and playground should be console logging so don't lint against them
15+
files: ['playgrounds/**/*', 'scripts/**/*'],
16+
rules: {
17+
'no-console': 'off'
18+
}
19+
},
20+
{
21+
// the playgrounds can use public naming conventions since they're examples
22+
files: ['playgrounds/**/*'],
23+
rules: {
24+
'lube/svelte-naming-convention': 'off'
25+
}
26+
},
27+
{
28+
files: ['packages/svelte/src/compiler/**/*'],
29+
rules: {
30+
'no-var': 'error'
31+
}
32+
}
33+
],
34+
35+
plugins: ['lube'],
36+
37+
rules: {
38+
'no-console': 'error',
39+
'lube/svelte-naming-convention': ['error', { fixSameNames: true }],
40+
// eslint isn't that well-versed with JSDoc to know that `foo: /** @type{..} */ (foo)` isn't a violation of this rule, so turn it off
41+
'object-shorthand': 'off',
42+
'no-var': 'off',
43+
44+
// TODO: enable these rules and run `pnpm lint:fix`
45+
// skipping that for now so as to avoid impacting real work
46+
'@typescript-eslint/array-type': 'off',
47+
'@typescript-eslint/no-namespace': 'off',
48+
'@typescript-eslint/no-non-null-assertion': 'off',
49+
'@typescript-eslint/no-unused-vars': 'off',
50+
'prefer-const': 'off',
51+
'svelte/valid-compile': 'off',
52+
quotes: 'off'
53+
}
54+
};

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: CI
22
on:
33
push:
4-
branches: [svelte-4]
4+
branches: [svelte-5]
55
pull_request:
66
permissions:
77
contents: read # to fetch code (actions/checkout)

.github/workflows/ecosystem-ci-trigger.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ jobs:
6161
repo: pr.head.repo.full_name
6262
}
6363
- id: generate-token
64-
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 #keep pinned for security reasons, currently 1.8.0
64+
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 #keep pinned for security reasons, currently 1.8.0
6565
with:
6666
app_id: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_ID }}
6767
private_key: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_PRIVATE_KEY }}
68-
repository: "${{ github.repository_owner }}/svelte-ecosystem-ci"
68+
repository: '${{ github.repository_owner }}/svelte-ecosystem-ci'
6969
- uses: actions/github-script@v6
7070
id: trigger
7171
env:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
branches:
6-
- svelte-4
6+
- svelte-5
77

88
permissions: {}
99
jobs:

.gitignore

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
1+
# Dependency directories
2+
node_modules/
3+
4+
# IDE related
15
.idea
2-
.DS_Store
36
.vscode/*
47
!.vscode/launch.json
5-
node_modules
8+
9+
# Test coverage
10+
coverage
11+
*.lcov
12+
13+
# Optional eslint cache
614
.eslintcache
15+
16+
# dotenv environment variables file
17+
.env
18+
.env.test
19+
20+
# build output
21+
dist
22+
.vercel
23+
24+
# OS-specific
25+
.DS_Store
26+
27+
tmp

.prettierignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# NOTE: In general this should be kept in sync with .eslintignore
2+
3+
packages/**/dist/*.js
4+
packages/**/build/*.js
5+
packages/**/npm/**/*
6+
packages/**/config/*.js
7+
packages/svelte/tests/**/*.svelte
8+
packages/svelte/tests/**/_expected*
9+
packages/svelte/tests/**/_actual*
10+
packages/svelte/tests/**/expected*
11+
packages/svelte/tests/**/_output
12+
packages/svelte/tests/**/shards/*.test.js
13+
packages/svelte/tests/hydration/samples/*/_before.html
14+
packages/svelte/tests/hydration/samples/*/_before_head.html
15+
packages/svelte/tests/hydration/samples/*/_after.html
16+
packages/svelte/tests/hydration/samples/*/_after_head.html
17+
packages/svelte/types
18+
packages/svelte/compiler.cjs
19+
playgrounds/demo/src
20+
playgrounds/sandbox/input/**.svelte
21+
playgrounds/sandbox/output
22+
**/*.md
23+
**/node_modules
24+
**/.svelte-kit
25+
flow-typed
26+
.github/CODEOWNERS
27+
.prettierignore
28+
.eslintignore
29+
pnpm-lock.yaml
30+
pnpm-workspace.yaml

.prettierrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@
1818
"tabWidth": 2
1919
}
2020
}
21-
],
22-
"pluginSearchDirs": ["."]
21+
]
2322
}

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"name": "Playground: Server",
1515
"outputCapture": "std",
1616
"program": "start.js",
17-
"cwd": "${workspaceFolder}/packages/playground",
17+
"cwd": "${workspaceFolder}/playgrounds/demo",
1818
"cascadeTerminateToConfigurations": ["Playground: Browser"]
1919
}
2020
],

0 commit comments

Comments
 (0)