tsumanne 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,401 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `mdl` gem.
5
+ # Please instead update this file by running `bin/tapioca gem mdl`.
6
+
7
+ # source://mdl//lib/mdl/kramdown_parser.rb#6
8
+ module Kramdown
9
+ class << self
10
+ # source://kramdown/2.4.0/lib/kramdown/document.rb#49
11
+ def data_dir; end
12
+ end
13
+ end
14
+
15
+ # source://mdl//lib/mdl/kramdown_parser.rb#7
16
+ module Kramdown::Parser; end
17
+
18
+ # modified parser class - see comment above
19
+ #
20
+ # source://mdl//lib/mdl/kramdown_parser.rb#9
21
+ class Kramdown::Parser::MarkdownLint < ::Kramdown::Parser::Kramdown
22
+ # @return [MarkdownLint] a new instance of MarkdownLint
23
+ #
24
+ # source://mdl//lib/mdl/kramdown_parser.rb#10
25
+ def initialize(source, options); end
26
+ end
27
+
28
+ # Regular kramdown parser, but with GFM style fenced code blocks
29
+ #
30
+ # source://mdl//lib/mdl/kramdown_parser.rb#18
31
+ Kramdown::Parser::MarkdownLint::FENCED_CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp)
32
+
33
+ # Primary MDL container
34
+ #
35
+ # source://mdl//lib/mdl/cli.rb#4
36
+ module MarkdownLint
37
+ class << self
38
+ # Creates hyperlinks in terminal emulators, if available: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
39
+ #
40
+ # source://mdl//lib/mdl.rb#151
41
+ def linkify(text, url); end
42
+
43
+ # source://mdl//lib/mdl.rb#144
44
+ def printable_id(rule); end
45
+
46
+ # source://mdl//lib/mdl.rb#14
47
+ def run(argv = T.unsafe(nil)); end
48
+ end
49
+ end
50
+
51
+ # Our Mixlib::CLI class
52
+ #
53
+ # source://mdl//lib/mdl/cli.rb#6
54
+ class MarkdownLint::CLI
55
+ include ::Mixlib::CLI
56
+ extend ::Mixlib::CLI::ClassMethods
57
+ extend ::Mixlib::CLI::InheritMethods
58
+
59
+ # source://mdl//lib/mdl/cli.rb#110
60
+ def run(argv = T.unsafe(nil)); end
61
+
62
+ class << self
63
+ # source://mdl//lib/mdl/cli.rb#164
64
+ def probe_config_file(path); end
65
+
66
+ # source://mdl//lib/mdl/cli.rb#147
67
+ def toggle_list(parts, to_sym = T.unsafe(nil)); end
68
+ end
69
+ end
70
+
71
+ # source://mdl//lib/mdl/cli.rb#9
72
+ MarkdownLint::CLI::CONFIG_FILE = T.let(T.unsafe(nil), String)
73
+
74
+ # our Mixlib::Config class
75
+ #
76
+ # source://mdl//lib/mdl/config.rb#5
77
+ module MarkdownLint::Config
78
+ extend ::Mixlib::Config
79
+
80
+ class << self
81
+ # source://mixlib-config/3.0.27/lib/mixlib/config.rb#34
82
+ def config_context_hashes; end
83
+
84
+ # source://mixlib-config/3.0.27/lib/mixlib/config.rb#34
85
+ def config_context_hashes=(_arg0); end
86
+
87
+ # source://mixlib-config/3.0.27/lib/mixlib/config.rb#33
88
+ def config_context_lists; end
89
+
90
+ # source://mixlib-config/3.0.27/lib/mixlib/config.rb#33
91
+ def config_context_lists=(_arg0); end
92
+
93
+ # source://mixlib-config/3.0.27/lib/mixlib/config.rb#32
94
+ def config_contexts; end
95
+
96
+ # source://mixlib-config/3.0.27/lib/mixlib/config.rb#32
97
+ def config_contexts=(_arg0); end
98
+
99
+ # source://mixlib-config/3.0.27/lib/mixlib/config.rb#35
100
+ def config_parent; end
101
+
102
+ # source://mixlib-config/3.0.27/lib/mixlib/config.rb#35
103
+ def config_parent=(_arg0); end
104
+
105
+ # source://mixlib-config/3.0.27/lib/mixlib/config.rb#31
106
+ def configurables; end
107
+
108
+ # source://mixlib-config/3.0.27/lib/mixlib/config.rb#31
109
+ def configurables=(_arg0); end
110
+
111
+ # source://mixlib-config/3.0.27/lib/mixlib/config.rb#30
112
+ def configuration; end
113
+
114
+ # source://mixlib-config/3.0.27/lib/mixlib/config.rb#30
115
+ def configuration=(_arg0); end
116
+
117
+ # source://mixlib-config/3.0.27/lib/mixlib/config.rb#667
118
+ def style(*args, &block); end
119
+
120
+ # source://mixlib-config/3.0.27/lib/mixlib/config.rb#663
121
+ def style=(value); end
122
+ end
123
+ end
124
+
125
+ # Representation of the markdown document passed to rule checks
126
+ #
127
+ # source://mdl//lib/mdl/doc.rb#7
128
+ class MarkdownLint::Doc
129
+ # Create a new document given a string containing the markdown source
130
+ #
131
+ # @return [Doc] a new instance of Doc
132
+ #
133
+ # source://mdl//lib/mdl/doc.rb#29
134
+ def initialize(text, ignore_front_matter = T.unsafe(nil)); end
135
+
136
+ # Returns the actual source line for a given element. You can pass in an
137
+ # element object or an options hash here. This is useful if you need to
138
+ # examine the source line directly for your rule to make use of
139
+ # information that isn't present in the parsed document.
140
+ #
141
+ # source://mdl//lib/mdl/doc.rb#135
142
+ def element_line(element); end
143
+
144
+ # Returns the line number a given element is located on in the source
145
+ # file. You can pass in either an element object or an options hash here.
146
+ #
147
+ # source://mdl//lib/mdl/doc.rb#124
148
+ def element_linenumber(element); end
149
+
150
+ # Returns a list of line numbers for all elements passed in. You can pass
151
+ # in a list of element objects or a list of options hashes here.
152
+ #
153
+ # source://mdl//lib/mdl/doc.rb#143
154
+ def element_linenumbers(elements); end
155
+
156
+ # Returns the actual source lines for a list of elements. You can pass in
157
+ # a list of elements objects or a list of options hashes here.
158
+ #
159
+ # source://mdl//lib/mdl/doc.rb#151
160
+ def element_lines(elements); end
161
+
162
+ # A list of raw markdown source lines. Note that the list is 0-indexed,
163
+ # while line numbers in the parsed source are 1-indexed, so you need to
164
+ # subtract 1 from a line number to get the correct line. The element_line*
165
+ # methods take care of this for you.
166
+ #
167
+ # source://mdl//lib/mdl/doc.rb#14
168
+ def elements; end
169
+
170
+ # Extracts the text from an element whose children consist of text
171
+ # elements and other things
172
+ #
173
+ # source://mdl//lib/mdl/doc.rb#245
174
+ def extract_text(element, prefix = T.unsafe(nil), restore_whitespace = T.unsafe(nil)); end
175
+
176
+ # Find all elements of a given type, returning their options hash. The
177
+ # options hash has most of the useful data about an element and often you
178
+ # can just use this in your rules.
179
+ #
180
+ # # Returns [ { :location => 1, :element_level => 2 }, ... ]
181
+ # elements = find_type(:li)
182
+ #
183
+ # If +nested+ is set to false, this returns only top level elements of a
184
+ # given type.
185
+ #
186
+ # source://mdl//lib/mdl/doc.rb#67
187
+ def find_type(type, nested = T.unsafe(nil)); end
188
+
189
+ # Find all elements of a given type, returning a list of the element
190
+ # objects themselves.
191
+ #
192
+ # Instead of a single type, a list of types can be provided instead to
193
+ # find all types.
194
+ #
195
+ # If +nested+ is set to false, this returns only top level elements of a
196
+ # given type.
197
+ #
198
+ # source://mdl//lib/mdl/doc.rb#81
199
+ def find_type_elements(type, nested = T.unsafe(nil), elements = T.unsafe(nil)); end
200
+
201
+ # A variation on find_type_elements that allows you to skip drilling down
202
+ # into children of specific element types.
203
+ #
204
+ # Instead of a single type, a list of types can be provided instead to
205
+ # find all types.
206
+ #
207
+ # Unlike find_type_elements, this method will always search for nested
208
+ # elements, and skip the element types given to nested_except.
209
+ #
210
+ # source://mdl//lib/mdl/doc.rb#103
211
+ def find_type_elements_except(type, nested_except = T.unsafe(nil), elements = T.unsafe(nil)); end
212
+
213
+ # Returns the header 'style' - :atx (hashes at the beginning), :atx_closed
214
+ # (atx header style, but with hashes at the end of the line also), :setext
215
+ # (underlined). You can pass in the element object or an options hash
216
+ # here.
217
+ #
218
+ # source://mdl//lib/mdl/doc.rb#161
219
+ def header_style(header); end
220
+
221
+ # Returns how much a given line is indented. Hard tabs are treated as an
222
+ # indent of 8 spaces. You need to pass in the raw string here.
223
+ #
224
+ # source://mdl//lib/mdl/doc.rb#206
225
+ def indent_for(line); end
226
+
227
+ # A list of raw markdown source lines. Note that the list is 0-indexed,
228
+ # while line numbers in the parsed source are 1-indexed, so you need to
229
+ # subtract 1 from a line number to get the correct line. The element_line*
230
+ # methods take care of this for you.
231
+ #
232
+ # source://mdl//lib/mdl/doc.rb#14
233
+ def lines; end
234
+
235
+ # Returns the list style for a list: :asterisk, :plus, :dash, :ordered or
236
+ # :ordered_paren depending on which symbol is used to denote the list
237
+ # item. You can pass in either the element itself or an options hash here.
238
+ #
239
+ # source://mdl//lib/mdl/doc.rb#183
240
+ def list_style(item); end
241
+
242
+ # Returns line numbers for lines that match the given regular expression
243
+ #
244
+ # source://mdl//lib/mdl/doc.rb#213
245
+ def matching_lines(regex); end
246
+
247
+ # Returns line numbers for lines that match the given regular expression.
248
+ # Only considers text inside of 'text' elements (i.e. regular markdown
249
+ # text and not code/links or other elements).
250
+ #
251
+ # source://mdl//lib/mdl/doc.rb#224
252
+ def matching_text_element_lines(regex, exclude_nested = T.unsafe(nil)); end
253
+
254
+ # A list of raw markdown source lines. Note that the list is 0-indexed,
255
+ # while line numbers in the parsed source are 1-indexed, so you need to
256
+ # subtract 1 from a line number to get the correct line. The element_line*
257
+ # methods take care of this for you.
258
+ #
259
+ # source://mdl//lib/mdl/doc.rb#14
260
+ def offset; end
261
+
262
+ # A list of raw markdown source lines. Note that the list is 0-indexed,
263
+ # while line numbers in the parsed source are 1-indexed, so you need to
264
+ # subtract 1 from a line number to get the correct line. The element_line*
265
+ # methods take care of this for you.
266
+ #
267
+ # source://mdl//lib/mdl/doc.rb#14
268
+ def parsed; end
269
+
270
+ private
271
+
272
+ # Adds a 'level' and 'parent' option to all elements to show how nested they
273
+ # are
274
+ #
275
+ # source://mdl//lib/mdl/doc.rb#277
276
+ def add_annotations(elements, level = T.unsafe(nil), parent = T.unsafe(nil)); end
277
+
278
+ class << self
279
+ # Alternate 'constructor' passing in a filename
280
+ #
281
+ # source://mdl//lib/mdl/doc.rb#48
282
+ def new_from_file(filename, ignore_front_matter = T.unsafe(nil)); end
283
+ end
284
+ end
285
+
286
+ # defines a single rule
287
+ #
288
+ # source://mdl//lib/mdl/ruleset.rb#3
289
+ class MarkdownLint::Rule
290
+ # @return [Rule] a new instance of Rule
291
+ #
292
+ # source://mdl//lib/mdl/ruleset.rb#6
293
+ def initialize(id, description, fallback_docs: T.unsafe(nil), &block); end
294
+
295
+ # source://mdl//lib/mdl/ruleset.rb#27
296
+ def aliases(*aliases); end
297
+
298
+ # source://mdl//lib/mdl/ruleset.rb#17
299
+ def check(&block); end
300
+
301
+ # Returns the value of attribute description.
302
+ #
303
+ # source://mdl//lib/mdl/ruleset.rb#4
304
+ def description; end
305
+
306
+ # Sets the attribute description
307
+ #
308
+ # @param value the value to set the attribute description to.
309
+ #
310
+ # source://mdl//lib/mdl/ruleset.rb#4
311
+ def description=(_arg0); end
312
+
313
+ # source://mdl//lib/mdl/ruleset.rb#37
314
+ def docs(url = T.unsafe(nil), &block); end
315
+
316
+ # source://mdl//lib/mdl/ruleset.rb#48
317
+ def docs_url; end
318
+
319
+ # Returns the value of attribute id.
320
+ #
321
+ # source://mdl//lib/mdl/ruleset.rb#4
322
+ def id; end
323
+
324
+ # Sets the attribute id
325
+ #
326
+ # @param value the value to set the attribute id to.
327
+ #
328
+ # source://mdl//lib/mdl/ruleset.rb#4
329
+ def id=(_arg0); end
330
+
331
+ # source://mdl//lib/mdl/ruleset.rb#32
332
+ def params(params = T.unsafe(nil)); end
333
+
334
+ # source://mdl//lib/mdl/ruleset.rb#22
335
+ def tags(*tags); end
336
+ end
337
+
338
+ # defines a ruleset
339
+ #
340
+ # source://mdl//lib/mdl/ruleset.rb#54
341
+ class MarkdownLint::RuleSet
342
+ # @return [RuleSet] a new instance of RuleSet
343
+ #
344
+ # source://mdl//lib/mdl/ruleset.rb#57
345
+ def initialize; end
346
+
347
+ # source://mdl//lib/mdl/ruleset.rb#71
348
+ def docs(url = T.unsafe(nil), &block); end
349
+
350
+ # source://mdl//lib/mdl/ruleset.rb#66
351
+ def load(rules_file); end
352
+
353
+ # source://mdl//lib/mdl/ruleset.rb#79
354
+ def load_default; end
355
+
356
+ # source://mdl//lib/mdl/ruleset.rb#61
357
+ def rule(id, description, &block); end
358
+
359
+ # Returns the value of attribute rules.
360
+ #
361
+ # source://mdl//lib/mdl/ruleset.rb#55
362
+ def rules; end
363
+ end
364
+
365
+ # defines a style
366
+ #
367
+ # source://mdl//lib/mdl/style.rb#5
368
+ class MarkdownLint::Style
369
+ # @return [Style] a new instance of Style
370
+ #
371
+ # source://mdl//lib/mdl/style.rb#8
372
+ def initialize(all_rules); end
373
+
374
+ # source://mdl//lib/mdl/style.rb#24
375
+ def all; end
376
+
377
+ # source://mdl//lib/mdl/style.rb#41
378
+ def exclude_rule(id); end
379
+
380
+ # source://mdl//lib/mdl/style.rb#50
381
+ def exclude_tag(tag); end
382
+
383
+ # source://mdl//lib/mdl/style.rb#28
384
+ def rule(id, params = T.unsafe(nil)); end
385
+
386
+ # Returns the value of attribute rules.
387
+ #
388
+ # source://mdl//lib/mdl/style.rb#6
389
+ def rules; end
390
+
391
+ # source://mdl//lib/mdl/style.rb#46
392
+ def tag(tag); end
393
+
394
+ class << self
395
+ # source://mdl//lib/mdl/style.rb#54
396
+ def load(style_file, rules); end
397
+ end
398
+ end
399
+
400
+ # source://mdl//lib/mdl/version.rb#2
401
+ MarkdownLint::VERSION = T.let(T.unsafe(nil), String)