eslint-plugin-formatjs 6.4.18 → 6.4.20

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.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { ESLint, Linter } from "eslint";
2
-
3
2
  //#region packages/eslint-plugin-formatjs/index.d.ts
4
3
  type Plugin = {
5
4
  meta: {
package/index.js CHANGED
@@ -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.18";
4541
+ var version$1 = "6.4.20";
4542
4542
  var description = "ESLint plugin for formatjs";
4543
4543
  var keywords = [
4544
4544
  "eslint",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-formatjs",
3
- "version": "6.4.18",
3
+ "version": "6.4.20",
4
4
  "description": "ESLint plugin for formatjs",
5
5
  "keywords": [
6
6
  "eslint",
@@ -24,8 +24,8 @@
24
24
  "./util": "./util.js"
25
25
  },
26
26
  "dependencies": {
27
- "@formatjs/icu-messageformat-parser": "3.5.14",
28
- "@formatjs/ts-transformer": "4.4.16",
27
+ "@formatjs/icu-messageformat-parser": "3.5.16",
28
+ "@formatjs/ts-transformer": "4.4.18",
29
29
  "@types/estree-jsx": "1",
30
30
  "@types/picomatch": "4",
31
31
  "@unicode/unicode-17.0.0": "1",
package/util.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { MessageFormatElement } from "@formatjs/icu-messageformat-parser";
2
2
  import { Rule } from "eslint";
3
-
4
3
  //#region node_modules/.aspect_rules_js/@types+estree@1.0.9/node_modules/@types/estree/index.d.ts
5
4
  // This definition file follows a somewhat unusual format. ESTree allows
6
5
  // runtime type checks based on the `type` parameter. In order to explain this
@@ -85,7 +84,8 @@ interface Directive extends BaseNode {
85
84
  interface BaseFunction extends BaseNode {
86
85
  params: Pattern[];
87
86
  generator?: boolean | undefined;
88
- async?: boolean | undefined; // The body is either BlockStatement or Expression because arrow functions
87
+ async?: boolean | undefined;
88
+ // The body is either BlockStatement or Expression because arrow functions
89
89
  // can have a body that's either. FunctionDeclarations and
90
90
  // FunctionExpressions have only BlockStatement bodies.
91
91
  body: BlockStatement | Expression;
@@ -406,7 +406,8 @@ interface TemplateElement extends BaseNode {
406
406
  type: "TemplateElement";
407
407
  tail: boolean;
408
408
  value: {
409
- /** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */cooked?: string | null | undefined;
409
+ /** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */
410
+ cooked?: string | null | undefined;
410
411
  raw: string;
411
412
  };
412
413
  }
@@ -638,21 +639,15 @@ interface MessageDescriptorNodeInfo {
638
639
  idValueNode?: Property["value"] | JSXAttribute["value"];
639
640
  idPropNode?: Property | JSXAttribute;
640
641
  }
641
- declare function getSettings({
642
- settings
643
- }: Rule.RuleContext): Settings;
642
+ declare function getSettings({ settings }: Rule.RuleContext): Settings;
644
643
  declare function isIntlFormatMessageCall(node: Node): boolean;
645
644
  declare function extractMessageDescriptor(node?: Expression): MessageDescriptorNodeInfo | undefined;
646
- declare function extractMessages(node: Node, {
647
- additionalComponentNames,
648
- additionalFunctionNames,
649
- excludeMessageDeclCalls
650
- }?: Settings): Array<[MessageDescriptorNodeInfo, Expression | undefined]>;
645
+ declare function extractMessages(node: Node, { additionalComponentNames, additionalFunctionNames, excludeMessageDeclCalls }?: Settings): Array<[MessageDescriptorNodeInfo, Expression | undefined]>;
651
646
  /**
652
- * Apply changes to the ICU message in code. The return value can be used in
653
- * `fixer.replaceText(messageNode, <return value>)`. If the return value is null,
654
- * it means that the patch cannot be applied.
655
- */
647
+ * Apply changes to the ICU message in code. The return value can be used in
648
+ * `fixer.replaceText(messageNode, <return value>)`. If the return value is null,
649
+ * it means that the patch cannot be applied.
650
+ */
656
651
  declare function patchMessage(messageNode: Node, ast: MessageFormatElement[], patcher: (messageContent: string, ast: MessageFormatElement[]) => string): string | null;
657
652
  //#endregion
658
653
  export { MessageDescriptor, MessageDescriptorNodeInfo, Settings, extractMessageDescriptor, extractMessages, getSettings, isIntlFormatMessageCall, patchMessage };