我想禁用 tslint(支持使用 eslint)。 但是,在razzle.config.js
禁用它时,出现以下错误:
Cannot find "${PATH}/tslint.json" file. Please check webpack and ForkTsCheckerWebpackPlugin configuration.
我的razzle.config.js
如下:
module.exports = {
plugins: [
{
name: "typescript",
useBabel: true,
useEslint: true,
forkTsChecker: {
tsconfig: "./tsconfig.json",
tslint: false,
watch: "./src",
typeCheck: true,
},
},
],
};
我的错——我的配置格式不正确。
@Jayphen您能否在此处详细说明最终的工作配置以使其不再需要 tslint 作为 dep?
@adaam2这是我的配置的相关部分:
module.exports = {
plugins: [
{
name: "typescript",
options: {
useBabel: true,
useEslint: true,
forkTsChecker: {
tsconfig: "./tsconfig.json",
tslint: undefined,
watch: "./src",
typeCheck: true,
},
},
},
]
};
请注意,我最初缺少options
键。
@Jayphen谢谢!
最有用的评论
@adaam2这是我的配置的相关部分:
请注意,我最初缺少
options
键。