code: function validateCurlyBeforeKeyword(curlyToken) {
           const keywordToken = sourceCode.getTokenAfter(curlyToken);
  
           if (style === '1tbs' && !astUtils.isTokenOnSameLine(curlyToken, keywordToken)) {
              context.report({
                 node: curlyToken,
                 messageId: 'nextLineClose',
                 fix: removeNewlineBetween(curlyToken, keywordToken),
              });
           }
  
           if (style !== '1tbs' && astUtils.isTokenOnSameLine(curlyToken, keywordToken)) {
              context.report({
                 node: curlyToken,
                 messageId: 'sameLineClose',
                 fix: (fixer) => fixer.insertTextAfter(curlyToken, '\n'),
              });
           }
        }
docs: Validates the location of a token that appears before a keyword (e.g. a newline
  before `else`)
  @param {Token} curlyToken The closing curly token. This is assumed to precede a
  keyword token (such as `else` or `finally`).
  @returns {void}