Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

251
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!