Skip to content

Commit cf5ce37

Browse files
authored
Merge pull request #2866 from WISE-Community/issue-2861-format-typescript-files-with-prettier
Added support to format TypeScript files with Prettier
2 parents 9659fc1 + f56379a commit cf5ce37

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

.prettierignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
*.ts
21
*.html
2+
*.js
3+
*.css
4+
*.scss
5+
*.json
6+
*.md
7+
src/main/webapp/curriculum
8+
src/main/webapp/site/dist

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "none",
4+
"singleQuote": true,
5+
"printWidth": 100
6+
}

.prettierrc.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
"moment-locales-webpack-plugin": "^1.2.0",
122122
"ng-bullet": "^1.0.3",
123123
"node-sass": "^4.14.1",
124-
"prettier": "1.19.1",
124+
"prettier": "2.2.1",
125125
"protractor": "~7.0.0",
126126
"ts-loader": "^6.2.2",
127127
"ts-node": "~8.2.0",
@@ -141,6 +141,7 @@
141141
"build-prod-hans": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build wise --configuration=production-zh-Hans; gulp rename-styles-bundle",
142142
"build-prod-hant": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build wise --configuration=production-zh-Hant; gulp rename-styles-bundle",
143143
"bundle-report": "node ./node_modules/webpack-bundle-analyzer/lib/bin/analyzer.js src/main/webapp/site/dist/stats.json",
144+
"prettier-format": "prettier --config .prettierrc 'src' --write",
144145
"watch-all-wise5": "node node_modules/concurrently/bin/concurrently.js \"node ./node_modules/gulp/bin/gulp.js\" \"npm run test-wise5-watch\"",
145146
"watch-sass": "npm rebuild node-sass && node ./node_modules/gulp/bin/gulp.js",
146147
"update-i18n": "node ./node_modules/gulp/bin/gulp.js update-i18n",

0 commit comments

Comments
 (0)