@zohodesk/codestandard-validator 0.0.4-exp-18 → 0.0.4-exp-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.
|
@@ -10,15 +10,20 @@ const {
|
|
|
10
10
|
const {
|
|
11
11
|
Logger
|
|
12
12
|
} = require('../Logger/Logger');
|
|
13
|
+
const {
|
|
14
|
+
existsSync
|
|
15
|
+
} = require("fs");
|
|
13
16
|
function createVersionControlFile(uninstalledPlugins) {
|
|
14
17
|
Logger.log(Logger.INFO_TYPE, `Rule Plugin Versions are Noted in pluginVersionControl.js`);
|
|
15
18
|
const versionfilePath = path.join(getNodeModulesPath(), 'node_modules', '@zohodesk', 'codestandard-validator', 'pluginVersionControl.js');
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
if (existsSync(versionfilePath)) {
|
|
20
|
+
writeFileSync(versionfilePath, `module.exports.plugins = [${uninstalledPlugins.map(plugin => {
|
|
21
|
+
return JSON.stringify({
|
|
22
|
+
plugin: `${plugin}`,
|
|
23
|
+
time: `${new Date()}`
|
|
24
|
+
});
|
|
25
|
+
}).join(',')}]`);
|
|
26
|
+
}
|
|
22
27
|
}
|
|
23
28
|
module.exports = {
|
|
24
29
|
createVersionControlFile
|
|
@@ -54,11 +54,10 @@ function getConfigurationPrecommit() {
|
|
|
54
54
|
* @returns {Array<string>}
|
|
55
55
|
*/
|
|
56
56
|
function getSupportedLanguage() {
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
_language
|
|
61
|
-
_language.push('.tsx');
|
|
57
|
+
const {
|
|
58
|
+
supportedExtensions
|
|
59
|
+
} = getConfigurationPrecommit();
|
|
60
|
+
const _language = supportedExtensions;
|
|
62
61
|
return _language;
|
|
63
62
|
}
|
|
64
63
|
function getRunningEnv() {
|