@discord/eslint-plugin-discord-intl 0.28.1 → 0.29.1

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 CHANGED
@@ -12,6 +12,7 @@ module.exports = {
12
12
  'no-unicode-variable-names': NativeRules.NoUnicodeVariableNames,
13
13
  'no-unnecessary-plural': NativeRules.NoUnnecessaryPlural,
14
14
  'no-unsafe-variable-syntax': NativeRules.NoUnsafeVariableSyntax,
15
+ 'no-variable-type-mismatches': NativeRules.NoVariableTypeMismatches,
15
16
 
16
17
  'use-static-access': require('./rules/use-static-access'),
17
18
  'no-opaque-messages-objects': require('./rules/no-opaque-messages-objects'),
@@ -32,6 +33,7 @@ module.exports = {
32
33
  '@discord/discord-intl/no-unicode-variable-names': 'error',
33
34
  '@discord/discord-intl/no-unnecessary-plural': 'error',
34
35
  '@discord/discord-intl/no-unsafe-variable-syntax': 'error',
36
+ '@discord/discord-intl/no-variable-type-mismatches': 'error',
35
37
 
36
38
  // JS rules
37
39
  '@discord/discord-intl/use-static-access': 'error',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@discord/eslint-plugin-discord-intl",
3
- "version": "0.28.1",
3
+ "version": "0.29.1",
4
4
  "license": "MIT",
5
5
  "type": "commonjs",
6
6
  "description": "ESLint plugin for validating and linting messages and translations using @discord/intl",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@typescript-eslint/scope-manager": "^8.8.1",
14
- "@discord/intl-message-database": "0.28.1"
14
+ "@discord/intl-message-database": "0.29.1"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@types/eslint": "^8.56.12",
@@ -140,6 +140,17 @@ const NoUnsafeVariableSyntax = createNativeRule({
140
140
  },
141
141
  },
142
142
  });
143
+ const NoVariableTypeMismatches = createNativeRule({
144
+ diagnosticName: 'NoVariableTypeMismatches',
145
+ meta: {
146
+ fixable: 'code',
147
+ docs: {
148
+ description:
149
+ 'Disallow variable type changes between source and translation strings',
150
+ category: 'Correctness',
151
+ },
152
+ },
153
+ });
143
154
 
144
155
  module.exports = {
145
156
  NoAvoidableExactPlurals,
@@ -153,5 +164,6 @@ module.exports = {
153
164
  NoUnicodeVariableNames,
154
165
  NoUnnecessaryPlural,
155
166
  NoUnsafeVariableSyntax,
167
+ NoVariableTypeMismatches,
156
168
  createNativeRule,
157
169
  };