wikiparser-node 0.0.0

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.
Files changed (65) hide show
  1. package/.eslintrc.json +229 -0
  2. package/LICENSE +674 -0
  3. package/README.md +1896 -0
  4. package/config/default.json +766 -0
  5. package/config/llwiki.json +686 -0
  6. package/config/moegirl.json +721 -0
  7. package/index.js +159 -0
  8. package/jsconfig.json +7 -0
  9. package/lib/element.js +690 -0
  10. package/lib/node.js +357 -0
  11. package/lib/ranges.js +122 -0
  12. package/lib/title.js +57 -0
  13. package/mixin/attributeParent.js +67 -0
  14. package/mixin/fixedToken.js +32 -0
  15. package/mixin/hidden.js +22 -0
  16. package/package.json +30 -0
  17. package/parser/brackets.js +107 -0
  18. package/parser/commentAndExt.js +61 -0
  19. package/parser/externalLinks.js +30 -0
  20. package/parser/hrAndDoubleUnderscore.js +26 -0
  21. package/parser/html.js +41 -0
  22. package/parser/links.js +92 -0
  23. package/parser/magicLinks.js +40 -0
  24. package/parser/quotes.js +63 -0
  25. package/parser/table.js +97 -0
  26. package/src/arg.js +150 -0
  27. package/src/atom/hidden.js +10 -0
  28. package/src/atom/index.js +33 -0
  29. package/src/attribute.js +342 -0
  30. package/src/extLink.js +116 -0
  31. package/src/heading.js +91 -0
  32. package/src/html.js +144 -0
  33. package/src/imageParameter.js +172 -0
  34. package/src/index.js +602 -0
  35. package/src/link/category.js +88 -0
  36. package/src/link/file.js +201 -0
  37. package/src/link/index.js +214 -0
  38. package/src/listToken.js +47 -0
  39. package/src/magicLink.js +66 -0
  40. package/src/nowiki/comment.js +45 -0
  41. package/src/nowiki/doubleUnderscore.js +42 -0
  42. package/src/nowiki/hr.js +41 -0
  43. package/src/nowiki/index.js +37 -0
  44. package/src/nowiki/noinclude.js +24 -0
  45. package/src/nowiki/quote.js +37 -0
  46. package/src/onlyinclude.js +42 -0
  47. package/src/parameter.js +165 -0
  48. package/src/syntax.js +80 -0
  49. package/src/table/index.js +867 -0
  50. package/src/table/td.js +259 -0
  51. package/src/table/tr.js +244 -0
  52. package/src/tagPair/ext.js +85 -0
  53. package/src/tagPair/include.js +45 -0
  54. package/src/tagPair/index.js +91 -0
  55. package/src/transclude.js +627 -0
  56. package/tool/index.js +898 -0
  57. package/typings/element.d.ts +28 -0
  58. package/typings/index.d.ts +49 -0
  59. package/typings/node.d.ts +23 -0
  60. package/typings/parser.d.ts +9 -0
  61. package/typings/table.d.ts +14 -0
  62. package/typings/token.d.ts +21 -0
  63. package/typings/tool.d.ts +10 -0
  64. package/util/debug.js +70 -0
  65. package/util/string.js +60 -0
package/.eslintrc.json ADDED
@@ -0,0 +1,229 @@
1
+ {
2
+ "env": {
3
+ "node": true,
4
+ "es2021": true
5
+ },
6
+ "extends": "eslint:recommended",
7
+ "parserOptions": {
8
+ "ecmaVersion": 13,
9
+ "ecmaFeatures": {
10
+ "impliedStrict": true
11
+ }
12
+ },
13
+ "rules": {
14
+ "array-callback-return": [
15
+ 2,
16
+ {
17
+ "checkForEach": true
18
+ }
19
+ ],
20
+ "no-await-in-loop": 2,
21
+ "no-constructor-return": 2,
22
+ "no-fallthrough": 1,
23
+ "no-promise-executor-return": 2,
24
+ "no-self-compare": 2,
25
+ "no-template-curly-in-string": 2,
26
+ "no-unmodified-loop-condition": 2,
27
+ "no-unreachable-loop": 2,
28
+ "no-use-before-define": [
29
+ 2,
30
+ {
31
+ "functions": false,
32
+ "classes": false,
33
+ "variables": false
34
+ }
35
+ ],
36
+ "require-atomic-updates": 2,
37
+ "block-scoped-var": 2,
38
+ "class-methods-use-this": 0,
39
+ "consistent-this": 2,
40
+ "curly": 2,
41
+ "default-case": 2,
42
+ "default-case-last": 2,
43
+ "default-param-last": 2,
44
+ "dot-notation":2,
45
+ "eqeqeq": 2,
46
+ "func-names": [
47
+ 2,
48
+ "never"
49
+ ],
50
+ "multiline-comment-style": 2,
51
+ "new-cap": [
52
+ 1,
53
+ {
54
+ "capIsNew": false
55
+ }
56
+ ],
57
+ "no-alert": 2,
58
+ "no-array-constructor": 2,
59
+ "no-bitwise": 2,
60
+ "no-control-regex": 0,
61
+ "no-else-return": 2,
62
+ "no-empty": [
63
+ 2,
64
+ {
65
+ "allowEmptyCatch": true
66
+ }
67
+ ],
68
+ "no-eval": 2,
69
+ "no-extend-native": 2,
70
+ "no-floating-decimal": 2,
71
+ "no-implied-eval": 2,
72
+ "no-invalid-this": [
73
+ 2,
74
+ {
75
+ "capIsConstructor": false
76
+ }
77
+ ],
78
+ "no-lone-blocks": 2,
79
+ "no-lonely-if": 2,
80
+ "no-loop-func": 2,
81
+ "no-multi-assign": 2,
82
+ "no-multi-str": 2,
83
+ "no-nested-ternary": 1,
84
+ "no-new": 0,
85
+ "no-new-func": 2,
86
+ "no-new-object": 2,
87
+ "no-new-wrappers": 2,
88
+ "no-octal-escape": 2,
89
+ "no-param-reassign": 0,
90
+ "no-return-assign": 2,
91
+ "no-return-await": 2,
92
+ "no-script-url": 2,
93
+ "no-sequences": 2,
94
+ "no-shadow": 2,
95
+ "no-undef-init": 2,
96
+ "no-unneeded-ternary": [
97
+ 2,
98
+ {
99
+ "defaultAssignment": false
100
+ }
101
+ ],
102
+ "no-unused-expressions": 2,
103
+ "no-useless-computed-key": [
104
+ 2,
105
+ {
106
+ "enforceForClassMembers": true
107
+ }
108
+ ],
109
+ "no-useless-concat": 2,
110
+ "no-useless-constructor": 2,
111
+ "no-useless-rename": 2,
112
+ "no-useless-return": 2,
113
+ "no-var": 2,
114
+ "no-void": 2,
115
+ "object-shorthand": 2,
116
+ "one-var-declaration-per-line": 2,
117
+ "operator-assignment": 2,
118
+ "prefer-arrow-callback": 2,
119
+ "prefer-const": 2,
120
+ "prefer-destructuring": 2,
121
+ "prefer-exponentiation-operator": 2,
122
+ "prefer-object-spread": 2,
123
+ "prefer-regex-literals": [
124
+ 2,
125
+ {
126
+ "disallowRedundantWrapping": true
127
+ }
128
+ ],
129
+ "prefer-rest-params": 2,
130
+ "prefer-spread": 2,
131
+ "prefer-template": 1,
132
+ "quote-props": [
133
+ 2,
134
+ "as-needed"
135
+ ],
136
+ "radix": [
137
+ 2,
138
+ "as-needed"
139
+ ],
140
+ "require-await": 2,
141
+ "spaced-comment": 2,
142
+ "symbol-description": 2,
143
+ "yoda": 2,
144
+ "array-bracket-spacing": 2,
145
+ "arrow-parens": [
146
+ 2,
147
+ "as-needed"
148
+ ],
149
+ "arrow-spacing": 2,
150
+ "block-spacing": 2,
151
+ "brace-style": 2,
152
+ "comma-dangle": [
153
+ 2,
154
+ "always-multiline"
155
+ ],
156
+ "comma-spacing": 2,
157
+ "comma-style": 2,
158
+ "computed-property-spacing": 2,
159
+ "dot-location": [
160
+ 2,
161
+ "property"
162
+ ],
163
+ "eol-last": 2,
164
+ "func-call-spacing": 2,
165
+ "indent": [
166
+ 2,
167
+ "tab",
168
+ {
169
+ "SwitchCase": 1
170
+ }
171
+ ],
172
+ "key-spacing": 2,
173
+ "keyword-spacing": 2,
174
+ "linebreak-style": 2,
175
+ "multiline-ternary": [
176
+ 2,
177
+ "always-multiline"
178
+ ],
179
+ "new-parens": 2,
180
+ "no-extra-parens": 2,
181
+ "no-multi-spaces": 2,
182
+ "no-multiple-empty-lines": [
183
+ 2,
184
+ {
185
+ "max": 1
186
+ }
187
+ ],
188
+ "no-trailing-spaces": 2,
189
+ "no-whitespace-before-property": 2,
190
+ "operator-linebreak": [
191
+ 2,
192
+ "before"
193
+ ],
194
+ "padded-blocks": [
195
+ 2,
196
+ "never"
197
+ ],
198
+ "quotes": [
199
+ 2,
200
+ "single",
201
+ {
202
+ "avoidEscape": true,
203
+ "allowTemplateLiterals": true
204
+ }
205
+ ],
206
+ "rest-spread-spacing": 2,
207
+ "semi": 2,
208
+ "semi-spacing": 2,
209
+ "semi-style": 2,
210
+ "space-before-blocks": 2,
211
+ "space-before-function-paren": [
212
+ 2,
213
+ {
214
+ "anonymous": "never",
215
+ "named": "never",
216
+ "asyncArrow": "always"
217
+ }
218
+ ],
219
+ "space-in-parens": 2,
220
+ "space-infix-ops": 2,
221
+ "space-unary-ops": 2,
222
+ "switch-colon-spacing": 2,
223
+ "template-curly-spacing": 2,
224
+ "wrap-iife": [
225
+ 2,
226
+ "inside"
227
+ ]
228
+ }
229
+ }