svelte-eslint-parser
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -396,9 +396,13 @@ "use strict"; | ||
if (!extracted.has(node)) { | ||
(_a = EXTRACT_TOKENS[node.type]) === null || _a === void 0 ? void 0 : _a.call(EXTRACT_TOKENS, node, ctx, parent); | ||
for (const comment of [ | ||
...(node.leadingComments || []), | ||
...(node.innerComments || []), | ||
...(node.trailingComments || []), | ||
]) { | ||
ctx.addComment(Object.assign({ type: comment.type, value: comment.value }, ctx.getConvertLocation(getWithLoc(comment)))); | ||
const key = `${node.type}@[${getWithLoc(node).start},${getWithLoc(node).end}]`; | ||
if (!extracted.has(key)) { | ||
(_a = EXTRACT_TOKENS[node.type]) === null || _a === void 0 ? void 0 : _a.call(EXTRACT_TOKENS, node, ctx, parent); | ||
for (const comment of [ | ||
...(node.leadingComments || []), | ||
...(node.innerComments || []), | ||
...(node.trailingComments || []), | ||
]) { | ||
ctx.addComment(Object.assign({ type: comment.type, value: comment.value }, ctx.getConvertLocation(getWithLoc(comment)))); | ||
} | ||
extracted.add(key); | ||
} | ||
@@ -405,0 +409,0 @@ extracted.add(node); |
{ | ||
"name": "svelte-eslint-parser", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Svelte parser for ESLint", | ||
@@ -47,3 +47,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@ota-meshi/eslint-plugin": "^0.6.0", | ||
"@ota-meshi/eslint-plugin": "^0.7.0", | ||
"@types/eslint": "^7.2.0", | ||
@@ -50,0 +50,0 @@ "@types/eslint-scope": "^3.7.0", |
@@ -24,9 +24,9 @@ # svelte-eslint-parser | ||
The [`svelte-eslint-parser`] aims to make it easy to create your own rules for the [Svelte] by allowing the template AST to be used in the rules. | ||
The [svelte-eslint-parser] aims to make it easy to create your own rules for the [Svelte] by allowing the template AST to be used in the rules. | ||
## ❗ Attention | ||
The [`svelte-eslint-parser`] can not be used with the [eslint-plugin-svelte3]. | ||
The [svelte-eslint-parser] can not be used with the [eslint-plugin-svelte3]. | ||
[`svelte-eslint-parser`]: https://www.npmjs.com/package/svelte-eslint-parser | ||
[svelte-eslint-parser]: https://www.npmjs.com/package/svelte-eslint-parser | ||
@@ -33,0 +33,0 @@ ## 💿 Installation |
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
119969
2901