Skip to content

Commit 73479f9

Browse files
chore(deps): update dependency eslint-plugin-svelte to v3 (#678)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: yosuke ota <otameshiyo23@gmail.com>
1 parent 0df76be commit 73479f9

File tree

5 files changed

+82
-78
lines changed

5 files changed

+82
-78
lines changed

explorer-v2/src/lib/AstExplorer.svelte

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,20 @@
2929
);
3030
3131
let tsParser = undefined;
32+
function setTSParser(parser) {
33+
if (typeof window !== 'undefined') {
34+
if (!window.process) {
35+
window.process = {
36+
cwd: () => '',
37+
env: {}
38+
};
39+
}
40+
}
41+
tsParser = parser;
42+
}
3243
$: {
3344
if (hasLangTs && !tsParser) {
34-
import('@typescript-eslint/parser').then((parser) => {
35-
if (typeof window !== 'undefined') {
36-
if (!window.process) {
37-
window.process = {
38-
cwd: () => '',
39-
env: {}
40-
};
41-
}
42-
}
43-
tsParser = parser;
44-
});
45+
import('@typescript-eslint/parser').then(setTSParser);
4546
}
4647
}
4748

explorer-v2/src/lib/ESLintPlayground.svelte

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,20 @@
3434
3535
$: hasLangTs = /lang\s*=\s*(?:"ts"|ts|'ts'|"typescript"|typescript|'typescript')/u.test(code);
3636
let tsParser = undefined;
37+
function setTSParser(parser) {
38+
if (typeof window !== 'undefined') {
39+
if (!window.process) {
40+
window.process = {
41+
cwd: () => '',
42+
env: {}
43+
};
44+
}
45+
}
46+
tsParser = parser;
47+
}
3748
$: {
3849
if (hasLangTs && !tsParser) {
39-
import('@typescript-eslint/parser').then((parser) => {
40-
if (typeof window !== 'undefined') {
41-
if (!window.process) {
42-
window.process = {
43-
cwd: () => '',
44-
env: {}
45-
};
46-
}
47-
}
48-
tsParser = parser;
49-
});
50+
import('@typescript-eslint/parser').then(setTSParser);
5051
}
5152
}
5253

explorer-v2/src/lib/MonacoEditor.svelte

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,7 @@
5454
$: {
5555
disposeCodeActionProvider();
5656
if (provideCodeActions) {
57-
loadingMonaco.then((monaco) => {
58-
codeActionProviderDisposable = monaco.languages.registerCodeActionProvider(language, {
59-
provideCodeActions(model, range, context) {
60-
const editor = getLeftEditor?.();
61-
if (editor?.getModel().url !== model.url) {
62-
return {
63-
actions: [],
64-
dispose() {
65-
/* nop */
66-
}
67-
};
68-
}
69-
return provideCodeActions(model, range, context);
70-
}
71-
});
72-
});
57+
loadingMonaco.then((monaco) => setupCodeActionProvider(monaco, provideCodeActions));
7358
}
7459
}
7560
@@ -216,6 +201,22 @@
216201
}
217202
}
218203
204+
function setupCodeActionProvider(monaco, provideCodeActions) {
205+
codeActionProviderDisposable = monaco.languages.registerCodeActionProvider(language, {
206+
provideCodeActions(model, range, context) {
207+
const editor = getLeftEditor?.();
208+
if (editor?.getModel().url !== model.url) {
209+
return {
210+
actions: [],
211+
dispose() {
212+
/* nop */
213+
}
214+
};
215+
}
216+
return provideCodeActions(model, range, context);
217+
}
218+
});
219+
}
219220
function disposeCodeActionProvider() {
220221
if (codeActionProviderDisposable) {
221222
codeActionProviderDisposable.dispose();

explorer-v2/src/lib/ScopeExplorer.svelte

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,20 @@
2828
svelteValue
2929
);
3030
let tsParser = undefined;
31+
function setTSParser(parser) {
32+
if (typeof window !== 'undefined') {
33+
if (!window.process) {
34+
window.process = {
35+
cwd: () => '',
36+
env: {}
37+
};
38+
}
39+
}
40+
tsParser = parser;
41+
}
3142
$: {
3243
if (hasLangTs && !tsParser) {
33-
import('@typescript-eslint/parser').then((parser) => {
34-
if (typeof window !== 'undefined') {
35-
if (!window.process) {
36-
window.process = {
37-
cwd: () => '',
38-
env: {}
39-
};
40-
}
41-
}
42-
tsParser = parser;
43-
});
44+
import('@typescript-eslint/parser').then(setTSParser);
4445
}
4546
}
4647
$: {

package.json

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -63,54 +63,54 @@
6363
"postcss-selector-parser": "^7.0.0"
6464
},
6565
"devDependencies": {
66-
"@changesets/changelog-github": "^0.5.0",
67-
"@changesets/cli": "^2.27.10",
68-
"@changesets/get-release-plan": "^4.0.5",
66+
"@changesets/changelog-github": "^0.5.1",
67+
"@changesets/cli": "^2.28.1",
68+
"@changesets/get-release-plan": "^4.0.8",
6969
"@ota-meshi/eslint-plugin": "^0.17.6",
7070
"@ota-meshi/test-snapshot": "^1.1.0",
7171
"@types/benchmark": "^2.1.5",
72-
"@types/chai": "^5.0.0",
72+
"@types/chai": "^5.2.1",
7373
"@types/eslint": "^9.6.1",
7474
"@types/eslint-scope": "^3.7.7",
7575
"@types/eslint-visitor-keys": "^3.3.2",
76-
"@types/estree": "^1.0.6",
76+
"@types/estree": "^1.0.7",
7777
"@types/mocha": "^10.0.10",
78-
"@types/node": "^22.10.1",
79-
"@types/semver": "^7.5.8",
80-
"@typescript-eslint/eslint-plugin": "^8.16.0",
78+
"@types/node": "^22.13.13",
79+
"@types/semver": "^7.7.0",
80+
"@typescript-eslint/eslint-plugin": "^8.28.0",
8181
"@typescript-eslint/parser": "~8.28.0",
8282
"@typescript-eslint/types": "~8.28.0",
8383
"benchmark": "^2.1.4",
84-
"c8": "^10.1.2",
85-
"chai": "^5.0.0",
84+
"c8": "^10.1.3",
85+
"chai": "^5.2.0",
8686
"env-cmd": "^10.1.0",
87-
"esbuild": "^0.25.0",
87+
"esbuild": "^0.25.1",
8888
"eslint": "~9.23.0",
89-
"eslint-config-prettier": "^10.0.0",
89+
"eslint-config-prettier": "^10.1.1",
9090
"eslint-plugin-eslint-comments": "^3.2.0",
91-
"eslint-plugin-jsdoc": "^50.6.0",
92-
"eslint-plugin-json-schema-validator": "^5.2.0",
93-
"eslint-plugin-jsonc": "^2.18.2",
94-
"eslint-plugin-n": "^17.14.0",
91+
"eslint-plugin-jsdoc": "^50.6.9",
92+
"eslint-plugin-json-schema-validator": "^5.3.1",
93+
"eslint-plugin-jsonc": "^2.20.0",
94+
"eslint-plugin-n": "^17.17.0",
9595
"eslint-plugin-node-dependencies": "^0.12.0",
96-
"eslint-plugin-prettier": "^5.2.1",
96+
"eslint-plugin-prettier": "^5.2.5",
9797
"eslint-plugin-regexp": "^2.7.0",
98-
"eslint-plugin-svelte": "^2.46.1",
99-
"eslint-plugin-yml": "^1.16.0",
98+
"eslint-plugin-svelte": "^3.3.3",
99+
"eslint-plugin-yml": "^1.17.0",
100100
"globals": "^16.0.0",
101101
"locate-character": "^3.0.0",
102-
"magic-string": "^0.30.14",
103-
"mocha": "^11.0.0",
104-
"prettier": "~3.5.0",
102+
"magic-string": "^0.30.17",
103+
"mocha": "^11.1.0",
104+
"prettier": "~3.5.3",
105105
"prettier-plugin-pkg": "^0.18.1",
106-
"prettier-plugin-svelte": "^3.3.2",
106+
"prettier-plugin-svelte": "^3.3.3",
107107
"rimraf": "^6.0.1",
108-
"semver": "^7.6.3",
109-
"svelte": "^5.9.0",
110-
"svelte2tsx": "^0.7.28",
111-
"tsx": "^4.19.2",
112-
"typescript": "~5.8.0",
113-
"typescript-eslint": "^8.16.0",
108+
"semver": "^7.7.1",
109+
"svelte": "^5.25.3",
110+
"svelte2tsx": "^0.7.35",
111+
"tsx": "^4.19.3",
112+
"typescript": "~5.8.2",
113+
"typescript-eslint": "^8.28.0",
114114
"typescript-eslint-parser-for-extra-files": "^0.7.0"
115115
},
116116
"publishConfig": {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy