eslint-plugin-svelte 3.6.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/main.d.ts CHANGED
@@ -14,7 +14,7 @@ export declare const configs: {
14
14
  export declare const rules: Record<string, Rule.RuleModule>;
15
15
  export declare const meta: {
16
16
  name: "eslint-plugin-svelte";
17
- version: "3.6.0";
17
+ version: "3.7.0";
18
18
  };
19
19
  export declare const processors: {
20
20
  '.svelte': typeof processor;
package/lib/meta.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export declare const name: "eslint-plugin-svelte";
2
- export declare const version: "3.6.0";
2
+ export declare const version: "3.7.0";
package/lib/meta.js CHANGED
@@ -2,4 +2,4 @@
2
2
  // This file has been automatically generated,
3
3
  // in order to update its content execute "pnpm run update"
4
4
  export const name = 'eslint-plugin-svelte';
5
- export const version = '3.6.0';
5
+ export const version = '3.7.0';
@@ -395,6 +395,8 @@ export type ASTNodeListener = {
395
395
  'SvelteShorthandAttribute:exit'?: (node: AST.SvelteShorthandAttribute & ASTNodeWithParent) => void;
396
396
  SvelteSpreadAttribute?: (node: AST.SvelteSpreadAttribute & ASTNodeWithParent) => void;
397
397
  'SvelteSpreadAttribute:exit'?: (node: AST.SvelteSpreadAttribute & ASTNodeWithParent) => void;
398
+ SvelteAttachTag?: (node: AST.SvelteAttachTag & ASTNodeWithParent) => void;
399
+ 'SvelteAttachTag:exit'?: (node: AST.SvelteAttachTag & ASTNodeWithParent) => void;
398
400
  SvelteDirective?: (node: AST.SvelteDirective & ASTNodeWithParent) => void;
399
401
  'SvelteDirective:exit'?: (node: AST.SvelteDirective & ASTNodeWithParent) => void;
400
402
  SvelteStyleDirective?: (node: AST.SvelteStyleDirective & ASTNodeWithParent) => void;
@@ -781,6 +783,8 @@ export type SvelteNodeListener = {
781
783
  'SvelteShorthandAttribute:exit'?: (node: AST.SvelteShorthandAttribute & ASTNodeWithParent) => void;
782
784
  SvelteSpreadAttribute?: (node: AST.SvelteSpreadAttribute & ASTNodeWithParent) => void;
783
785
  'SvelteSpreadAttribute:exit'?: (node: AST.SvelteSpreadAttribute & ASTNodeWithParent) => void;
786
+ SvelteAttachTag?: (node: AST.SvelteAttachTag & ASTNodeWithParent) => void;
787
+ 'SvelteAttachTag:exit'?: (node: AST.SvelteAttachTag & ASTNodeWithParent) => void;
784
788
  SvelteDirective?: (node: AST.SvelteDirective & ASTNodeWithParent) => void;
785
789
  'SvelteDirective:exit'?: (node: AST.SvelteDirective & ASTNodeWithParent) => void;
786
790
  SvelteStyleDirective?: (node: AST.SvelteStyleDirective & ASTNodeWithParent) => void;
@@ -89,13 +89,13 @@ export declare function getMustacheTokens(node: SvAST.SvelteDirective | SvAST.Sv
89
89
  closeToken: SvAST.Token;
90
90
  } | null;
91
91
  /** Get attribute key text */
92
- export declare function getAttributeKeyText(node: SvAST.SvelteAttribute | SvAST.SvelteShorthandAttribute | SvAST.SvelteStyleDirective | SvAST.SvelteDirective | SvAST.SvelteSpecialDirective | SvAST.SvelteGenericsDirective, context: RuleContext): string;
92
+ export declare function getAttributeKeyText(node: SvAST.SvelteAttribute | SvAST.SvelteShorthandAttribute | SvAST.SvelteStyleDirective | SvAST.SvelteDirective | SvAST.SvelteSpecialDirective | SvAST.SvelteGenericsDirective | SvAST.SvelteAttachTag, context: RuleContext): string;
93
93
  /** Get directive name */
94
94
  export declare function getDirectiveName(node: SvAST.SvelteDirective): string;
95
95
  /**
96
96
  * Extract all class names used in a HTML element attribute.
97
97
  */
98
- export declare function findClassesInAttribute(attribute: SvAST.SvelteAttribute | SvAST.SvelteShorthandAttribute | SvAST.SvelteSpreadAttribute | SvAST.SvelteDirective | SvAST.SvelteStyleDirective | SvAST.SvelteSpecialDirective | SvAST.SvelteGenericsDirective): string[];
98
+ export declare function findClassesInAttribute(attribute: SvAST.SvelteAttribute | SvAST.SvelteShorthandAttribute | SvAST.SvelteSpreadAttribute | SvAST.SvelteDirective | SvAST.SvelteStyleDirective | SvAST.SvelteSpecialDirective | SvAST.SvelteGenericsDirective | SvAST.SvelteAttachTag): string[];
99
99
  /**
100
100
  * Returns name of SvelteElement
101
101
  */
@@ -331,6 +331,8 @@ export function getAttributeKeyText(node, context) {
331
331
  const dir = getDirectiveName(node);
332
332
  return `${dir}:${getSimpleNameFromNode(node.key.name, context)}${node.key.modifiers.length ? `|${node.key.modifiers.join('|')}` : ''}`;
333
333
  }
334
+ case 'SvelteAttachTag':
335
+ return '@attach';
334
336
  default:
335
337
  throw new Error(`Unknown node type: ${
336
338
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- error
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-svelte",
3
- "version": "3.6.0",
3
+ "version": "3.7.0",
4
4
  "description": "ESLint plugin for Svelte using AST",
5
5
  "repository": "git+https://github.com/sveltejs/eslint-plugin-svelte.git",
6
6
  "homepage": "https://sveltejs.github.io/eslint-plugin-svelte",
@@ -40,7 +40,7 @@
40
40
  "postcss-load-config": "^3.1.4",
41
41
  "postcss-safe-parser": "^7.0.0",
42
42
  "semver": "^7.6.3",
43
- "svelte-eslint-parser": "^1.1.1"
43
+ "svelte-eslint-parser": "^1.2.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@babel/core": "^7.26.0",
@@ -71,7 +71,7 @@
71
71
  "sass": "^1.81.0",
72
72
  "source-map-js": "^1.2.1",
73
73
  "stylus": "^0.64.0",
74
- "svelte": "^5.2.9",
74
+ "svelte": "^5.30.1",
75
75
  "svelte-i18n": "^4.0.1",
76
76
  "tsx": "^4.19.2",
77
77
  "type-coverage": "^2.29.7",