Skip to content

Commit 468bf2d

Browse files
author
Wilfried Lucha
committed
build: add prettier
1 parent 7d64982 commit 468bf2d

8 files changed

+45
-12
lines changed

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
package-lock.json
3+
documentation
4+
e2e

.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
},
1616
"extends": [
1717
"plugin:@angular-eslint/recommended",
18-
"plugin:@typescript-eslint/recommended"
18+
"plugin:@typescript-eslint/recommended",
19+
"prettier"
1920
],
2021
"rules": {
2122
"@angular-eslint/component-class-suffix": [

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
package-lock.json
3+
documentation
4+
e2e

.prettierrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"endOfLine": "lf",
3+
"printWidth": 80,
4+
"tabWidth": 2,
5+
"trailingComma": "es5"
6+
}

README.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![default](https://user-images.githubusercontent.com/7531596/81993396-d5142b00-9645-11ea-995f-98342b7d5c8f.png)](https://github.com/wlucha/angular-starter)
22
# Angular 12 + ESLint + Material + Transloco + Jest + Compodoc + Docker
3-
Angular 12 Starter with ESLint, Material, Transloco, Jest & Compodoc
4-
by [@wlucha](https://github.com/wlucha)
3+
Angular 12 Starter with Material, Transloco, Jest & Compodoc
4+
55

66
![Angular12](https://img.shields.io/badge/Angular-12-brightgreen)
77
[![Build](https://api.travis-ci.org/wlucha/angular-starter.svg?branch=master)](https://travis-ci.org/github/wlucha/angular-starter)
@@ -17,13 +17,15 @@ by [@wlucha](https://github.com/wlucha)
1717
-->
1818

1919
## Features
20-
✅ Angular 12
21-
✅ Material Theming
22-
✅ Jest Unit Testing
23-
✅ Internationalization with Transloco
24-
✅ Auto documentation with Compodoc
25-
✅ Analyse your project with webpack-bundle-analyzer
26-
✅ Docker Support
20+
[Angular 12](https://angular.io/)
21+
[Angular Material](https://material.angular.io/)
22+
[Jest Unit Testing](https://jestjs.io/)
23+
✅ Internationalization with [Transloco](https://github.com/ngneat/transloco)
24+
✅ Auto documentation with [Compodoc](https://compodoc.app/)
25+
✅ Analyse your project with [webpack-bundle-analyzer](https://www.npmjs.com/package/webpack-bundle-analyzer)
26+
[Docker](https://www.docker.com/)
27+
[ESLint](https://eslint.org/)
28+
[Prettier](https://prettier.io/)
2729

2830
## Deploy
2931
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
@@ -69,6 +71,7 @@ https://hub.docker.com/r/wlucha/angular-starter
6971
- `npm run analyse` - analyse bundle with [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer)
7072
- `npm run compodoc` - generate [compodoc](https://github.com/compodoc/compodoc) documentation
7173
- `npm run changelog` - generate changelog
74+
- `npm run prettier` - format the whole project
7275

7376
## License
7477
MIT License

package-lock.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"e2e": "ng e2e",
1616
"compodoc": "npx compodoc -p tsconfig.app.json",
1717
"changelog": "changelog",
18-
"analyze": "webpack-bundle-analyzer dist/angular-starter/stats-es2015.json"
18+
"analyze": "webpack-bundle-analyzer dist/angular-starter/stats-es2015.json",
19+
"prettier": "prettier --write \"src/app/**/*.{js,json,css,scss,less,md,ts,html,component.html}\""
1920
},
2021
"private": true,
2122
"dependencies": {
@@ -51,13 +52,15 @@
5152
"@typescript-eslint/parser": "4.28.2",
5253
"codelyzer": "^6.0.0",
5354
"eslint": "^7.26.0",
55+
"eslint-config-prettier": "^8.3.0",
5456
"eslint-plugin-import": "^2.23.4",
5557
"eslint-plugin-jsdoc": "^36.0.6",
5658
"eslint-plugin-prefer-arrow": "^1.2.3",
5759
"generate-changelog": "^1.8.0",
5860
"jest": "^25.1.0",
5961
"jest-junit": "^10.0.0",
6062
"jest-preset-angular": "^8.2.0",
63+
"prettier": "2.3.2",
6164
"protractor": "~7.0.0",
6265
"ts-node": "~8.3.0",
6366
"typescript": "~4.3.5",

sonar-project.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sonar.projectVersion=1.0
55
sonar.sourceEncoding=UTF-8
66

77
sonar.sources=src/app
8-
sonar.exclusions=src/app/*.module.ts, documentation/**
8+
sonar.exclusions=src/app/*.module.ts,**/documentation/**
99

1010
sonar.tests=src/app
1111
sonar.test.inclusions=**/*.spec.ts

0 commit comments

Comments
 (0)