@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apdesign/code-style-react",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "scripts": {},
5
5
  "files": [
6
6
  "index.js",
@@ -27,15 +27,22 @@ fi
27
27
  echo "๐Ÿ“‚ Changed files:"
28
28
  echo "$DIFF_FILES"
29
29
 
30
- FILE_COUNT=$(echo "$DIFF_FILES" | wc -w)
30
+ FILE_COUNT=$(echo "$DIFF_FILES" | wc -l)
31
31
  echo "๐Ÿงพ Total changed files: $FILE_COUNT"
32
32
 
33
- # ๅˆ†ๆ‰นๆ‰ง่กŒ Eslint
34
- printf "%s\n" $DIFF_FILES | grep -E '\.(ts|tsx|js|jsx)$' | \
35
- xargs -P 4 -n 50 npx --no-install eslint \
36
- --config .eslintrc.cjs \
37
- --no-error-on-unmatched-pattern \
38
- --report-unused-disable-directives
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 -w)
29
+ FILE_COUNT=$(echo "$DIFF_FILES" | wc -l)
31
30
  echo "๐Ÿงพ Total changed files: $FILE_COUNT"
32
31
 
33
- # ๅˆ†ๆ‰นๆ‰ง่กŒ Stylelint
34
- printf "%s\n" $DIFF_FILES | grep -E '\.(css|scss|sass|less)$' | \
35
- xargs -P 4 -n 50 npx --no-install stylelint \
36
- --config .stylelintrc.cjs \
37
- --allow-empty-input \
38
- --report-needless-disables \
39
- --report-invalid-scope-disables
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"