我将vim
项目的IDE
用作typescript
。
import { FlightInfo } from './FlightInfo'
import { InfoBlockProps, InfoRowProps, INavigationFlightOfferDataProps } from './interfaces'
import { getDiscountData, formatDataByServicesType, selectAdministrationFee } from './functions'
此外,我使用ts-lint
规则进行支票排序:
...
ordered-imports": [
true,
{
"import-sources-order": "lowercase-first",
"named-imports-order": "lowercase-first"
}
],
...
并得到错误:
ERROR: 11:1 ordered-imports Import sources within a group must be alphabetized.
ERROR: 11:10 ordered-imports Named imports must be alphabetized.
ERROR: 12:1 ordered-imports Import sources within a group must be alphabetized.
ERROR: 12:10 ordered-imports Named imports must be alphabetized.
我正在搜索解决此排序错误的解决方案或插件。
答案 0 :(得分:0)
在这种情况下,对我来说,ts-lint --fix -c ./ts-congig.json my-file.ts
命令非常有效。