TSLint:'from' 之前的空格太多(导入间距)
TSLint: Too many spaces before 'from' (import-spacing)
我正在使用 WebStorm 并试图保持这样的代码风格:
但是当我这样做时,TSLint 会在我的空格下划线并给我提示:
"Too many spaces before 'from' (import-spacing)".
我的问题是:有没有办法在没有底层的情况下保持这种代码风格?我也用谷歌搜索了这个问题,但没有成功。
而且我不想完全禁用 TSLint,只是这个空格规则。
在您的 tslint.json 文件中,添加此规则:
{
"rules": {
"import-spacing": false
}
}
另请参阅:https://palantir.github.io/tslint/rules/import-spacing/
我正在使用 WebStorm 并试图保持这样的代码风格:
但是当我这样做时,TSLint 会在我的空格下划线并给我提示:
"Too many spaces before 'from' (import-spacing)".
我的问题是:有没有办法在没有底层的情况下保持这种代码风格?我也用谷歌搜索了这个问题,但没有成功。
而且我不想完全禁用 TSLint,只是这个空格规则。
在您的 tslint.json 文件中,添加此规则:
{
"rules": {
"import-spacing": false
}
}
另请参阅:https://palantir.github.io/tslint/rules/import-spacing/