[英]Import sources within a group must be alphabetized (TS)
I have import sources in my ts file 我的ts文件中有导入源
Here is it 就这个
import accounting from "accounting";
import { Feature } from "geojson";
import { GeoJsonProperties } from "geojson";
import { GeoJSONGeometry } from "mapbox-gl";
import Helpers from "../../common/helpers";
import { Layer } from "mapbox-gl";
import mapboxgl from "mapbox-gl";
import { Map } from "mapbox-gl";
import { Popup } from "mapbox-gl";
import { __ } from "../../common/translation";
But I have error in codacy 但是我在编纂方面有错误
Import sources within a group must be alphabetized 组中的导入源必须按字母顺序排列
I cannot understand why, because all already alphabetized? 我不明白为什么,因为所有字母均已按字母顺序排列?
How I can fix this? 我该如何解决?
As per this answer : 按照这个答案 :
The filepaths are also used as part of the ordering...
文件路径也用作订购的一部分...
These are the 'sources' being referenced in the error. 这些是错误中引用的“来源”。 You can disable this in your
tslint.json
file with the following rule: 您可以使用以下规则在
tslint.json
文件中禁用此功能:
"ordered-imports": false
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.