-
Notifications
You must be signed in to change notification settings - Fork 4
/
CodingStyleAndLinting_functions.sh
64 lines (35 loc) · 1.19 KB
/
CodingStyleAndLinting_functions.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
function Try_ESLint_from_the_Command_Line() {
pushd ~/${PARENT_DIR}/${PROJECT_NAME}/ >/dev/null;
set +e
eslint ./${PROJECT_NAME}.js
set -e
popd >/dev/null;
}
function Ignore_Some_Files() {
pushd ~/${PARENT_DIR}/modules/${USER}/${MODULE_NAME}/ >/dev/null;
echo "./docs" > .eslintignore
echo "./backup" >> .eslintignore
popd >/dev/null;
}
function Try_ESLint_Command_Line_Again() {
pushd ~/${PARENT_DIR}/modules/${USER}/ >/dev/null;
set +e;
eslint ./${MODULE_NAME}/${MODULE_NAME}-tests.js;
set -e;
popd >/dev/null;
}
function Customize_ESLint_in_Sublime_Text() {
pushd ~/${PARENT_DIR}/${PROJECT_NAME}/ >/dev/null;
wget -O .eslintrc https://raw.githubusercontent.com/martinhbramwell/Meteor-CI-Tutorial/master/fragments/modified_eslintrc;
cp .eslintrc ./packages/${MODULE_NAME}/
popd >/dev/null;
}
function Correct_the_indicated_code_quality_defects() {
pushd ~/${PARENT_DIR}/${PROJECT_NAME}/packages/${MODULE_NAME}/ >/dev/null;
wget -O ${MODULE_NAME}-tests.js https://raw.githubusercontent.com/martinhbramwell/Meteor-CI-Tutorial/master/fragments/package-tests_T04_05.js;
popd >/dev/null;
}
# function () {
# }
# function () {
# }