eslint-plugin-formatjs 5.2.4 → 5.2.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-formatjs",
3
- "version": "5.2.4",
3
+ "version": "5.2.5",
4
4
  "description": "ESLint plugin for formatjs",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -28,8 +28,8 @@
28
28
  "picomatch": "2 || 3 || 4",
29
29
  "tslib": "2",
30
30
  "unicode-emoji-utils": "^1.2.0",
31
- "@formatjs/ts-transformer": "3.13.23",
32
- "@formatjs/icu-messageformat-parser": "2.9.4"
31
+ "@formatjs/icu-messageformat-parser": "2.9.4",
32
+ "@formatjs/ts-transformer": "3.13.23"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "eslint": "9"
@@ -91,14 +91,14 @@ function checkNode(context, node) {
91
91
  }
92
92
  }
93
93
  }
94
- const createRule = utils_1.ESLintUtils.RuleCreator(_ => 'https://formatjs.io/docs/tooling/linter#blocklist-elements');
94
+ const createRule = utils_1.ESLintUtils.RuleCreator(_ => 'https://formatjs.github.io/docs/tooling/linter#blocklist-elements');
95
95
  exports.rule = createRule({
96
96
  name: exports.name,
97
97
  meta: {
98
98
  type: 'problem',
99
99
  docs: {
100
100
  description: 'Disallow specific elements in ICU message format',
101
- url: 'https://formatjs.io/docs/tooling/linter#blocklist-elements',
101
+ url: 'https://formatjs.github.io/docs/tooling/linter#blocklist-elements',
102
102
  },
103
103
  fixable: 'code',
104
104
  schema: [
@@ -34,7 +34,7 @@ exports.rule = {
34
34
  type: 'problem',
35
35
  docs: {
36
36
  description: 'Enforce defaultMessage in message descriptor',
37
- url: 'https://formatjs.io/docs/tooling/linter#enforce-default-message',
37
+ url: 'https://formatjs.github.io/docs/tooling/linter#enforce-default-message',
38
38
  },
39
39
  fixable: 'code',
40
40
  schema: [
@@ -34,7 +34,7 @@ exports.rule = {
34
34
  type: 'problem',
35
35
  docs: {
36
36
  description: 'Enforce description in message descriptor',
37
- url: 'https://formatjs.io/docs/tooling/linter#enforce-description',
37
+ url: 'https://formatjs.github.io/docs/tooling/linter#enforce-description',
38
38
  },
39
39
  fixable: 'code',
40
40
  schema: [
@@ -88,7 +88,7 @@ exports.rule = {
88
88
  type: 'problem',
89
89
  docs: {
90
90
  description: 'Enforce (generated) ID in message descriptor',
91
- url: 'https://formatjs.io/docs/tooling/linter#enforce-id',
91
+ url: 'https://formatjs.github.io/docs/tooling/linter#enforce-id',
92
92
  },
93
93
  fixable: 'code',
94
94
  schema: [
@@ -107,7 +107,7 @@ exports.rule = {
107
107
  type: 'problem',
108
108
  docs: {
109
109
  description: 'Enforce that all messages with placeholders have enough passed-in values',
110
- url: 'https://formatjs.io/docs/tooling/linter#enforce-placeholders',
110
+ url: 'https://formatjs.github.io/docs/tooling/linter#enforce-placeholders',
111
111
  },
112
112
  schema: [
113
113
  {
@@ -65,7 +65,7 @@ exports.rule = {
65
65
  type: 'problem',
66
66
  docs: {
67
67
  description: 'Enforce plural rules to always specify certain categories like `one`/`other`',
68
- url: 'https://formatjs.io/docs/tooling/linter#enforce-plural-rules',
68
+ url: 'https://formatjs.github.io/docs/tooling/linter#enforce-plural-rules',
69
69
  },
70
70
  fixable: 'code',
71
71
  schema: [
@@ -50,7 +50,7 @@ exports.rule = {
50
50
  type: 'problem',
51
51
  docs: {
52
52
  description: 'Disallow camel case placeholders in message',
53
- url: 'https://formatjs.io/docs/tooling/linter#no-camel-case',
53
+ url: 'https://formatjs.github.io/docs/tooling/linter#no-camel-case',
54
54
  },
55
55
  fixable: 'code',
56
56
  schema: [],
@@ -99,7 +99,7 @@ results in 2 sentences: "I have a dog" & "I have many dogs".
99
99
  Default complexity limit is 20
100
100
  (using Smartling as a reference: https://help.smartling.com/hc/en-us/articles/360008030994-ICU-MessageFormat)
101
101
  `,
102
- url: 'https://formatjs.io/docs/tooling/linter#no-complex-selectors',
102
+ url: 'https://formatjs.github.io/docs/tooling/linter#no-complex-selectors',
103
103
  },
104
104
  schema: [
105
105
  {
package/rules/no-emoji.js CHANGED
@@ -66,7 +66,7 @@ exports.rule = {
66
66
  type: 'problem',
67
67
  docs: {
68
68
  description: 'Disallow emojis in message',
69
- url: 'https://formatjs.io/docs/tooling/linter#no-emoji',
69
+ url: 'https://formatjs.github.io/docs/tooling/linter#no-emoji',
70
70
  },
71
71
  fixable: 'code',
72
72
  schema: [
package/rules/no-id.js CHANGED
@@ -32,7 +32,7 @@ exports.rule = {
32
32
  type: 'problem',
33
33
  docs: {
34
34
  description: 'Ban explicit ID from MessageDescriptor',
35
- url: 'https://formatjs.io/docs/tooling/linter#no-id',
35
+ url: 'https://formatjs.github.io/docs/tooling/linter#no-id',
36
36
  },
37
37
  fixable: 'code',
38
38
  schema: [],
@@ -41,7 +41,7 @@ exports.rule = {
41
41
  type: 'problem',
42
42
  docs: {
43
43
  description: 'Disallow untranslated literal strings without translation.',
44
- url: 'https://formatjs.io/docs/tooling/linter#no-literal-string-in-jsx',
44
+ url: 'https://formatjs.github.io/docs/tooling/linter#no-literal-string-in-jsx',
45
45
  },
46
46
  schema: [
47
47
  {
@@ -74,7 +74,7 @@ exports.rule = {
74
74
  type: 'problem',
75
75
  docs: {
76
76
  description: 'We use `one {# item}` instead of `one {1 item}` in ICU messages as some locales use the `one` formatting for other similar numbers.',
77
- url: 'https://formatjs.io/docs/tooling/linter#no-explicit-icu-plural',
77
+ url: 'https://formatjs.github.io/docs/tooling/linter#no-explicit-icu-plural',
78
78
  },
79
79
  fixable: 'code',
80
80
  messages: {
@@ -44,7 +44,7 @@ exports.rule = {
44
44
  type: 'problem',
45
45
  docs: {
46
46
  description: 'Disallow multiple plural rules in the same message',
47
- url: 'https://formatjs.io/docs/tooling/linter#no-multiple-plurals',
47
+ url: 'https://formatjs.github.io/docs/tooling/linter#no-multiple-plurals',
48
48
  },
49
49
  fixable: 'code',
50
50
  schema: [],
@@ -114,7 +114,7 @@ exports.rule = {
114
114
  type: 'problem',
115
115
  docs: {
116
116
  description: 'Prevents usage of multiple consecutive whitespaces in message',
117
- url: 'https://formatjs.io/docs/tooling/linter#no-multiple-whitespaces',
117
+ url: 'https://formatjs.github.io/docs/tooling/linter#no-multiple-whitespaces',
118
118
  },
119
119
  messages: {
120
120
  noMultipleWhitespaces: 'Multiple consecutive whitespaces are not allowed',
@@ -43,7 +43,7 @@ exports.rule = {
43
43
  type: 'problem',
44
44
  docs: {
45
45
  description: 'Disallow offset in plural rules',
46
- url: 'https://formatjs.io/docs/tooling/linter#no-offset',
46
+ url: 'https://formatjs.github.io/docs/tooling/linter#no-offset',
47
47
  },
48
48
  fixable: 'code',
49
49
  messages: {
@@ -42,7 +42,7 @@ exports.rule = {
42
42
  type: 'problem',
43
43
  docs: {
44
44
  description: 'Disallow unnecessary formatted message',
45
- url: 'https://formatjs.io/docs/tooling/linter#no-useless-message',
45
+ url: 'https://formatjs.github.io/docs/tooling/linter#no-useless-message',
46
46
  },
47
47
  fixable: 'code',
48
48
  schema: [],
@@ -8,7 +8,7 @@ exports.rule = {
8
8
  type: 'suggestion',
9
9
  docs: {
10
10
  description: 'Prefer `FormattedMessage` component over `intl.formatMessage` if applicable.',
11
- url: 'https://formatjs.io/docs/tooling/linter#prefer-formatted-message',
11
+ url: 'https://formatjs.github.io/docs/tooling/linter#prefer-formatted-message',
12
12
  },
13
13
  messages: {
14
14
  jsxChildren: 'Prefer `FormattedMessage` over `intl.formatMessage` in the JSX children expression.',
@@ -164,7 +164,7 @@ exports.rule = {
164
164
  type: 'suggestion',
165
165
  docs: {
166
166
  description: 'Prefer using # to reference the count in the plural argument.',
167
- url: 'https://formatjs.io/docs/tooling/linter#prefer-pound-in-plurals',
167
+ url: 'https://formatjs.github.io/docs/tooling/linter#prefer-pound-in-plurals',
168
168
  },
169
169
  messages: {
170
170
  preferPoundInPlurals: 'Prefer using # to reference the count in the plural argument instead of repeating the argument.',