You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2019/05/23 18:26:03 UTC
[incubator-annotator] 01/05: Turn on trailing commas everywhere
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit d2d0913bc7de4631f3f6fc8c0514b07bc1e4ffc2
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Thu May 23 12:17:31 2019 -0400
Turn on trailing commas everywhere
---
.eslintrc.js | 2 +-
packages/dom/src/text/quote.js | 8 ++++----
packages/range/src/cartesian.js | 6 +++---
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index 8baadfb..414bb5c 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -32,7 +32,7 @@ module.exports = {
'error',
{
singleQuote: true,
- trailingComma: 'es5',
+ trailingComma: 'all',
},
],
},
diff --git a/packages/dom/src/text/quote.js b/packages/dom/src/text/quote.js
index 56dec3b..ac13d71 100644
--- a/packages/dom/src/text/quote.js
+++ b/packages/dom/src/text/quote.js
@@ -60,12 +60,12 @@ export async function describeTextQuoteByRange({ range, context }) {
const matchEndIndex = match.index + match[0].length;
const suffixOverlap = overlap(
contextText.substring(matchEndIndex),
- contextText.substring(rangeEndIndex)
+ contextText.substring(rangeEndIndex),
);
minSuffixes.push(suffixOverlap + 1);
const prefixOverlap = overlapRight(
contextText.substring(0, match.index),
- contextText.substring(0, rangeIndex)
+ contextText.substring(0, rangeIndex),
);
minPrefixes.push(prefixOverlap + 1);
}
@@ -74,13 +74,13 @@ export async function describeTextQuoteByRange({ range, context }) {
if (minSuffix > 0) {
descriptor.suffix = contextText.substring(
rangeEndIndex,
- rangeEndIndex + minSuffix
+ rangeEndIndex + minSuffix,
);
}
if (minPrefix > 0) {
descriptor.prefix = contextText.substring(
rangeIndex - minPrefix,
- rangeIndex
+ rangeIndex,
);
}
return descriptor;
diff --git a/packages/range/src/cartesian.js b/packages/range/src/cartesian.js
index 3d15b19..8aa3727 100644
--- a/packages/range/src/cartesian.js
+++ b/packages/range/src/cartesian.js
@@ -32,15 +32,15 @@ export async function* product(...iterables) {
.then(
// Label the result with iterableNr, to know which iterable produced
// this value after Promise.race below.
- ({ value, done }) => ({ value, done, iterableNr })
- )
+ ({ value, done }) => ({ value, done, iterableNr }),
+ ),
);
// Keep listening as long as any of the iterables is not yet exhausted.
while (nextValuePromises.some(p => p !== null)) {
// Wait until any of the active iterators has produced a new value.
const { value, done, iterableNr } = await Promise.race(
- nextValuePromises.filter(p => p !== null)
+ nextValuePromises.filter(p => p !== null),
);
// If this iterable was exhausted, stop listening to it and move on.