eslint-plugin-svelte3
Advanced tools
Comparing version 2.7.1 to 2.7.2
@@ -0,1 +1,5 @@ | ||
# 2.7.2 | ||
- Fix regression when using `linebreak-style` with Windows line endings | ||
# 2.7.1 | ||
@@ -2,0 +6,0 @@ |
11
index.js
@@ -138,4 +138,4 @@ 'use strict'; | ||
translation.dedent = offsets; | ||
const end = get_offsets(block.transformed_code).lines; | ||
for (let i = translation.unoffsets.lines; i <= end; i++) { | ||
translation.end = get_offsets(block.transformed_code).lines; | ||
for (let i = translation.unoffsets.lines; i <= translation.end; i++) { | ||
block.translations.set(i, translation); | ||
@@ -317,6 +317,7 @@ } | ||
// determine whether this message from ESLint is something we care about | ||
const is_valid_message = (block, message, { options }) => { | ||
const is_valid_message = (block, message, translation) => { | ||
switch (message.ruleId) { | ||
case 'eol-last': return false; | ||
case 'indent': return !options.template; | ||
case 'indent': return !translation.options.template; | ||
case 'linebreak-style': return message.line !== translation.end; | ||
case 'no-labels': return get_identifier(get_referenced_string(block, message)) !== '$'; | ||
@@ -326,3 +327,3 @@ case 'no-restricted-syntax': return message.nodeType !== 'LabeledStatement' || get_identifier(get_referenced_string(block, message)) !== '$'; | ||
case 'no-unused-labels': return get_referenced_string(block, message) !== '$'; | ||
case 'quotes': return !options.in_quoted_attribute; | ||
case 'quotes': return !translation.options.in_quoted_attribute; | ||
} | ||
@@ -329,0 +330,0 @@ return true; |
{ | ||
"name": "eslint-plugin-svelte3", | ||
"version": "2.7.1", | ||
"version": "2.7.2", | ||
"description": "An ESLint plugin for Svelte v3 components.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
24554
347