From 9b53e2b782accac7c4b13cbaef163665433aaa40 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 4 Dec 2022 00:10:54 +0000 Subject: [PATCH] chore: release eslint-plugin-svelte --- .changeset/kind-boats-clean.md | 5 ----- .changeset/little-points-poke.md | 5 ----- .changeset/pink-zoos-wonder.md | 5 ----- CHANGELOG.md | 10 ++++++++++ docs/rules/no-dupe-on-directives.md | 7 +++++-- docs/rules/no-dupe-use-directives.md | 7 +++++-- package.json | 4 ++-- src/types-for-node.ts | 18 ++++++++++++++++++ typings/estree/index.d.ts | 1 + 9 files changed, 41 insertions(+), 21 deletions(-) delete mode 100644 .changeset/kind-boats-clean.md delete mode 100644 .changeset/little-points-poke.md delete mode 100644 .changeset/pink-zoos-wonder.md diff --git a/.changeset/kind-boats-clean.md b/.changeset/kind-boats-clean.md deleted file mode 100644 index 0699df1ec..000000000 --- a/.changeset/kind-boats-clean.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"eslint-plugin-svelte": minor ---- - -feat: improve `svelte/indent` rule to support more ts syntax diff --git a/.changeset/little-points-poke.md b/.changeset/little-points-poke.md deleted file mode 100644 index 803d2f66c..000000000 --- a/.changeset/little-points-poke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"eslint-plugin-svelte": minor ---- - -feat: add `svelte/no-dupe-use-directives` rule diff --git a/.changeset/pink-zoos-wonder.md b/.changeset/pink-zoos-wonder.md deleted file mode 100644 index 696d6ebd3..000000000 --- a/.changeset/pink-zoos-wonder.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"eslint-plugin-svelte": minor ---- - -feat: add `svelte/no-dupe-on-directives` rule diff --git a/CHANGELOG.md b/CHANGELOG.md index d8ff97b14..27f8fff67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # eslint-plugin-svelte +## 2.14.0 + +### Minor Changes + +- [#310](https://github.com/ota-meshi/eslint-plugin-svelte/pull/310) [`6d392c4`](https://github.com/ota-meshi/eslint-plugin-svelte/commit/6d392c4ac1d94e6f296858da99454198774c6bec) Thanks [@ota-meshi](https://github.com/ota-meshi)! - feat: improve `svelte/indent` rule to support more ts syntax + +- [#308](https://github.com/ota-meshi/eslint-plugin-svelte/pull/308) [`a9c4912`](https://github.com/ota-meshi/eslint-plugin-svelte/commit/a9c4912b9d23fe7557786445fa8180a7b35bda21) Thanks [@ota-meshi](https://github.com/ota-meshi)! - feat: add `svelte/no-dupe-use-directives` rule + +- [#308](https://github.com/ota-meshi/eslint-plugin-svelte/pull/308) [`a9c4912`](https://github.com/ota-meshi/eslint-plugin-svelte/commit/a9c4912b9d23fe7557786445fa8180a7b35bda21) Thanks [@ota-meshi](https://github.com/ota-meshi)! - feat: add `svelte/no-dupe-on-directives` rule + ## 2.13.1 ### Patch Changes diff --git a/docs/rules/no-dupe-on-directives.md b/docs/rules/no-dupe-on-directives.md index a8022ac0e..52341411e 100644 --- a/docs/rules/no-dupe-on-directives.md +++ b/docs/rules/no-dupe-on-directives.md @@ -3,14 +3,13 @@ pageClass: "rule-details" sidebarDepth: 0 title: "svelte/no-dupe-on-directives" description: "disallow duplicate `on:` directives" +since: "v2.14.0" --- # svelte/no-dupe-on-directives > disallow duplicate `on:` directives -- :exclamation: **_This rule has not been released yet._** - ## :book: Rule Details We can define any number of `on:` directive with the same event name, but duplicate directives with the exact same event name and expression are probably a mistake. @@ -47,6 +46,10 @@ This rule reports reports `on:` directives with exactly the same event name and Nothing. +## :rocket: Version + +This rule was introduced in eslint-plugin-svelte v2.14.0 + ## :mag: Implementation - [Rule source](https://github.com/ota-meshi/eslint-plugin-svelte/blob/main/src/rules/no-dupe-on-directives.ts) diff --git a/docs/rules/no-dupe-use-directives.md b/docs/rules/no-dupe-use-directives.md index b4b476155..a03f7f2a8 100644 --- a/docs/rules/no-dupe-use-directives.md +++ b/docs/rules/no-dupe-use-directives.md @@ -3,14 +3,13 @@ pageClass: "rule-details" sidebarDepth: 0 title: "svelte/no-dupe-use-directives" description: "disallow duplicate `use:` directives" +since: "v2.14.0" --- # svelte/no-dupe-use-directives > disallow duplicate `use:` directives -- :exclamation: **_This rule has not been released yet._** - ## :book: Rule Details We can define any number of `use:` directive with the same action, but duplicate directives with the exact same action and expression are probably a mistake. @@ -40,6 +39,10 @@ This rule reports reports `use:` directives with exactly the same action and exp Nothing. +## :rocket: Version + +This rule was introduced in eslint-plugin-svelte v2.14.0 + ## :mag: Implementation - [Rule source](https://github.com/ota-meshi/eslint-plugin-svelte/blob/main/src/rules/no-dupe-use-directives.ts) diff --git a/package.json b/package.json index 96d939e56..33d2bb03e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-svelte", - "version": "2.13.1", + "version": "2.14.0", "description": "ESLint plugin for Svelte using AST", "repository": "git+https://github.com/ota-meshi/eslint-plugin-svelte.git", "homepage": "https://ota-meshi.github.io/eslint-plugin-svelte", @@ -174,7 +174,7 @@ "access": "public" }, "typeCoverage": { - "atLeast": 99.04, + "atLeast": 99.05, "cache": true, "detail": true, "ignoreAsAssertion": true, diff --git a/src/types-for-node.ts b/src/types-for-node.ts index 3f7fa335a..1b1eebb3a 100644 --- a/src/types-for-node.ts +++ b/src/types-for-node.ts @@ -14,6 +14,9 @@ export type ASTNodeWithParent = | AST.SvelteProgram export type ASTNodeListener = { + AccessorProperty?: ( + node: TSESTree.AccessorProperty & ASTNodeWithParent, + ) => void ArrayExpression?: (node: TSESTree.ArrayExpression & ASTNodeWithParent) => void ArrayPattern?: (node: TSESTree.ArrayPattern & ASTNodeWithParent) => void ArrowFunctionExpression?: ( @@ -181,6 +184,9 @@ export type ASTNodeListener = { WhileStatement?: (node: TSESTree.WhileStatement & ASTNodeWithParent) => void WithStatement?: (node: TSESTree.WithStatement & ASTNodeWithParent) => void YieldExpression?: (node: TSESTree.YieldExpression & ASTNodeWithParent) => void + TSAbstractAccessorProperty?: ( + node: TSESTree.TSAbstractAccessorProperty & ASTNodeWithParent, + ) => void TSAbstractKeyword?: ( node: TSESTree.TSAbstractKeyword & ASTNodeWithParent, ) => void @@ -304,6 +310,9 @@ export type ASTNodeListener = { node: TSESTree.TSReadonlyKeyword & ASTNodeWithParent, ) => void TSRestType?: (node: TSESTree.TSRestType & ASTNodeWithParent) => void + TSSatisfiesExpression?: ( + node: TSESTree.TSSatisfiesExpression & ASTNodeWithParent, + ) => void TSStaticKeyword?: (node: TSESTree.TSStaticKeyword & ASTNodeWithParent) => void TSStringKeyword?: (node: TSESTree.TSStringKeyword & ASTNodeWithParent) => void TSSymbolKeyword?: (node: TSESTree.TSSymbolKeyword & ASTNodeWithParent) => void @@ -399,6 +408,9 @@ export type ASTNodeListener = { } export type ESNodeListener = { + AccessorProperty?: ( + node: TSESTree.AccessorProperty & ASTNodeWithParent, + ) => void ArrayExpression?: (node: TSESTree.ArrayExpression & ASTNodeWithParent) => void ArrayPattern?: (node: TSESTree.ArrayPattern & ASTNodeWithParent) => void ArrowFunctionExpression?: ( @@ -540,6 +552,9 @@ export type TSNodeListener = { Decorator?: (node: TSESTree.Decorator & ASTNodeWithParent) => void ImportAttribute?: (node: TSESTree.ImportAttribute & ASTNodeWithParent) => void StaticBlock?: (node: TSESTree.StaticBlock & ASTNodeWithParent) => void + TSAbstractAccessorProperty?: ( + node: TSESTree.TSAbstractAccessorProperty & ASTNodeWithParent, + ) => void TSAbstractKeyword?: ( node: TSESTree.TSAbstractKeyword & ASTNodeWithParent, ) => void @@ -663,6 +678,9 @@ export type TSNodeListener = { node: TSESTree.TSReadonlyKeyword & ASTNodeWithParent, ) => void TSRestType?: (node: TSESTree.TSRestType & ASTNodeWithParent) => void + TSSatisfiesExpression?: ( + node: TSESTree.TSSatisfiesExpression & ASTNodeWithParent, + ) => void TSStaticKeyword?: (node: TSESTree.TSStaticKeyword & ASTNodeWithParent) => void TSStringKeyword?: (node: TSESTree.TSStringKeyword & ASTNodeWithParent) => void TSSymbolKeyword?: (node: TSESTree.TSSymbolKeyword & ASTNodeWithParent) => void diff --git a/typings/estree/index.d.ts b/typings/estree/index.d.ts index 298a9c345..56df768b7 100644 --- a/typings/estree/index.d.ts +++ b/typings/estree/index.d.ts @@ -8,6 +8,7 @@ export type Node = TSESTree.Node export type Expression = TSESTree.Expression export type Statement = TSESTree.Statement export type Pattern = TSESTree.Pattern +export type AccessorProperty = TSESTree.AccessorProperty export type ArrayExpression = TSESTree.ArrayExpression export type ArrayPattern = TSESTree.ArrayPattern export type ArrowFunctionExpression = TSESTree.ArrowFunctionExpression