packages/eslint-plugin-internal/decorator-line-break.js
function checkDecorator(decorator, value, node) {
      const decoratorLine = decorator.loc.start.line;
      const decoratorColumn = decorator.loc.end.column;
      const valueLine = value.loc.start.line;

      if (config === 'always') {
        if (decoratorLine === valueLine) {
          context.report({
            node,
            loc: { line: decoratorLine, column: decoratorColumn },
            message: ALWAYS_MESSAGE,
          });
        }
      } else {
        if (decoratorLine !== valueLine) { // eslint-disable-line
          context.report({
            node,
            loc: { line: decoratorLine, column: decoratorColumn },
            message: NEVER_MESSAGE,
          });
        }
      }
    }
function checkDecorator(decorator, value, node) {
      const decoratorLine = decorator.loc.start.line;
      const decoratorColumn = decorator.loc.end.column;
      const valueLine = value.loc.start.line;

      if (config === 'always') {
        if (decoratorLine === valueLine) {
          context.report({
            node,
            loc: { line: decoratorLine, column: decoratorColumn },
            message: ALWAYS_MESSAGE,
          });
        }
      } else {
        if (decoratorLine !== valueLine) { // eslint-disable-line
          context.report({
            node,
            loc: { line: decoratorLine, column: decoratorColumn },
            message: NEVER_MESSAGE,
          });
        }
      }
    }
function checkDecorator ( decorator , value , node ) { const decoratorLine = decorator . loc . start . line ; const decoratorColumn = decorator . loc . end . column ; const valueLine = value . loc . start . line ; if ( config === 'always' ) { if ( decoratorLine === valueLine ) { context . report ( { node , loc : { line : decoratorLine , column : decoratorColumn } , message : ALWAYS_MESSAGE , } ) ; } } else { if ( decoratorLine !== valueLine ) { // eslint-disable-line context . report ( { node , loc : { line : decoratorLine , column : decoratorColumn } , message : NEVER_MESSAGE , } ) ; } } }
Checks the given decorator node to check if a line break is needed.
@param {ASTNode} The decorator statement.
@param {ASTNode} The value statement.
@param {ASTNode} node The AST node of a BlockStatement.
@returns {void} undefined.
Checks the given decorator node to check if a line break is needed .