Razzle: Disable tslint with Typescript plugin?

Created on 24 Feb 2019  ·  4Comments  ·  Source: jaredpalmer/razzle

I would like to disable tslint (in favour of using eslint). However, when disabling it in my razzle.config.js, I get the following error:

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

My razzle.config.js is as follows:

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

Most helpful comment

@adaam2 Here is the relevant part of my config:

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

Note I was missing the options key initially.

All 4 comments

My bad — my config was incorrectly formatted.

@Jayphen Could you detail a final working configuration here to make it so that tslint is no longer required as a dep?

@adaam2 Here is the relevant part of my config:

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

Note I was missing the options key initially.

@Jayphen thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jcblw picture jcblw  ·  4Comments

GouthamKD picture GouthamKD  ·  3Comments

MaxGoh picture MaxGoh  ·  4Comments

gabimor picture gabimor  ·  3Comments

sebmor picture sebmor  ·  4Comments