@alexlit/lint-kit 117.2.0 → 117.3.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 (169) hide show
  1. package/package.json +2 -2
  2. package/packages/config-commitlint/package.json +2 -2
  3. package/packages/config-eslint/index.js +7 -374
  4. package/packages/config-eslint/legacy.js +3 -0
  5. package/packages/config-eslint/node_modules/@eslint/eslintrc/LICENSE +19 -0
  6. package/packages/config-eslint/node_modules/@eslint/eslintrc/README.md +126 -0
  7. package/packages/config-eslint/node_modules/@eslint/eslintrc/conf/config-schema.js +79 -0
  8. package/packages/config-eslint/node_modules/@eslint/eslintrc/conf/environments.js +215 -0
  9. package/packages/config-eslint/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs +1143 -0
  10. package/packages/config-eslint/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map +1 -0
  11. package/packages/config-eslint/node_modules/@eslint/eslintrc/dist/eslintrc.cjs +4371 -0
  12. package/packages/config-eslint/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map +1 -0
  13. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js +532 -0
  14. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/config-array/config-array.js +510 -0
  15. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js +124 -0
  16. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js +145 -0
  17. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js +238 -0
  18. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/config-array/index.js +19 -0
  19. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js +225 -0
  20. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/config-array-factory.js +1155 -0
  21. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/flat-compat.js +318 -0
  22. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/index-universal.js +29 -0
  23. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/index.js +58 -0
  24. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/shared/ajv.js +191 -0
  25. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/shared/config-ops.js +135 -0
  26. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/shared/config-validator.js +370 -0
  27. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js +63 -0
  28. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/shared/naming.js +96 -0
  29. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js +42 -0
  30. package/packages/config-eslint/node_modules/@eslint/eslintrc/lib/shared/types.js +149 -0
  31. package/packages/config-eslint/node_modules/@eslint/eslintrc/package.json +82 -0
  32. package/packages/config-eslint/node_modules/@eslint/eslintrc/universal.js +9 -0
  33. package/packages/config-eslint/node_modules/ajv/.tonic_example.js +20 -0
  34. package/packages/config-eslint/node_modules/ajv/LICENSE +22 -0
  35. package/packages/config-eslint/node_modules/ajv/README.md +1497 -0
  36. package/packages/config-eslint/node_modules/ajv/dist/ajv.bundle.js +7189 -0
  37. package/packages/config-eslint/node_modules/ajv/dist/ajv.min.js +3 -0
  38. package/packages/config-eslint/node_modules/ajv/dist/ajv.min.js.map +1 -0
  39. package/packages/config-eslint/node_modules/ajv/lib/ajv.d.ts +397 -0
  40. package/packages/config-eslint/node_modules/ajv/lib/ajv.js +506 -0
  41. package/packages/config-eslint/node_modules/ajv/lib/cache.js +26 -0
  42. package/packages/config-eslint/node_modules/ajv/lib/compile/async.js +90 -0
  43. package/packages/config-eslint/node_modules/ajv/lib/compile/equal.js +5 -0
  44. package/packages/config-eslint/node_modules/ajv/lib/compile/error_classes.js +34 -0
  45. package/packages/config-eslint/node_modules/ajv/lib/compile/formats.js +142 -0
  46. package/packages/config-eslint/node_modules/ajv/lib/compile/index.js +387 -0
  47. package/packages/config-eslint/node_modules/ajv/lib/compile/resolve.js +270 -0
  48. package/packages/config-eslint/node_modules/ajv/lib/compile/rules.js +66 -0
  49. package/packages/config-eslint/node_modules/ajv/lib/compile/schema_obj.js +9 -0
  50. package/packages/config-eslint/node_modules/ajv/lib/compile/ucs2length.js +20 -0
  51. package/packages/config-eslint/node_modules/ajv/lib/compile/util.js +239 -0
  52. package/packages/config-eslint/node_modules/ajv/lib/data.js +49 -0
  53. package/packages/config-eslint/node_modules/ajv/lib/definition_schema.js +37 -0
  54. package/packages/config-eslint/node_modules/ajv/lib/dot/_limit.jst +113 -0
  55. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitItems.jst +12 -0
  56. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitLength.jst +12 -0
  57. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitProperties.jst +12 -0
  58. package/packages/config-eslint/node_modules/ajv/lib/dot/allOf.jst +32 -0
  59. package/packages/config-eslint/node_modules/ajv/lib/dot/anyOf.jst +46 -0
  60. package/packages/config-eslint/node_modules/ajv/lib/dot/coerce.def +51 -0
  61. package/packages/config-eslint/node_modules/ajv/lib/dot/comment.jst +9 -0
  62. package/packages/config-eslint/node_modules/ajv/lib/dot/const.jst +11 -0
  63. package/packages/config-eslint/node_modules/ajv/lib/dot/contains.jst +55 -0
  64. package/packages/config-eslint/node_modules/ajv/lib/dot/custom.jst +191 -0
  65. package/packages/config-eslint/node_modules/ajv/lib/dot/defaults.def +47 -0
  66. package/packages/config-eslint/node_modules/ajv/lib/dot/definitions.def +203 -0
  67. package/packages/config-eslint/node_modules/ajv/lib/dot/dependencies.jst +79 -0
  68. package/packages/config-eslint/node_modules/ajv/lib/dot/enum.jst +30 -0
  69. package/packages/config-eslint/node_modules/ajv/lib/dot/errors.def +194 -0
  70. package/packages/config-eslint/node_modules/ajv/lib/dot/format.jst +106 -0
  71. package/packages/config-eslint/node_modules/ajv/lib/dot/if.jst +73 -0
  72. package/packages/config-eslint/node_modules/ajv/lib/dot/items.jst +98 -0
  73. package/packages/config-eslint/node_modules/ajv/lib/dot/missing.def +39 -0
  74. package/packages/config-eslint/node_modules/ajv/lib/dot/multipleOf.jst +22 -0
  75. package/packages/config-eslint/node_modules/ajv/lib/dot/not.jst +43 -0
  76. package/packages/config-eslint/node_modules/ajv/lib/dot/oneOf.jst +54 -0
  77. package/packages/config-eslint/node_modules/ajv/lib/dot/pattern.jst +14 -0
  78. package/packages/config-eslint/node_modules/ajv/lib/dot/properties.jst +245 -0
  79. package/packages/config-eslint/node_modules/ajv/lib/dot/propertyNames.jst +52 -0
  80. package/packages/config-eslint/node_modules/ajv/lib/dot/ref.jst +85 -0
  81. package/packages/config-eslint/node_modules/ajv/lib/dot/required.jst +108 -0
  82. package/packages/config-eslint/node_modules/ajv/lib/dot/uniqueItems.jst +62 -0
  83. package/packages/config-eslint/node_modules/ajv/lib/dot/validate.jst +276 -0
  84. package/packages/config-eslint/node_modules/ajv/lib/dotjs/README.md +3 -0
  85. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limit.js +163 -0
  86. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitItems.js +80 -0
  87. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitLength.js +85 -0
  88. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitProperties.js +80 -0
  89. package/packages/config-eslint/node_modules/ajv/lib/dotjs/allOf.js +42 -0
  90. package/packages/config-eslint/node_modules/ajv/lib/dotjs/anyOf.js +73 -0
  91. package/packages/config-eslint/node_modules/ajv/lib/dotjs/comment.js +14 -0
  92. package/packages/config-eslint/node_modules/ajv/lib/dotjs/const.js +56 -0
  93. package/packages/config-eslint/node_modules/ajv/lib/dotjs/contains.js +81 -0
  94. package/packages/config-eslint/node_modules/ajv/lib/dotjs/custom.js +228 -0
  95. package/packages/config-eslint/node_modules/ajv/lib/dotjs/dependencies.js +168 -0
  96. package/packages/config-eslint/node_modules/ajv/lib/dotjs/enum.js +66 -0
  97. package/packages/config-eslint/node_modules/ajv/lib/dotjs/format.js +150 -0
  98. package/packages/config-eslint/node_modules/ajv/lib/dotjs/if.js +103 -0
  99. package/packages/config-eslint/node_modules/ajv/lib/dotjs/index.js +33 -0
  100. package/packages/config-eslint/node_modules/ajv/lib/dotjs/items.js +140 -0
  101. package/packages/config-eslint/node_modules/ajv/lib/dotjs/multipleOf.js +80 -0
  102. package/packages/config-eslint/node_modules/ajv/lib/dotjs/not.js +84 -0
  103. package/packages/config-eslint/node_modules/ajv/lib/dotjs/oneOf.js +73 -0
  104. package/packages/config-eslint/node_modules/ajv/lib/dotjs/pattern.js +75 -0
  105. package/packages/config-eslint/node_modules/ajv/lib/dotjs/properties.js +335 -0
  106. package/packages/config-eslint/node_modules/ajv/lib/dotjs/propertyNames.js +81 -0
  107. package/packages/config-eslint/node_modules/ajv/lib/dotjs/ref.js +124 -0
  108. package/packages/config-eslint/node_modules/ajv/lib/dotjs/required.js +270 -0
  109. package/packages/config-eslint/node_modules/ajv/lib/dotjs/uniqueItems.js +86 -0
  110. package/packages/config-eslint/node_modules/ajv/lib/dotjs/validate.js +482 -0
  111. package/packages/config-eslint/node_modules/ajv/lib/keyword.js +146 -0
  112. package/packages/config-eslint/node_modules/ajv/lib/refs/data.json +17 -0
  113. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json +149 -0
  114. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-06.json +154 -0
  115. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-07.json +168 -0
  116. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-secure.json +94 -0
  117. package/packages/config-eslint/node_modules/ajv/package.json +106 -0
  118. package/packages/config-eslint/node_modules/ajv/scripts/.eslintrc.yml +3 -0
  119. package/packages/config-eslint/node_modules/ajv/scripts/bundle.js +61 -0
  120. package/packages/config-eslint/node_modules/ajv/scripts/compile-dots.js +73 -0
  121. package/packages/config-eslint/node_modules/ajv/scripts/info +10 -0
  122. package/packages/config-eslint/node_modules/ajv/scripts/prepare-tests +12 -0
  123. package/packages/config-eslint/node_modules/ajv/scripts/publish-built-version +32 -0
  124. package/packages/config-eslint/node_modules/ajv/scripts/travis-gh-pages +23 -0
  125. package/packages/config-eslint/node_modules/eslint-visitor-keys/LICENSE +201 -0
  126. package/packages/config-eslint/node_modules/eslint-visitor-keys/README.md +105 -0
  127. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +384 -0
  128. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts +27 -0
  129. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/index.d.ts +16 -0
  130. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts +12 -0
  131. package/packages/config-eslint/node_modules/eslint-visitor-keys/lib/index.js +65 -0
  132. package/packages/config-eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.js +315 -0
  133. package/packages/config-eslint/node_modules/eslint-visitor-keys/package.json +74 -0
  134. package/packages/config-eslint/node_modules/espree/LICENSE +25 -0
  135. package/packages/config-eslint/node_modules/espree/README.md +244 -0
  136. package/packages/config-eslint/node_modules/espree/dist/espree.cjs +883 -0
  137. package/packages/config-eslint/node_modules/espree/espree.js +177 -0
  138. package/packages/config-eslint/node_modules/espree/lib/espree.js +349 -0
  139. package/packages/config-eslint/node_modules/espree/lib/features.js +27 -0
  140. package/packages/config-eslint/node_modules/espree/lib/options.js +123 -0
  141. package/packages/config-eslint/node_modules/espree/lib/token-translator.js +263 -0
  142. package/packages/config-eslint/node_modules/espree/lib/version.js +3 -0
  143. package/packages/config-eslint/node_modules/espree/package.json +86 -0
  144. package/packages/config-eslint/node_modules/globals/globals.json +1998 -0
  145. package/packages/config-eslint/node_modules/globals/index.d.ts +2077 -0
  146. package/packages/config-eslint/node_modules/globals/index.js +2 -0
  147. package/packages/config-eslint/node_modules/globals/license +9 -0
  148. package/packages/config-eslint/node_modules/globals/package.json +58 -0
  149. package/packages/config-eslint/node_modules/globals/readme.md +44 -0
  150. package/packages/config-eslint/node_modules/json-schema-traverse/.eslintrc.yml +27 -0
  151. package/packages/config-eslint/node_modules/json-schema-traverse/.travis.yml +8 -0
  152. package/packages/config-eslint/node_modules/json-schema-traverse/LICENSE +21 -0
  153. package/packages/config-eslint/node_modules/json-schema-traverse/README.md +83 -0
  154. package/packages/config-eslint/node_modules/json-schema-traverse/index.js +89 -0
  155. package/packages/config-eslint/node_modules/json-schema-traverse/package.json +43 -0
  156. package/packages/config-eslint/node_modules/json-schema-traverse/spec/.eslintrc.yml +6 -0
  157. package/packages/config-eslint/node_modules/json-schema-traverse/spec/fixtures/schema.js +125 -0
  158. package/packages/config-eslint/node_modules/json-schema-traverse/spec/index.spec.js +171 -0
  159. package/packages/config-eslint/package.json +7 -5
  160. package/packages/config-eslint/plugins/no-await-in-promise.js +2 -2
  161. package/packages/config-eslint/utils/create-config.js +377 -0
  162. package/packages/config-hooks/package.json +1 -1
  163. package/packages/config-htmllint/package.json +1 -1
  164. package/packages/config-markdownlint/package.json +2 -2
  165. package/packages/config-npmlint/package.json +1 -1
  166. package/packages/config-prettier/package.json +2 -2
  167. package/packages/config-stylelint/package.json +2 -2
  168. package/scripts/lint.eslint.sh +1 -1
  169. package/.eslintrc.cjs +0 -16
@@ -0,0 +1,263 @@
1
+ /**
2
+ * @fileoverview Translates tokens between Acorn format and Esprima format.
3
+ * @author Nicholas C. Zakas
4
+ */
5
+
6
+ //------------------------------------------------------------------------------
7
+ // Requirements
8
+ //------------------------------------------------------------------------------
9
+
10
+ // none!
11
+
12
+ //------------------------------------------------------------------------------
13
+ // Private
14
+ //------------------------------------------------------------------------------
15
+
16
+
17
+ // Esprima Token Types
18
+ const Token = {
19
+ Boolean: "Boolean",
20
+ EOF: "<end>",
21
+ Identifier: "Identifier",
22
+ PrivateIdentifier: "PrivateIdentifier",
23
+ Keyword: "Keyword",
24
+ Null: "Null",
25
+ Numeric: "Numeric",
26
+ Punctuator: "Punctuator",
27
+ String: "String",
28
+ RegularExpression: "RegularExpression",
29
+ Template: "Template",
30
+ JSXIdentifier: "JSXIdentifier",
31
+ JSXText: "JSXText"
32
+ };
33
+
34
+ /**
35
+ * Converts part of a template into an Esprima token.
36
+ * @param {AcornToken[]} tokens The Acorn tokens representing the template.
37
+ * @param {string} code The source code.
38
+ * @returns {EsprimaToken} The Esprima equivalent of the template token.
39
+ * @private
40
+ */
41
+ function convertTemplatePart(tokens, code) {
42
+ const firstToken = tokens[0],
43
+ lastTemplateToken = tokens[tokens.length - 1];
44
+
45
+ const token = {
46
+ type: Token.Template,
47
+ value: code.slice(firstToken.start, lastTemplateToken.end)
48
+ };
49
+
50
+ if (firstToken.loc) {
51
+ token.loc = {
52
+ start: firstToken.loc.start,
53
+ end: lastTemplateToken.loc.end
54
+ };
55
+ }
56
+
57
+ if (firstToken.range) {
58
+ token.start = firstToken.range[0];
59
+ token.end = lastTemplateToken.range[1];
60
+ token.range = [token.start, token.end];
61
+ }
62
+
63
+ return token;
64
+ }
65
+
66
+ /**
67
+ * Contains logic to translate Acorn tokens into Esprima tokens.
68
+ * @param {Object} acornTokTypes The Acorn token types.
69
+ * @param {string} code The source code Acorn is parsing. This is necessary
70
+ * to correct the "value" property of some tokens.
71
+ * @constructor
72
+ */
73
+ function TokenTranslator(acornTokTypes, code) {
74
+
75
+ // token types
76
+ this._acornTokTypes = acornTokTypes;
77
+
78
+ // token buffer for templates
79
+ this._tokens = [];
80
+
81
+ // track the last curly brace
82
+ this._curlyBrace = null;
83
+
84
+ // the source code
85
+ this._code = code;
86
+
87
+ }
88
+
89
+ TokenTranslator.prototype = {
90
+ constructor: TokenTranslator,
91
+
92
+ /**
93
+ * Translates a single Esprima token to a single Acorn token. This may be
94
+ * inaccurate due to how templates are handled differently in Esprima and
95
+ * Acorn, but should be accurate for all other tokens.
96
+ * @param {AcornToken} token The Acorn token to translate.
97
+ * @param {Object} extra Espree extra object.
98
+ * @returns {EsprimaToken} The Esprima version of the token.
99
+ */
100
+ translate(token, extra) {
101
+
102
+ const type = token.type,
103
+ tt = this._acornTokTypes;
104
+
105
+ if (type === tt.name) {
106
+ token.type = Token.Identifier;
107
+
108
+ // TODO: See if this is an Acorn bug
109
+ if (token.value === "static") {
110
+ token.type = Token.Keyword;
111
+ }
112
+
113
+ if (extra.ecmaVersion > 5 && (token.value === "yield" || token.value === "let")) {
114
+ token.type = Token.Keyword;
115
+ }
116
+
117
+ } else if (type === tt.privateId) {
118
+ token.type = Token.PrivateIdentifier;
119
+
120
+ } else if (type === tt.semi || type === tt.comma ||
121
+ type === tt.parenL || type === tt.parenR ||
122
+ type === tt.braceL || type === tt.braceR ||
123
+ type === tt.dot || type === tt.bracketL ||
124
+ type === tt.colon || type === tt.question ||
125
+ type === tt.bracketR || type === tt.ellipsis ||
126
+ type === tt.arrow || type === tt.jsxTagStart ||
127
+ type === tt.incDec || type === tt.starstar ||
128
+ type === tt.jsxTagEnd || type === tt.prefix ||
129
+ type === tt.questionDot ||
130
+ (type.binop && !type.keyword) ||
131
+ type.isAssign) {
132
+
133
+ token.type = Token.Punctuator;
134
+ token.value = this._code.slice(token.start, token.end);
135
+ } else if (type === tt.jsxName) {
136
+ token.type = Token.JSXIdentifier;
137
+ } else if (type.label === "jsxText" || type === tt.jsxAttrValueToken) {
138
+ token.type = Token.JSXText;
139
+ } else if (type.keyword) {
140
+ if (type.keyword === "true" || type.keyword === "false") {
141
+ token.type = Token.Boolean;
142
+ } else if (type.keyword === "null") {
143
+ token.type = Token.Null;
144
+ } else {
145
+ token.type = Token.Keyword;
146
+ }
147
+ } else if (type === tt.num) {
148
+ token.type = Token.Numeric;
149
+ token.value = this._code.slice(token.start, token.end);
150
+ } else if (type === tt.string) {
151
+
152
+ if (extra.jsxAttrValueToken) {
153
+ extra.jsxAttrValueToken = false;
154
+ token.type = Token.JSXText;
155
+ } else {
156
+ token.type = Token.String;
157
+ }
158
+
159
+ token.value = this._code.slice(token.start, token.end);
160
+ } else if (type === tt.regexp) {
161
+ token.type = Token.RegularExpression;
162
+ const value = token.value;
163
+
164
+ token.regex = {
165
+ flags: value.flags,
166
+ pattern: value.pattern
167
+ };
168
+ token.value = `/${value.pattern}/${value.flags}`;
169
+ }
170
+
171
+ return token;
172
+ },
173
+
174
+ /**
175
+ * Function to call during Acorn's onToken handler.
176
+ * @param {AcornToken} token The Acorn token.
177
+ * @param {Object} extra The Espree extra object.
178
+ * @returns {void}
179
+ */
180
+ onToken(token, extra) {
181
+
182
+ const tt = this._acornTokTypes,
183
+ tokens = extra.tokens,
184
+ templateTokens = this._tokens;
185
+
186
+ /**
187
+ * Flushes the buffered template tokens and resets the template
188
+ * tracking.
189
+ * @returns {void}
190
+ * @private
191
+ */
192
+ const translateTemplateTokens = () => {
193
+ tokens.push(convertTemplatePart(this._tokens, this._code));
194
+ this._tokens = [];
195
+ };
196
+
197
+ if (token.type === tt.eof) {
198
+
199
+ // might be one last curlyBrace
200
+ if (this._curlyBrace) {
201
+ tokens.push(this.translate(this._curlyBrace, extra));
202
+ }
203
+
204
+ return;
205
+ }
206
+
207
+ if (token.type === tt.backQuote) {
208
+
209
+ // if there's already a curly, it's not part of the template
210
+ if (this._curlyBrace) {
211
+ tokens.push(this.translate(this._curlyBrace, extra));
212
+ this._curlyBrace = null;
213
+ }
214
+
215
+ templateTokens.push(token);
216
+
217
+ // it's the end
218
+ if (templateTokens.length > 1) {
219
+ translateTemplateTokens();
220
+ }
221
+
222
+ return;
223
+ }
224
+ if (token.type === tt.dollarBraceL) {
225
+ templateTokens.push(token);
226
+ translateTemplateTokens();
227
+ return;
228
+ }
229
+ if (token.type === tt.braceR) {
230
+
231
+ // if there's already a curly, it's not part of the template
232
+ if (this._curlyBrace) {
233
+ tokens.push(this.translate(this._curlyBrace, extra));
234
+ }
235
+
236
+ // store new curly for later
237
+ this._curlyBrace = token;
238
+ return;
239
+ }
240
+ if (token.type === tt.template || token.type === tt.invalidTemplate) {
241
+ if (this._curlyBrace) {
242
+ templateTokens.push(this._curlyBrace);
243
+ this._curlyBrace = null;
244
+ }
245
+
246
+ templateTokens.push(token);
247
+ return;
248
+ }
249
+
250
+ if (this._curlyBrace) {
251
+ tokens.push(this.translate(this._curlyBrace, extra));
252
+ this._curlyBrace = null;
253
+ }
254
+
255
+ tokens.push(this.translate(token, extra));
256
+ }
257
+ };
258
+
259
+ //------------------------------------------------------------------------------
260
+ // Public
261
+ //------------------------------------------------------------------------------
262
+
263
+ export default TokenTranslator;
@@ -0,0 +1,3 @@
1
+ const version = "10.0.1";
2
+
3
+ export default version;
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "espree",
3
+ "description": "An Esprima-compatible JavaScript parser built on Acorn",
4
+ "author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
5
+ "homepage": "https://github.com/eslint/espree",
6
+ "main": "dist/espree.cjs",
7
+ "type": "module",
8
+ "exports": {
9
+ ".": [
10
+ {
11
+ "import": "./espree.js",
12
+ "require": "./dist/espree.cjs",
13
+ "default": "./dist/espree.cjs"
14
+ },
15
+ "./dist/espree.cjs"
16
+ ],
17
+ "./package.json": "./package.json"
18
+ },
19
+ "version": "10.0.1",
20
+ "files": [
21
+ "lib",
22
+ "dist/espree.cjs",
23
+ "espree.js"
24
+ ],
25
+ "engines": {
26
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
27
+ },
28
+ "repository": "eslint/espree",
29
+ "bugs": {
30
+ "url": "https://github.com/eslint/espree/issues"
31
+ },
32
+ "funding": "https://opencollective.com/eslint",
33
+ "license": "BSD-2-Clause",
34
+ "dependencies": {
35
+ "acorn": "^8.11.3",
36
+ "acorn-jsx": "^5.3.2",
37
+ "eslint-visitor-keys": "^4.0.0"
38
+ },
39
+ "devDependencies": {
40
+ "@rollup/plugin-commonjs": "^17.1.0",
41
+ "@rollup/plugin-json": "^4.1.0",
42
+ "@rollup/plugin-node-resolve": "^11.2.0",
43
+ "c8": "^7.11.0",
44
+ "chai": "^4.3.6",
45
+ "eslint": "^8.44.0",
46
+ "eslint-config-eslint": "^9.0.0",
47
+ "eslint-release": "^3.2.0",
48
+ "esprima-fb": "^8001.2001.0-dev-harmony-fb",
49
+ "globals": "^13.20.0",
50
+ "lint-staged": "^13.2.0",
51
+ "mocha": "^9.2.2",
52
+ "npm-run-all": "^4.1.5",
53
+ "rollup": "^2.41.2",
54
+ "shelljs": "^0.3.0",
55
+ "yorkie": "^2.0.0"
56
+ },
57
+ "keywords": [
58
+ "ast",
59
+ "ecmascript",
60
+ "javascript",
61
+ "parser",
62
+ "syntax",
63
+ "acorn"
64
+ ],
65
+ "gitHooks": {
66
+ "pre-commit": "lint-staged"
67
+ },
68
+ "scripts": {
69
+ "build": "rollup -c rollup.config.js",
70
+ "build:debug": "npm run build -- -m",
71
+ "build:docs": "node tools/sync-docs.js",
72
+ "build:update-version": "node tools/update-version.js",
73
+ "lint": "eslint . --report-unused-disable-directives",
74
+ "lint:fix": "npm run lint -- --fix",
75
+ "prepublishOnly": "npm run build:update-version && npm run build",
76
+ "pretest": "npm run build",
77
+ "release:generate:latest": "eslint-generate-release",
78
+ "release:generate:alpha": "eslint-generate-prerelease alpha",
79
+ "release:generate:beta": "eslint-generate-prerelease beta",
80
+ "release:generate:rc": "eslint-generate-prerelease rc",
81
+ "release:publish": "eslint-publish-release",
82
+ "test": "npm-run-all -s test:*",
83
+ "test:esm": "c8 mocha --color --reporter progress --timeout 30000 'tests/lib/**/*.js'",
84
+ "test:cjs": "mocha --color --reporter progress --timeout 30000 tests/lib/commonjs.cjs"
85
+ }
86
+ }