@zohodesk/codestandard-validator 1.2.4-exp-3 → 1.2.4-exp-4

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.
@@ -45,7 +45,8 @@ function getServicePathElseCommon() {
45
45
  configurationPath: resolveServiceOrCommon(baseDir, repoName, 'index.js'),
46
46
  pathOfServiceSpecificEslintConfigFile: resolveServiceOrCommon(baseDir, repoName, '.eslintrc.js'),
47
47
  pluginVersionPath: resolveServiceOrCommon(baseDir, repoName, 'pluginVersion.js', null) || undefined,
48
- pathOfServiceSpecificCssConfigFile: resolveServiceOrCommon(baseDir, repoName, '.stylelintrc.js')
48
+ pathOfServiceSpecificCssConfigFile: resolveServiceOrCommon(baseDir, repoName, '.stylelintrc.js'),
49
+ initializationPath: resolveServiceOrCommon(baseDir, repoName, 'initializeScript.js')
49
50
  };
50
51
  }
51
52
  function getLintConfigurationUtil() {
@@ -15,11 +15,11 @@ function initConfig(actualConfigPath) {
15
15
  process.env.TOOL_TOKEN = config.toolToken;
16
16
  try {
17
17
  const {
18
- configurationPath
18
+ initializationPath
19
19
  } = getServicePathElseCommon();
20
20
  const {
21
21
  intialize
22
- } = require(configurationPath);
22
+ } = require(initializationPath);
23
23
  intialize();
24
24
  } catch (error) {
25
25
  Logger.log(Logger.FAILURE_TYPE, `Error while initialize configuration: ${error}`);
@@ -32,7 +32,10 @@ function getAllPlugins() {
32
32
  } else {
33
33
  serviceSpecificPlugins = [];
34
34
  }
35
- return [...commonPlugins, ...serviceSpecificPlugins];
35
+ if (!Array.isArray(commonPlugins) || !Array.isArray(serviceSpecificPlugins)) {
36
+ Logger.log(Logger.FAILURE_TYPE, 'Plugin details should be in an array format in pluginVersion.js file');
37
+ }
38
+ return Object.assign([], commonPlugins, serviceSpecificPlugins);
36
39
  }
37
40
 
38
41
  /**
package/changeLog.md CHANGED
@@ -47,3 +47,7 @@
47
47
 
48
48
  1. ProjectId api revamp
49
49
  2. code standard analytics bin bind to code standard validator bin
50
+
51
+ # 1.1.5
52
+
53
+ 1. Refactor configuration loading and linting process, update mandatory rules handling, and improve pre-commit hook functionality
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/codestandard-validator",
3
- "version": "1.2.4-exp-3",
3
+ "version": "1.2.4-exp-4",
4
4
  "description": "library to enforce code standard using eslint",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,7 +17,7 @@
17
17
  "type": "commonjs",
18
18
  "dependencies": {
19
19
  "@zohodesk-private/client_deployment_tool": "0.0.5",
20
- "@zohodesk/codestandard-analytics": "1.1.4-exp-2",
20
+ "@zohodesk/codestandard-analytics": "1.1.5",
21
21
  "@stryker-mutator/core": "5.0.0",
22
22
  "eslint": "8.26.0",
23
23
  "marked": "9.1.6",