@@ -13,12 +13,60 @@ const matchOptions = {matchBase: true, dot: true};
1313
1414// These are specified by the editorconfig script
1515export interface KnownProps {
16+ /**
17+ * Specifies the character set. Use of `utf-8-bom` is discouraged.
18+ */
1619 charset ?: 'latin1' | 'utf-8' | 'utf-8-bom' | 'utf-16be' | 'utf-16le' | 'unset' ;
20+
21+ /**
22+ * Specifies how line breaks are represented.
23+ */
1724 end_of_line ?: 'lf' | 'crlf' | 'unset' ;
25+
26+ /**
27+ * Specifies the number of columns used for each indentation level
28+ * and the width of soft tabs (when supported).
29+ *
30+ * If `indent_size` in the config is set to `tab`,
31+ * the value of this property will be:
32+ * - the same as the value of the {@link KnownProps.tab_width tab_width}
33+ * if it is specified;
34+ * - `tab` if it is not.
35+ */
1836 indent_size ?: number | 'tab' | 'unset' ;
37+
38+ /**
39+ * Specifies whether tabs or spaces should be used for indentation.
40+ * - `tab`: Use hard tabs for indentation,
41+ * filling the remainder with spaces if needed.
42+ * - `space`: Use spaces for indentation.
43+ */
1944 indent_style ?: 'tab' | 'space' | 'unset' ;
45+
46+ /**
47+ * Specifies whether a file should end with a newline character when saved.
48+ * - `true`: Ensure the file ends with a newline.
49+ * - `false`: Ensure the file does not end with a newline.
50+ *
51+ * Editors must not insert newlines in empty files
52+ * when saving those files, even if `insert_final_newline` = true.
53+ */
2054 insert_final_newline ?: true | false | 'unset' ;
55+
56+ /**
57+ * Specifies the number of columns used to represent a tab character.
58+ *
59+ * This defaults to the value of {@link KnownProps.indent_size indent_size}
60+ * and should not usually need to be specified.
61+ */
2162 tab_width ?: number | 'unset' ;
63+
64+ /**
65+ * Specifies whether all whitespace characters
66+ * preceding newline characters in the file should be removed.
67+ * - `true`: Remove all trailing whitespace before newlines.
68+ * - `false`: Preserve trailing whitespace.
69+ */
2270 trim_trailing_whitespace ?: true | false | 'unset' ;
2371}
2472
0 commit comments