svelte-eslint-parser
Advanced tools
Comparing version 0.41.1 to 0.42.0
export declare const name = "svelte-eslint-parser"; | ||
export declare const version = "0.41.1"; | ||
export declare const version = "0.42.0"; |
@@ -8,2 +8,2 @@ "use strict"; | ||
exports.name = "svelte-eslint-parser"; | ||
exports.version = "0.41.1"; | ||
exports.version = "0.42.0"; |
@@ -143,3 +143,5 @@ "use strict"; | ||
for (const spec of node.specifiers) { | ||
addPropReference(spec.local, moduleScope); | ||
if (spec.local.type !== "Literal") { | ||
addPropReference(spec.local, moduleScope); | ||
} | ||
} | ||
@@ -146,0 +148,0 @@ } |
@@ -169,3 +169,3 @@ "use strict"; | ||
const elementName = ctx.elements.get(element).name; | ||
const componentPropsType = `import('svelte').ComponentProps<${elementName}>`; | ||
const componentPropsType = `import('svelte').ComponentProps<typeof ${elementName}>`; | ||
return conditional({ | ||
@@ -172,0 +172,0 @@ check: `'${attrName}'`, |
@@ -354,8 +354,15 @@ "use strict"; | ||
function convertSnippetBlock(node, parent, ctx) { | ||
var _a; | ||
// {#snippet x(args)}...{/snippet} | ||
const nodeStart = startBlockIndex(ctx.code, node.start, "#snippet"); | ||
const snippetBlock = Object.assign({ type: "SvelteSnippetBlock", id: null, params: [], children: [], parent }, ctx.getConvertLocation({ start: nodeStart, end: node.end })); | ||
const closeParenIndex = ctx.code.indexOf(")", (0, common_1.getWithLoc)(node.parameters.length > 0 | ||
? node.parameters[node.parameters.length - 1] | ||
: node.expression).end); | ||
let beforeClosingParen; | ||
if (node.parameters.length > 0) { | ||
const lastParam = node.parameters[node.parameters.length - 1]; | ||
beforeClosingParen = (_a = lastParam.typeAnnotation) !== null && _a !== void 0 ? _a : lastParam; | ||
} | ||
else { | ||
beforeClosingParen = node.expression; | ||
} | ||
const closeParenIndex = ctx.code.indexOf(")", (0, common_1.getWithLoc)(beforeClosingParen).end); | ||
const scopeKind = parent.type === "Program" | ||
@@ -362,0 +369,0 @@ ? "snippet" |
{ | ||
"name": "svelte-eslint-parser", | ||
"version": "0.41.1", | ||
"version": "0.42.0", | ||
"description": "Svelte parser for ESLint", | ||
@@ -45,13 +45,13 @@ "repository": "git+https://github.com/sveltejs/svelte-eslint-parser.git", | ||
"@changesets/changelog-github": "^0.5.0", | ||
"@changesets/cli": "^2.27.8", | ||
"@changesets/cli": "^2.27.9", | ||
"@changesets/get-release-plan": "^4.0.4", | ||
"@ota-meshi/eslint-plugin": "^0.15.3", | ||
"@types/benchmark": "^2.1.5", | ||
"@types/chai": "^4.3.19", | ||
"@types/chai": "^4.3.20", | ||
"@types/eslint": "^9.6.1", | ||
"@types/eslint-scope": "^3.7.7", | ||
"@types/eslint-visitor-keys": "^3.3.0", | ||
"@types/estree": "^1.0.5", | ||
"@types/mocha": "^10.0.8", | ||
"@types/node": "^20.16.5", | ||
"@types/estree": "^1.0.6", | ||
"@types/mocha": "^10.0.9", | ||
"@types/node": "^20.16.11", | ||
"@types/semver": "^7.5.8", | ||
@@ -64,29 +64,29 @@ "@typescript-eslint/eslint-plugin": "^7.18.0", | ||
"env-cmd": "^10.1.0", | ||
"esbuild": "^0.23.1", | ||
"esbuild": "^0.24.0", | ||
"esbuild-register": "^3.6.0", | ||
"eslint": "^8.57.0", | ||
"eslint": "^8.57.1", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-eslint-comments": "^3.2.0", | ||
"eslint-plugin-json-schema-validator": "^5.1.2", | ||
"eslint-plugin-json-schema-validator": "^5.1.3", | ||
"eslint-plugin-jsonc": "^2.16.0", | ||
"eslint-plugin-n": "^17.10.2", | ||
"eslint-plugin-n": "^17.11.1", | ||
"eslint-plugin-node-dependencies": "^0.12.0", | ||
"eslint-plugin-prettier": "^5.2.1", | ||
"eslint-plugin-regexp": "^2.6.0", | ||
"eslint-plugin-svelte": "^2.43.0", | ||
"eslint-plugin-svelte": "^2.44.1", | ||
"eslint-plugin-yml": "^1.14.0", | ||
"estree-walker": "^3.0.3", | ||
"locate-character": "^3.0.0", | ||
"magic-string": "^0.30.11", | ||
"magic-string": "^0.30.12", | ||
"mocha": "^10.7.3", | ||
"mocha-chai-jest-snapshot": "^1.1.6", | ||
"nyc": "^17.0.0", | ||
"nyc": "^17.1.0", | ||
"prettier": "~3.3.3", | ||
"prettier-plugin-pkg": "^0.18.1", | ||
"prettier-plugin-svelte": "^3.2.6", | ||
"prettier-plugin-svelte": "^3.2.7", | ||
"rimraf": "^6.0.1", | ||
"semver": "^7.6.3", | ||
"svelte": "^5.0.0-next.245", | ||
"svelte2tsx": "^0.7.19", | ||
"typescript": "~5.6.2", | ||
"svelte": "^5.0.0-next.264", | ||
"svelte2tsx": "^0.7.22", | ||
"typescript": "~5.6.3", | ||
"typescript-eslint-parser-for-extra-files": "^0.7.0" | ||
@@ -93,0 +93,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
346192
8277