File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ module.exports = {
1616 "plugin:import/typescript" ,
1717 ] ,
1818 rules : {
19+ // the base rule does not understand typescript, so use the typescript-eslint variant
20+ "no-use-before-define" : "off" ,
21+ "@typescript-eslint/no-use-before-define" : "error" ,
1922 "semi" : [ "error" , "never" ] ,
2023 "sort-imports" : [
2124 "error" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,13 @@ import { Settings } from "../settings"
44import { SortUtil } from "../util/sort-util"
55import { removeTrailingCharacters , splitYaml } from "../util/yaml-text"
66
7+ /**
8+ * @param value Any loaded yaml value.
9+ * @returns True for a mapping without keys, e.g. an empty document.
10+ */
11+ const isEmptyMapping = ( value : unknown ) : boolean =>
12+ typeof value === "object" && value !== null && ! Array . isArray ( value ) && Object . keys ( value ) . length === 0
13+
714export class JsYamlAdapter {
815 settings : Settings
916
@@ -88,12 +95,4 @@ export class JsYamlAdapter {
8895 }
8996 return sortKeys
9097 }
91-
9298}
93-
94- /**
95- * @param value Any loaded yaml value.
96- * @returns True for a mapping without keys, e.g. an empty document.
97- */
98- const isEmptyMapping = ( value : unknown ) : boolean =>
99- typeof value === "object" && value !== null && ! Array . isArray ( value ) && Object . keys ( value ) . length === 0
You can’t perform that action at this time.
0 commit comments