File tree 5 files changed +8
-21
lines changed
5 files changed +8
-21
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,9 @@ RUN apt update && apt install -y zip \
14
14
yarn@1.12.3 \
15
15
typescript@3.1.1 \
16
16
tslint@5.11.0 \
17
- aws-sdk @2.290.0 \
17
+ tslint-plugin-prettier @2.0.1 \
18
18
prettier@1.15.3 \
19
+ aws-sdk@2.290.0 \
19
20
@types/node@8.10.34 \
20
21
@types/aws-lambda@8.10.13 \
21
22
&& ln -s /usr/local/lib/node_modules /node_modules
Original file line number Diff line number Diff line change @@ -16,7 +16,5 @@ Contains
16
16
- [ TypeScript] ( https://www.typescriptlang.org/ ) compiler & some @types
17
17
- [ Prettier] ( https://prettier.io/ ) to standardize code formatting
18
18
- [ tslint] ( https://palantir.github.io/tslint/ ) for static analysis
19
- - [ jfrog-cli] ( https://github.com/jfrog/jfrog-cli-go ) to upload artefacts to
20
- [ Bintray] ( https://bintray.com/ ) (e.g. .zip files for Lambda)
21
19
- Build script to standardize build process across projects
22
- - Standardized configuration for ensuring highest possible quality code
20
+ - Standardized TypeScript/tslint/Prettier configuration for ensuring highest possible quality code
Original file line number Diff line number Diff line change @@ -21,15 +21,6 @@ _copyTsConfigAndTslint() {
21
21
fi
22
22
}
23
23
24
- _checkFormatting () {
25
- local offenders=$( prettier --list-different --config /etc/prettier-config.json ' **/*.ts' ' **/*.tsx' )
26
-
27
- if [ ! -z " $offenders " ]; then
28
- >&2 echo " formatting errors: $offenders "
29
- exit 1
30
- fi
31
- }
32
-
33
24
_setupReleaseDirectory () {
34
25
mkdir -p rel/
35
26
}
@@ -39,6 +30,7 @@ _compileTypescript() {
39
30
}
40
31
41
32
_runStaticAnalysis () {
33
+ # code formatting (prettier.io) is also checked here
42
34
tslint --project .
43
35
}
44
36
@@ -57,7 +49,5 @@ standardBuildProcess() {
57
49
58
50
buildstep runStaticAnalysis
59
51
60
- buildstep checkFormatting
61
-
62
52
buildstep tests
63
53
}
Original file line number Diff line number Diff line change 4
4
"singleQuote" : true ,
5
5
"arrowParens" : " always" ,
6
6
"jsxBracketSameLine" : true ,
7
- "endOfLine" : " lf" ,
8
7
"printWidth" : 100 ,
9
8
"trailingComma" : " all"
10
9
}
Original file line number Diff line number Diff line change 1
1
{
2
- "linterOptions" : {
3
- "exclude" : [
4
- ]
5
- },
6
2
"extends" : [
7
- " tslint:recommended"
3
+ " tslint:recommended" ,
4
+ " tslint-plugin-prettier"
8
5
],
9
6
"rules" : {
7
+ "prettier" : [true , " /etc/prettier-config.json" ],
8
+ "linebreak-style" : [true , " LF" ],
10
9
"member-access" : false ,
11
10
"indent" : [true , " tabs" ],
12
11
"interface-name" : false ,
You can’t perform that action at this time.
0 commit comments