Skip to content

chore(deps): update dependency typescript to ~5.8.0 #1112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"prettier": "^3.4.1",
"prettier-plugin-svelte": "^3.3.2",
"rimraf": "^6.0.1",
"typescript": "~5.7.2",
"typescript": "~5.8.0",
"typescript-eslint": "^8.16.0"
},
"publishConfig": {
Expand Down
8 changes: 4 additions & 4 deletions packages/eslint-plugin-svelte/src/rules/block-lang.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createRule } from '../utils/index.js';
import { findAttribute, getLangValue } from '../utils/ast-utils.js';
import type { SvelteScriptElement, SvelteStyleElement } from 'svelte-eslint-parser/lib/ast';
import type { AST } from 'svelte-eslint-parser';
import type { SuggestionReportDescriptor, SourceCode } from '../types.js';

export default createRule('block-lang', {
Expand Down Expand Up @@ -68,13 +68,13 @@ export default createRule('block-lang', {
const allowedScriptLangs: (string | null)[] = Array.isArray(scriptOption)
? scriptOption
: [scriptOption];
const scriptNodes: SvelteScriptElement[] = [];
const scriptNodes: AST.SvelteScriptElement[] = [];

const styleOption: string | null | (string | null)[] = context.options[0]?.style ?? null;
const allowedStyleLangs: (string | null)[] = Array.isArray(styleOption)
? styleOption
: [styleOption];
const styleNodes: SvelteStyleElement[] = [];
const styleNodes: AST.SvelteStyleElement[] = [];

return {
SvelteScriptElement(node) {
Expand Down Expand Up @@ -153,7 +153,7 @@ function buildAddLangSuggestions(

function buildReplaceLangSuggestions(
langs: (string | null)[],
node: SvelteScriptElement | SvelteStyleElement
node: AST.SvelteScriptElement | AST.SvelteStyleElement
): SuggestionReportDescriptor[] {
const tagName = node.name.name;
const langAttribute = findAttribute(node, 'lang');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type {
Node as SelectorNode,
Tag as SelectorTag
} from 'postcss-selector-parser';
import type { SvelteHTMLElement } from 'svelte-eslint-parser/lib/ast';
import { findClassesInAttribute } from '../utils/ast-utils.js';
import {
extractExpressionPrefixLiteral,
Expand Down Expand Up @@ -286,7 +285,7 @@ function addToArrayMap<T>(
/**
* Finds all nodes in selections that could be matched by key
*/
function matchSelection(selections: Selections, key: string): SvelteHTMLElement[] {
function matchSelection(selections: Selections, key: string): AST.SvelteHTMLElement[] {
const selection = selections.exact.get(key) ?? [];
selections.affixes.forEach((nodes, [prefix, suffix]) => {
if ((prefix === null || key.startsWith(prefix)) && (suffix === null || key.endsWith(suffix))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ReferenceTracker } from '@eslint-community/eslint-utils';
import { findVariable } from '../utils/ast-utils.js';
import { extractExpressionPrefixVariable } from '../utils/expression-affixes.js';
import type { RuleContext } from '../types.js';
import type { SvelteLiteral } from 'svelte-eslint-parser/lib/ast';
import type { AST } from 'svelte-eslint-parser';

export default createRule('no-navigation-without-base', {
meta: {
Expand Down Expand Up @@ -236,7 +236,7 @@ function expressionIsEmpty(url: TSESTree.Expression): boolean {
);
}

function expressionIsAbsolute(url: SvelteLiteral | TSESTree.Expression): boolean {
function expressionIsAbsolute(url: AST.SvelteLiteral | TSESTree.Expression): boolean {
switch (url.type) {
case 'BinaryExpression':
return binaryExpressionIsAbsolute(url);
Expand Down Expand Up @@ -269,7 +269,7 @@ function urlValueIsAbsolute(url: string): boolean {
return url.includes('://');
}

function expressionIsFragment(url: SvelteLiteral | TSESTree.Expression): boolean {
function expressionIsFragment(url: AST.SvelteLiteral | TSESTree.Expression): boolean {
switch (url.type) {
case 'BinaryExpression':
return binaryExpressionIsFragment(url);
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-plugin-svelte/src/utils/expression-affixes.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { TSESTree } from '@typescript-eslint/types';
import { findVariable } from './ast-utils.js';
import type { RuleContext } from '../types.js';
import type { SvelteLiteral } from 'svelte-eslint-parser/lib/ast';
import type { AST } from 'svelte-eslint-parser';

// Variable prefix extraction

Expand Down Expand Up @@ -80,7 +80,7 @@ function extractTemplateLiteralPrefixVariable(

export function extractExpressionPrefixLiteral(
context: RuleContext,
expression: SvelteLiteral | TSESTree.Node
expression: AST.SvelteLiteral | TSESTree.Node
): string | null {
switch (expression.type) {
case 'BinaryExpression':
Expand Down Expand Up @@ -147,7 +147,7 @@ function extractTemplateLiteralPrefixLiteral(

export function extractExpressionSuffixLiteral(
context: RuleContext,
expression: SvelteLiteral | TSESTree.Node
expression: AST.SvelteLiteral | TSESTree.Node
): string | null {
switch (expression.type) {
case 'BinaryExpression':
Expand Down
Loading