@bigbinary/eslint-plugin-neeto 1.1.11 → 1.1.12

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 (2) hide show
  1. package/dist/index.js +10 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -461,7 +461,7 @@
461
461
  return "Use \"".concat(functionName, "\" from \"@bigbinary/neeto-commons-frontend/").concat(utilType, "\" instead. Refer: ").concat(url);
462
462
  };
463
463
  var suggestCommonConstants = function suggestCommonConstants(constantName, repository) {
464
- return "Use \"".concat(constantName, "\" from \"@bigbinary/").concat(repository, "/constants\"");
464
+ return "Use \"".concat(constantName, "\" from \"@bigbinary/").concat(repository, "\"");
465
465
  };
466
466
  var addRequiredPeerDependencies$1 = function addRequiredPeerDependencies(packageName) {
467
467
  return "".concat(packageName, " should be added to peerDependencies");
@@ -8096,8 +8096,8 @@
8096
8096
  };
8097
8097
 
8098
8098
  var IMPORT_SOURCES = {
8099
- "neeto-commons-frontend": "neetocommons/constants",
8100
- "neeto-team-members-frontend": "neetoteam/constants"
8099
+ "neeto-commons-frontend/constants": ["neetocommons/constants", "@bigbinary/neeto-commons-frontend/constants"],
8100
+ "neeto-team-members-frontend": ["neetoteam", "@bigbinary/neeto-team-members-frontend"]
8101
8101
  };
8102
8102
  var TRANSLATION_VERBS_PATTERN = {
8103
8103
  type: TYPES.OBJECT_EXPRESSION,
@@ -8128,7 +8128,9 @@
8128
8128
  },
8129
8129
  source: {
8130
8130
  type: TYPES.LITERAL,
8131
- value: IMPORT_SOURCES[repository]
8131
+ value: function value(_value2) {
8132
+ return ramda.includes(_value2, IMPORT_SOURCES[repository]);
8133
+ }
8132
8134
  }
8133
8135
  };
8134
8136
  };
@@ -8185,14 +8187,14 @@
8185
8187
  var checkTranslationVerbs = function checkTranslationVerbs(node, context) {
8186
8188
  var _parentNode$callee;
8187
8189
  var parentNode = node.parent;
8188
- var repository = "neeto-commons-frontend";
8190
+ var repository = "neeto-commons-frontend/constants";
8189
8191
  var isCommonConstant = parentNode.type === TYPES.VARIABLE_DECLARATOR ? pure.matches(TRANSLATION_VERBS_PATTERN, parentNode.init) : ((_parentNode$callee = parentNode.callee) === null || _parentNode$callee === void 0 ? void 0 : _parentNode$callee.name) === "t" && !pure.existsBy(constantImportPattern(node.name, repository), getAllImports(node));
8190
8192
  if (isCommonConstant) {
8191
8193
  reportIssue({
8192
8194
  node: node,
8193
8195
  repository: repository,
8194
8196
  context: context,
8195
- constantName: "TRANSLATION_".concat(node.name)
8197
+ constantName: node.name
8196
8198
  });
8197
8199
  }
8198
8200
  };
@@ -8201,7 +8203,7 @@
8201
8203
  meta: {
8202
8204
  type: "suggestion",
8203
8205
  docs: {
8204
- url: "",
8206
+ url: "https://github.com/bigbinary/eslint-plugin-neeto/blob/main/docs/src/rules/use-common-constants.md",
8205
8207
  description: "Suggests using common constants from neeto-team-members and neeto-commons-frontend repos"
8206
8208
  }
8207
8209
  },
@@ -8215,7 +8217,7 @@
8215
8217
  checkAndReport({
8216
8218
  node: node,
8217
8219
  constants: neetoCommonsConstants__namespace,
8218
- repository: "neeto-commons-frontend",
8220
+ repository: "neeto-commons-frontend/constants",
8219
8221
  context: context
8220
8222
  });
8221
8223
  checkAndReport({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/eslint-plugin-neeto",
3
- "version": "1.1.11",
3
+ "version": "1.1.12",
4
4
  "main": "dist/index.js",
5
5
  "license": "UNLICENSED",
6
6
  "scripts": {