@zohodesk/codestandard-validator 0.0.7-exp-12 → 0.0.7-exp-13
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.
|
@@ -89,12 +89,17 @@ function filterDeltedFileFromStagedFiles(files) {
|
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
async function lintFiles(filePath) {
|
|
92
|
-
switch (path.extname(filePath)) {
|
|
93
|
-
case '.js'
|
|
92
|
+
switch (String(path.extname(filePath))) {
|
|
93
|
+
case '.js':
|
|
94
|
+
case '.ts':
|
|
95
|
+
case '.tsx':
|
|
96
|
+
case '.jsx':
|
|
97
|
+
case '.properties':
|
|
94
98
|
{
|
|
95
99
|
return await findEslintErrors(filePath);
|
|
96
100
|
}
|
|
97
|
-
case '.css'
|
|
101
|
+
case '.css':
|
|
102
|
+
case '.scss':
|
|
98
103
|
{
|
|
99
104
|
return await findStyleLintErrors(filePath);
|
|
100
105
|
}
|
package/build/hooks/hook.js
CHANGED
|
@@ -17,6 +17,7 @@ const {
|
|
|
17
17
|
const {
|
|
18
18
|
installPlugins
|
|
19
19
|
} = require("../utils/PluginsInstallation/installPlugins");
|
|
20
|
+
const path = require("path");
|
|
20
21
|
async function hooks() {
|
|
21
22
|
var jsonFilePath = path.join(__dirname, '..', '..', 'jsonUtils', 'fsUtils.json');
|
|
22
23
|
if (!(getLastCommitHash() == getStoredCommitHash())) {
|
|
@@ -24,7 +24,7 @@ function filterFiles(arrayOfFilesToBeFiltered, filesToBeRemoved, isConfigFileNee
|
|
|
24
24
|
if (currentFile.includes('.feature') && existsSync(currentFile)) {
|
|
25
25
|
files.featureFiles.push(currentFile);
|
|
26
26
|
}
|
|
27
|
-
if (currentFile.includes('.js') || currentFile.includes('.ts') || currentFile.includes('.tsx') || currentFile.includes('.jsx') && existsSync(currentFile)) {
|
|
27
|
+
if (currentFile.includes('.js') || currentFile.includes('.ts') || currentFile.includes('.tsx') || currentFile.includes('.jsx') || currentFile.includes('.properties') && existsSync(currentFile)) {
|
|
28
28
|
files.JsFiles.push(currentFile);
|
|
29
29
|
}
|
|
30
30
|
if (currentFile.includes('.css') && existsSync(currentFile)) {
|