Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

252
Vistas
How should my code be lined up to prevent the linter arguments error?

I have this render() in my React application:

render() {
  return (
    this.props.docs.map(doc => {
        const {collectionTitle} = this.props;  
        const dateFormatted = moment(docRow.docDate, 'DDMMYYYY').format('Do MMMM YYYY');      
        if (doc.name === 'Cert' && !this.consentGiven(this.props.policy, doc=.url)) {
            return (
                  <tr key={doc.url} className="document-row-disabled document-disabled">
                    <td className="document-cell document-cell--name">{doc.name}</td>
                    <td className="document-cell document-cell--data">
                      <span>{dateFormatted}</span>
                      <span className="PDF-text">PDF</span>
                    </td>
                  </tr>
            );
        } else {
            return (
                  <tr key={doc.url} className="document-row" onClick={this.onClickOfDoc(collectionTitle, doc)}>
                    <td className="document-cell document-cell--name">{doc.name}</td>
                    <td className="document-cell document-cell--data">
                      <span>{dateFormatted}</span>
                      <span className="PDF-text">PDF</span>
                    </td>
                  </tr>
            );
        }
    }, <tr>{this.renderButton()}</tr>)
  );
}

Running the app gives me this error:

(145,7): arguments are not aligned

The line in question is }, <tr>{this.renderButton()}</tr>)

In my tslint.json I have this rule:


"align": [
  true,
  "parameters",
  "arguments",
  "statements"
],

What way should my code line up?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda