Razzle: ¿Deshabilitar tslint con el complemento TypeScript?

Creado en 24 feb. 2019  ·  4Comentarios  ·  Fuente: jaredpalmer/razzle

Me gustaría deshabilitar tslint (a favor de usar eslint). Sin embargo, al deshabilitarlo en mi razzle.config.js , aparece el siguiente error:

Cannot find "${PATH}/tslint.json" file. Please check webpack and ForkTsCheckerWebpackPlugin configuration.

Mi razzle.config.js es el siguiente:

module.exports = {
  plugins: [
    {
      name: "typescript",
      useBabel: true,
      useEslint: true,
      forkTsChecker: {
        tsconfig: "./tsconfig.json",
        tslint: false,
        watch: "./src",
        typeCheck: true,
      },
    },
  ],
};

Comentario más útil

@ adaam2 Aquí está la parte relevante de mi configuración:

module.exports = {
  plugins: [
    {
      name: "typescript",
      options: {
        useBabel: true,
        useEslint: true,
        forkTsChecker: {
          tsconfig: "./tsconfig.json",
          tslint: undefined,
          watch: "./src",
          typeCheck: true,
        },
      },
    },
  ]
};

Tenga en cuenta que inicialmente me faltaba la clave options .

Todos 4 comentarios

Mi mal - mi configuración fue formateada incorrectamente.

@Jayphen ¿Podría detallar una configuración de trabajo final aquí para que tslint ya no sea necesario como dep?

@ adaam2 Aquí está la parte relevante de mi configuración:

module.exports = {
  plugins: [
    {
      name: "typescript",
      options: {
        useBabel: true,
        useEslint: true,
        forkTsChecker: {
          tsconfig: "./tsconfig.json",
          tslint: undefined,
          watch: "./src",
          typeCheck: true,
        },
      },
    },
  ]
};

Tenga en cuenta que inicialmente me faltaba la clave options .

@Jayphen gracias!

¿Fue útil esta página
0 / 5 - 0 calificaciones

Temas relacionados

krazyjakee picture krazyjakee  ·  3Comentarios

gabimor picture gabimor  ·  3Comentarios

GouthamKD picture GouthamKD  ·  3Comentarios

jcblw picture jcblw  ·  4Comentarios

mhuggins picture mhuggins  ·  3Comentarios