@@ -55,25 +55,33 @@ elif [ -d "$DIR/../../../plugins/$2" ]; then
55
55
$DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_browser.json $DIR /../../../plugins/$2 /frontend/public/javascripts/countly.views.js ;
56
56
fi
57
57
if [ " $3 " = " --nodejs" ] || [ -z $3 ]; then
58
+ $DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_nodejs.json $DIR /../../../plugins/$2 /api/* .js ;
58
59
$DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_nodejs.json $DIR /../../../plugins/$2 /api/** /* .js ;
59
60
$DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_nodejs.json $DIR /../../../plugins/$2 /frontend/* .js ;
60
61
fi
61
62
if [ " $3 " = " --scripts" ] || [ -z $3 ]; then
62
63
$DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_scripts.json $DIR /../../../plugins/$2 /* .js ;
63
- $DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_scripts.json $DIR /../../../plugins/$2 /tests/** /* .js ;
64
+ if [ -d $DIR /../../../plugins/$2 /tests ]; then
65
+ $DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_scripts.json $DIR /../../../plugins/$2 /tests/* .js ;
66
+ $DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_scripts.json $DIR /../../../plugins/$2 /tests/** /* .js ;
67
+ fi
64
68
fi
65
69
elif [ " $1 " = " lintfix" ]; then
66
70
if [ " $3 " = " --browser" ] || [ -z $3 ]; then
67
71
$DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_browser.json $DIR /../../../plugins/$2 /frontend/public/javascripts/countly.models.js --fix ;
68
72
$DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_browser.json $DIR /../../../plugins/$2 /frontend/public/javascripts/countly.views.js --fix ;
69
73
fi
70
74
if [ " $3 " = " --nodejs" ] || [ -z $3 ]; then
75
+ $DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_nodejs.json $DIR /../../../plugins/$2 /api/* .js --fix ;
71
76
$DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_nodejs.json $DIR /../../../plugins/$2 /api/** /* .js --fix ;
72
77
$DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_nodejs.json $DIR /../../../plugins/$2 /frontend/* .js --fix ;
73
78
fi
74
79
if [ " $3 " = " --scripts" ] || [ -z $3 ]; then
75
80
$DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_scripts.json $DIR /../../../plugins/$2 /* .js --fix ;
76
- $DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_scripts.json $DIR /../../../plugins/$2 /tests/** /* .js --fix ;
81
+ if [ -d $DIR /../../../plugins/$2 /tests ]; then
82
+ $DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_scripts.json $DIR /../../../plugins/$2 /tests/* .js --fix ;
83
+ $DIR /../../../node_modules/eslint/bin/eslint.js -c $DIR /../../../bin/config/eslint/eslint_scripts.json $DIR /../../../plugins/$2 /tests/** /* .js --fix ;
84
+ fi
77
85
fi
78
86
else
79
87
usage ;
0 commit comments