Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

255
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda