我有几个 TSLint 不满意的 TypeScript 导入源,因为它们显然没有按字母顺序排列。
import { DialogNoConfigurationFile } from './view/dialogs/dialog-no-configuration-file';
import { DisplayMain } from './view/display/display-main';
import { Global } from './business/global';
import { remote } from 'electron';
import { RequestResponse } from './data/model/request-response';
import { UserRequestResponse } from './data/model/user-request-response';
来自 TSLint 的错误消息:
ERROR: /home/myuser/Documents/myproject/administration2/src/app.tsx:11:1 - Import sources within a group must be alphabetized.
ERROR: /home/myuser/Documents/myproject/administration2/src/app.tsx:12:1 - Import sources within a group must be alphabetized.
我的 package.json 脚本命令:
"lint": "tslint --project tsconfig.json --force"
尽管 TSLint 对Global
and不满意remote
,但字母排序一切正常。我相信 TSLint 一定对大写或类似的东西不满意。有没有办法检查 TSLint 是如何按字母顺序排列的?