@@ -44,6 +44,10 @@ pub fn resolve_config(config: ConfigKeyMap, global_config: &GlobalConfiguration)
44
44
let prefer_single_line = prefer_single_line_nullable. unwrap_or ( false ) ;
45
45
let type_literal_separator_kind = get_value ( & mut config, "typeLiteral.separatorKind" , SemiColonOrComma :: SemiColon , & mut diagnostics) ;
46
46
47
+ // todo: remove these two lines after 2021-03
48
+ handle_renamed_config_property ( & mut config, "statements.sortImportDeclarations" , "module.sortImportDeclarations" , & mut diagnostics) ;
49
+ handle_renamed_config_property ( & mut config, "statements.sortExportDeclarations" , "module.sortExportDeclarations" , & mut diagnostics) ;
50
+
47
51
let resolved_config = Configuration {
48
52
line_width : get_value ( & mut config, "lineWidth" , global_config. line_width . unwrap_or ( DEFAULT_GLOBAL_CONFIGURATION . line_width ) , & mut diagnostics) ,
49
53
use_tabs : get_value ( & mut config, "useTabs" , global_config. use_tabs . unwrap_or ( DEFAULT_GLOBAL_CONFIGURATION . use_tabs ) , & mut diagnostics) ,
@@ -58,8 +62,8 @@ pub fn resolve_config(config: ConfigKeyMap, global_config: &GlobalConfiguration)
58
62
type_literal_separator_kind_single_line : get_value ( & mut config, "typeLiteral.separatorKind.singleLine" , type_literal_separator_kind, & mut diagnostics) ,
59
63
type_literal_separator_kind_multi_line : get_value ( & mut config, "typeLiteral.separatorKind.multiLine" , type_literal_separator_kind, & mut diagnostics) ,
60
64
/* sorting */
61
- statements_sort_import_declarations : get_value ( & mut config, "statements .sortImportDeclarations" , SortOrder :: CaseInsensitive , & mut diagnostics) ,
62
- statements_sort_export_declarations : get_value ( & mut config, "statements .sortExportDeclarations" , SortOrder :: CaseInsensitive , & mut diagnostics) ,
65
+ module_sort_import_declarations : get_value ( & mut config, "module .sortImportDeclarations" , SortOrder :: CaseInsensitive , & mut diagnostics) ,
66
+ module_sort_export_declarations : get_value ( & mut config, "module .sortExportDeclarations" , SortOrder :: CaseInsensitive , & mut diagnostics) ,
63
67
import_declaration_sort_named_imports : get_value ( & mut config, "importDeclaration.sortNamedImports" , SortOrder :: CaseInsensitive , & mut diagnostics) ,
64
68
export_declaration_sort_named_exports : get_value ( & mut config, "exportDeclaration.sortNamedExports" , SortOrder :: CaseInsensitive , & mut diagnostics) ,
65
69
/* ignore comments */
0 commit comments