Skip to content

Commit

Permalink
Fix build error: assert sourceCode.isSpaceBetween is non-null
Browse files Browse the repository at this point in the history
  • Loading branch information
mpsijm committed Dec 21, 2020
1 parent 3a7503b commit 50d5c6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/eslint-plugin/src/rules/object-curly-spacing.ts
Expand Up @@ -169,7 +169,7 @@ export default createRule<Options, MessageIds>({
last: TSESTree.Token,
): void {
if (isTokenOnSameLine(first, second)) {
const firstSpaced = sourceCode.isSpaceBetween(first, second);
const firstSpaced = sourceCode.isSpaceBetween!(first, second);
const secondType = sourceCode.getNodeByRangeIndex(second.range[0])!
.type;

Expand Down Expand Up @@ -209,7 +209,7 @@ export default createRule<Options, MessageIds>({
? !options.spaced
: options.spaced;

const lastSpaced = sourceCode.isSpaceBetween(penultimate, last);
const lastSpaced = sourceCode.isSpaceBetween!(penultimate, last);

if (closingCurlyBraceMustBeSpaced && !lastSpaced) {
reportRequiredEndingSpace(node, last);
Expand Down

0 comments on commit 50d5c6c

Please sign in to comment.