Skip to content
This repository was archived by the owner on Apr 17, 2024. It is now read-only.

Commit b47b68f

Browse files
committed
fix prettier + eslint config
1 parent 30e0bac commit b47b68f

15 files changed

+577
-141
lines changed

.eslintrc.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"extends": [
1818
"plugin:@angular-eslint/recommended",
1919
"plugin:@angular-eslint/template/process-inline-templates",
20-
"prettier"
20+
"plugin:prettier/recommended"
2121
],
2222
"rules": {
2323
"@angular-eslint/directive-selector": [
@@ -38,6 +38,7 @@
3838
]
3939
}
4040
},
41+
// NOTE: WE ARE NOT APPLYING PRETTIER IN THIS OVERRIDE, ONLY @ANGULAR-ESLINT/TEMPLATE
4142
{
4243
"files": [
4344
"*.html"
@@ -46,6 +47,22 @@
4647
"plugin:@angular-eslint/template/recommended"
4748
],
4849
"rules": {}
50+
},
51+
// NOTE: WE ARE NOT APPLYING @ANGULAR-ESLINT/TEMPLATE IN THIS OVERRIDE, ONLY PRETTIER
52+
{
53+
"files": [
54+
"*.html"
55+
],
56+
"excludedFiles": [
57+
"*inline-template-*.component.html"
58+
],
59+
"extends": [
60+
"plugin:prettier/recommended"
61+
],
62+
"rules": {
63+
// NOTE: WE ARE OVERRIDING THE DEFAULT CONFIG TO ALWAYS SET THE PARSER TO ANGULAR (SEE BELOW)
64+
"prettier/prettier": ["error", { "parser": "angular" }]
65+
}
4966
}
5067
]
5168
}

package-lock.json

Lines changed: 71 additions & 7 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
@@ -45,8 +45,9 @@
4545
"@types/node": "^16.11.14",
4646
"@typescript-eslint/eslint-plugin": "5.3.0",
4747
"@typescript-eslint/parser": "5.3.0",
48-
"eslint": "^8.2.0",
48+
"eslint": "^8.5.0",
4949
"eslint-config-prettier": "^8.3.0",
50+
"eslint-plugin-prettier": "^4.0.0",
5051
"jasmine-core": "~3.10.1",
5152
"karma": "~6.3.9",
5253
"karma-chrome-launcher": "~3.1.0",

src/app/app-routing.module.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ import { RouterModule, Routes } from '@angular/router';
44
const routes: Routes = [];
55

66
@NgModule({
7-
imports: [RouterModule.forRoot(routes, {
8-
initialNavigation: 'enabledBlocking'
9-
})],
10-
exports: [RouterModule]
7+
imports: [
8+
RouterModule.forRoot(routes, {
9+
initialNavigation: 'enabledBlocking',
10+
}),
11+
],
12+
exports: [RouterModule],
1113
})
12-
export class AppRoutingModule { }
14+
export class AppRoutingModule {}

0 commit comments

Comments
 (0)