@apdesign/code-style-react 1.0.2 โ 1.0.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.
- package/package.json +1 -1
- package/scripts/buildEslint.sh +14 -7
- package/scripts/buildStylelint.sh +13 -9
package/package.json
CHANGED
package/scripts/buildEslint.sh
CHANGED
@@ -27,15 +27,22 @@ fi
|
|
27
27
|
echo "๐ Changed files:"
|
28
28
|
echo "$DIFF_FILES"
|
29
29
|
|
30
|
-
FILE_COUNT=$(echo "$DIFF_FILES" | wc -
|
30
|
+
FILE_COUNT=$(echo "$DIFF_FILES" | wc -l)
|
31
31
|
echo "๐งพ Total changed files: $FILE_COUNT"
|
32
32
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
33
|
+
ESLINT_CONFIG_FILE="$PROJECT_ROOT/.eslintrc.build.cjs"
|
34
|
+
|
35
|
+
ESLINT_CMD_ARGS="--no-error-on-unmatched-pattern --report-unused-disable-directives"
|
36
|
+
|
37
|
+
if [ -f "$ESLINT_CONFIG_FILE" ]; then
|
38
|
+
echo "๐ง Using ESLint config file: $ESLINT_CONFIG_FILE"
|
39
|
+
ESLINT_CMD_ARGS="--config $ESLINT_CONFIG_FILE $ESLINT_CMD_ARGS"
|
40
|
+
else
|
41
|
+
echo "โ ๏ธ ESLint config file not found, using default ESLint config resolution."
|
42
|
+
fi
|
43
|
+
|
44
|
+
echo "$DIFF_FILES" | tr -d '\r' | \
|
45
|
+
xargs -d '\n' -P 4 -n 30 npx --no-install eslint $ESLINT_CMD_ARGS
|
39
46
|
|
40
47
|
if [ $? -ne 0 ]; then
|
41
48
|
echo "โ ESLint check failed. Aborting build process"
|
@@ -1,7 +1,6 @@
|
|
1
1
|
#!/usr/bin/env sh
|
2
2
|
echo "๐ Starting Stylelint check (Git diff files only)..."
|
3
3
|
|
4
|
-
# ๅๆขๅฐ Git ไปๅบๆ น็ฎๅฝ
|
5
4
|
PROJECT_ROOT=$(git rev-parse --show-toplevel)
|
6
5
|
cd "$PROJECT_ROOT" || exit 1
|
7
6
|
|
@@ -27,16 +26,21 @@ fi
|
|
27
26
|
echo "๐ Changed files:"
|
28
27
|
echo "$DIFF_FILES"
|
29
28
|
|
30
|
-
FILE_COUNT=$(echo "$DIFF_FILES" | wc -
|
29
|
+
FILE_COUNT=$(echo "$DIFF_FILES" | wc -l)
|
31
30
|
echo "๐งพ Total changed files: $FILE_COUNT"
|
32
31
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
32
|
+
STYLELINT_CONFIG_FILE="$PROJECT_ROOT/.stylelintrc.build.cjs"
|
33
|
+
STYLELINT_CMD_ARGS="--allow-empty-input --report-needless-disables --report-invalid-scope-disables"
|
34
|
+
|
35
|
+
if [ -f "$STYLELINT_CONFIG_FILE" ]; then
|
36
|
+
echo "๐ง Using Stylelint config file: $STYLELINT_CONFIG_FILE"
|
37
|
+
STYLELINT_CMD_ARGS="--config $STYLELINT_CONFIG_FILE $STYLELINT_CMD_ARGS"
|
38
|
+
else
|
39
|
+
echo "โ ๏ธ Stylelint config file not found, using default Stylelint config resolution."
|
40
|
+
fi
|
41
|
+
|
42
|
+
echo "$DIFF_FILES" | tr -d '\r' | \
|
43
|
+
xargs -d '\n' -P 4 -n 30 npx --no-install stylelint $STYLELINT_CMD_ARGS
|
40
44
|
|
41
45
|
if [ $? -ne 0 ]; then
|
42
46
|
echo "โ Stylelint check failed. Aborting build process"
|