eslint-plugin-formatjs 6.4.15 → 6.4.17
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.
- package/index.js +6 -6
- package/index.js.map +1 -1
- package/package.json +7 -4
- package/util.js +5 -5
- package/util.js.map +1 -1
package/index.js
CHANGED
|
@@ -17,13 +17,13 @@ var __exportAll = (all, no_symbols) => {
|
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region packages/eslint-plugin-formatjs/util.ts
|
|
20
|
-
const FORMAT_FUNCTION_NAMES = new Set([
|
|
20
|
+
const FORMAT_FUNCTION_NAMES = /* @__PURE__ */ new Set([
|
|
21
21
|
"$formatMessage",
|
|
22
22
|
"formatMessage",
|
|
23
23
|
"$t"
|
|
24
24
|
]);
|
|
25
|
-
const COMPONENT_NAMES = new Set(["FormattedMessage"]);
|
|
26
|
-
const DECLARATION_FUNCTION_NAMES = new Set(["defineMessage"]);
|
|
25
|
+
const COMPONENT_NAMES = /* @__PURE__ */ new Set(["FormattedMessage"]);
|
|
26
|
+
const DECLARATION_FUNCTION_NAMES = /* @__PURE__ */ new Set(["defineMessage"]);
|
|
27
27
|
function getSettings({ settings }) {
|
|
28
28
|
return settings.formatjs ?? settings;
|
|
29
29
|
}
|
|
@@ -187,8 +187,8 @@ function extractMessageDescriptors(node) {
|
|
|
187
187
|
return msgs;
|
|
188
188
|
}
|
|
189
189
|
function extractMessages(node, { additionalComponentNames, additionalFunctionNames, excludeMessageDeclCalls } = {}) {
|
|
190
|
-
const allFormatFunctionNames = Array.isArray(additionalFunctionNames) ? new Set([...Array.from(FORMAT_FUNCTION_NAMES), ...additionalFunctionNames]) : FORMAT_FUNCTION_NAMES;
|
|
191
|
-
const allComponentNames = Array.isArray(additionalComponentNames) ? new Set([...Array.from(COMPONENT_NAMES), ...additionalComponentNames]) : COMPONENT_NAMES;
|
|
190
|
+
const allFormatFunctionNames = Array.isArray(additionalFunctionNames) ? /* @__PURE__ */ new Set([...Array.from(FORMAT_FUNCTION_NAMES), ...additionalFunctionNames]) : FORMAT_FUNCTION_NAMES;
|
|
191
|
+
const allComponentNames = Array.isArray(additionalComponentNames) ? /* @__PURE__ */ new Set([...Array.from(COMPONENT_NAMES), ...additionalComponentNames]) : COMPONENT_NAMES;
|
|
192
192
|
if (node.type === "CallExpression") {
|
|
193
193
|
const args0 = node.arguments[0];
|
|
194
194
|
const args1 = node.arguments[1];
|
|
@@ -4538,7 +4538,7 @@ var package_exports = /* @__PURE__ */ __exportAll({
|
|
|
4538
4538
|
version: () => version$1
|
|
4539
4539
|
});
|
|
4540
4540
|
var name$1 = "eslint-plugin-formatjs";
|
|
4541
|
-
var version$1 = "6.4.
|
|
4541
|
+
var version$1 = "6.4.17";
|
|
4542
4542
|
var description = "ESLint plugin for formatjs";
|
|
4543
4543
|
var keywords = [
|
|
4544
4544
|
"eslint",
|