Skip to content

Commit d945acc

Browse files
committed
fix: updates to address eslint / prettier issues
1 parent 8e7ea7f commit d945acc

17 files changed

+34
-89
lines changed

packages/core/src/lib/annotation_exporter.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ const annotations_exporter = function(pl) {
2323
);
2424
} catch (ex) {
2525
logger.debug(
26-
`annotations.js file missing from ${
27-
paths.source.annotations
28-
}. This may be expected if you do not use annotations or are using markdown.`
26+
`annotations.js file missing from ${paths.source.annotations}. This may be expected if you do not use annotations or are using markdown.`
2927
);
3028
return [];
3129
}
@@ -39,9 +37,7 @@ const annotations_exporter = function(pl) {
3937
return oldAnnotationsJSON.comments;
4038
} catch (ex) {
4139
logger.error(
42-
`There was an error parsing JSON for ${
43-
paths.source.annotations
44-
}annotations.js`
40+
`There was an error parsing JSON for ${paths.source.annotations}annotations.js`
4541
);
4642
return [];
4743
}

packages/core/src/lib/buildPatterns.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ module.exports = (deletePatternDir, patternlab, additionalData) => {
141141
}
142142
//render all patterns last, so lineageR works
143143
const allPatternsPromise = patternsToBuild.map(pattern =>
144-
compose(pattern, patternlab)
144+
compose(
145+
pattern,
146+
patternlab
147+
)
145148
);
146149
//copy non-pattern files like JavaScript
147150
const allJS = patternsToBuild.map(pattern => {

packages/core/src/lib/expandPartials.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ module.exports = function(currentPattern, patternlab) {
6060

6161
//this is what we came here for
6262
logger.debug(
63-
`within ${
64-
currentPattern.patternPartial
65-
}, replacing extendedTemplate partial ${foundPartial} with ${
66-
cleanPartialPattern.patternPartial
67-
}'s extendedTemplate`
63+
`within ${currentPattern.patternPartial}, replacing extendedTemplate partial ${foundPartial} with ${cleanPartialPattern.patternPartial}'s extendedTemplate`
6864
);
6965

7066
currentPattern.extendedTemplate = currentPattern.extendedTemplate.replace(

packages/core/src/lib/lineage_hunter.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,7 @@ const lineage_hunter = function() {
131131
? '<<blank>>'
132132
: lineageRPattern.patternState;
133133
logger.info(
134-
`Found a lower common denominator pattern state: ${
135-
pattern.patternState
136-
} on ${
137-
pattern.patternPartial
138-
}. Setting reverse lineage pattern ${
139-
lineageRPattern.patternPartial
140-
} from ${oldState}`
134+
`Found a lower common denominator pattern state: ${pattern.patternState} on ${pattern.patternPartial}. Setting reverse lineage pattern ${lineageRPattern.patternPartial} from ${oldState}`
141135
);
142136

143137
lineageRPattern.patternState = pattern.patternState;

packages/core/src/lib/list_item_hunter.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ const list_item_hunter = function() {
1111
return matches.reduce((previousMatchPromise, liMatchStart) => {
1212
return previousMatchPromise.then(() => {
1313
logger.debug(
14-
`found listItem of size ${liMatchStart} inside ${
15-
pattern.patternPartial
16-
}`
14+
`found listItem of size ${liMatchStart} inside ${pattern.patternPartial}`
1715
);
1816

1917
//we found a listitem match

packages/core/src/lib/loadPattern.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,14 @@ module.exports = function(relPath, patternlab) {
152152

153153
if (listItemsData) {
154154
logger.debug(
155-
`found pattern-specific listitems data for ${
156-
currentPattern.patternPartial
157-
}`
155+
`found pattern-specific listitems data for ${currentPattern.patternPartial}`
158156
);
159157
currentPattern.listitems = listItemsData;
160158
buildListItems(currentPattern);
161159
}
162160
} catch (err) {
163161
logger.warning(
164-
`There was an error parsing sibling listitem JSON for ${
165-
currentPattern.relPath
166-
}`
162+
`There was an error parsing sibling listitem JSON for ${currentPattern.relPath}`
167163
);
168164
logger.warning(err);
169165
}

packages/core/src/lib/loaduikits.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ module.exports = patternlab => {
5353

5454
if (!configEntry) {
5555
logger.warning(
56-
`Could not find uikit with name uikit-${
57-
kit.name
58-
} defined within patternlab-config.json, or it is not enabled.`
56+
`Could not find uikit with name uikit-${kit.name} defined within patternlab-config.json, or it is not enabled.`
5957
);
6058
return;
6159
}

packages/core/src/lib/markModifiedPatterns.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ module.exports = function(lastModified, patternlab) {
2828
array.forEach(func);
2929
}
3030
};
31-
const modifiedOrNot = _.groupBy(
32-
patternlab.patterns,
33-
p =>
34-
changes_hunter.needsRebuild(lastModified, p) ? 'modified' : 'notModified'
31+
const modifiedOrNot = _.groupBy(patternlab.patterns, p =>
32+
changes_hunter.needsRebuild(lastModified, p) ? 'modified' : 'notModified'
3533
);
3634

3735
// For all unmodified patterns load their rendered template output

packages/core/src/lib/object_factory.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ const Pattern = function(relPath, data, patternlab) {
9898
// (rendered!) html file for this pattern, to be shown in the iframe
9999
this.patternLink = this.patternSectionSubtype
100100
? `$${this.name}/index.html`
101-
: patternlab ? this.getPatternLink(patternlab, 'rendered') : null;
101+
: patternlab
102+
? this.getPatternLink(patternlab, 'rendered')
103+
: null;
102104

103105
// The canonical "key" by which this pattern is known. This is the callable
104106
// name of the pattern. UPDATE: this.key is now known as this.patternPartial

packages/core/src/lib/patternlab.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@ module.exports = class PatternLab {
107107
if (typeof patternlab.config.paths.source.patternlabFiles === 'string') {
108108
logger.warning('');
109109
logger.warning(
110-
`Configuration key [paths.source.patternlabFiles] inside patternlab-config.json was found as the string '${
111-
patternlab.config.paths.source.patternlabFiles
112-
}'`
110+
`Configuration key [paths.source.patternlabFiles] inside patternlab-config.json was found as the string '${patternlab.config.paths.source.patternlabFiles}'`
113111
);
114112
logger.warning(
115113
'Since Pattern Lab Node Core 3.0.0 this key is an object. Suggest you update this key following this issue: https://github.com/pattern-lab/patternlab-node/issues/683.'

0 commit comments

Comments
 (0)