@asvetliakov/stylelint-processor-styled-components
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -7,3 +7,5 @@ "use strict"; | ||
let inputId = 1; | ||
let inputId = 1; // Make sure that state for particular path will be cleaned before each run | ||
// module may be kept in memory when used with vscode-stylelint | ||
const interpolationLinesMap = {}; | ||
@@ -48,3 +50,3 @@ const sourceMapsCorrections = {}; | ||
try { | ||
sourceMapsCorrections[absolutePath] = {}; | ||
delete errorWasThrown[absolutePath]; | ||
@@ -57,6 +59,5 @@ const _parse = parse(input, absolutePath, Object.assign({}, DEFAULT_OPTIONS, options)), | ||
interpolationLinesMap[absolutePath] = interpolationLines.concat(interpolationLinesMap[absolutePath] || []); // Save source location, merging existing corrections with current corrections | ||
interpolationLinesMap[absolutePath] = interpolationLines; // Save source location | ||
sourceMapsCorrections[absolutePath] = Object.assign(sourceMapsCorrections[absolutePath], sourceMap); | ||
delete errorWasThrown[absolutePath]; | ||
sourceMapsCorrections[absolutePath] = sourceMap; | ||
return extractedCSS; | ||
@@ -63,0 +64,0 @@ } catch (e) { |
{ | ||
"name": "@asvetliakov/stylelint-processor-styled-components", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "A stylelint processor for styled-components", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -5,2 +5,4 @@ const path = require('path') | ||
let inputId = 1 | ||
// Make sure that state for particular path will be cleaned before each run | ||
// module may be kept in memory when used with vscode-stylelint | ||
const interpolationLinesMap = {} | ||
@@ -41,3 +43,3 @@ const sourceMapsCorrections = {} | ||
try { | ||
sourceMapsCorrections[absolutePath] = {} | ||
delete errorWasThrown[absolutePath] | ||
const { extractedCSS, interpolationLines, sourceMap } = parse( | ||
@@ -49,11 +51,5 @@ input, | ||
// Save dummy interpolation lines | ||
interpolationLinesMap[absolutePath] = interpolationLines.concat( | ||
interpolationLinesMap[absolutePath] || [] | ||
) | ||
// Save source location, merging existing corrections with current corrections | ||
sourceMapsCorrections[absolutePath] = Object.assign( | ||
sourceMapsCorrections[absolutePath], | ||
sourceMap | ||
) | ||
delete errorWasThrown[absolutePath] | ||
interpolationLinesMap[absolutePath] = interpolationLines | ||
// Save source location | ||
sourceMapsCorrections[absolutePath] = sourceMap | ||
return extractedCSS | ||
@@ -60,0 +56,0 @@ } catch (e) { |
132257
3851