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

210
Views
Eslint rules block conflicts with extended config, and linting is not happy either way

The relevant part of my package.json:

  "eslintConfig": {
    "root": true,
    "extends": [
      "eslint:recommended",
      "airbnb",
      "airbnb-typescript"
    ],
    "parserOptions": {
      "project": "tsconfig.json"
    },
    "rules": {
      "indent": [
        "error",
        4
      ],
      "react/jsx-indent": [
        "error",
        4
      ],
      "react/tsx-indent": [
        "error",
        4
      ],
      "react/jsx-filename-extension": [
        1,
        {
          "extensions": [
            ".js",
            ".jsx",
            ".ts",
            ".tsx"
          ]
        }
      ]
    }
  }

The airbnb ruleset specifies an indent of two spaces, my rules specify four spaces. Running --fix does nothing to indentation, and when I look at linting errors, if a line is indented by 4 spaces, it complains that it should be indented by 2, and vice versa: if a line is indented by 2 spaces, it complains that it should be indented by 4.

To me, this suggests that the 'rules' block is conflicting with the 'extends' block, but my understanding is that the rules should override the 'extends' block.

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!