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

206
Vistas
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
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