Skip to content

Commit 1dc7c29

Browse files
committed
Bump prettier to 3.0.3 and fix warnings
- add a separate eslint step to the git hub workflow - adjust configuration - use same settings for prettier as in BE Supersedes: #1193 Change-Id: I708d15c06c24503eb0cddc7fdf15b237a57b7071
1 parent b8029d9 commit 1dc7c29

File tree

344 files changed

+22129
-15764
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

344 files changed

+22129
-15764
lines changed

.eslintrc.json

Lines changed: 14 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
{
22
"root": true,
3-
"ignorePatterns": [
4-
"projects/**/*"
5-
],
3+
"ignorePatterns": ["projects/**/*"],
4+
"plugins": ["@typescript-eslint/eslint-plugin"],
65
"overrides": [
76
{
8-
"files": [
9-
"*.ts"
10-
],
7+
"files": ["*.ts"],
118
"parserOptions": {
12-
"project": [
13-
"tsconfig.json"
14-
],
9+
"project": ["tsconfig.json"],
1510
"createDefaultProgram": true
1611
},
1712
"extends": [
18-
"eslint:recommended",
19-
"plugin:@typescript-eslint/recommended",
13+
"eslint:recommended",
14+
"plugin:prettier/recommended",
15+
"plugin:@typescript-eslint/recommended",
2016
"plugin:@angular-eslint/recommended",
2117
"plugin:@angular-eslint/template/process-inline-templates"
2218
],
@@ -70,15 +66,8 @@
7066
"@typescript-eslint/naming-convention": [
7167
"error",
7268
{
73-
"format": [
74-
"camelCase",
75-
"snake_case",
76-
"UPPER_CASE"
77-
],
78-
"selector": [
79-
"variable",
80-
"function"
81-
]
69+
"format": ["camelCase", "snake_case", "UPPER_CASE"],
70+
"selector": ["variable", "function"]
8271
}
8372
],
8473
"@typescript-eslint/no-inferrable-types": "error",
@@ -89,32 +78,17 @@
8978
"allowTemplateLiterals": true
9079
}
9180
],
92-
"@typescript-eslint/semi": [
93-
"error",
94-
"always"
95-
],
96-
"brace-style": [
97-
"error",
98-
"1tbs"
99-
]
81+
"@typescript-eslint/semi": ["error", "always"]
10082
}
10183
},
10284
{
103-
"files": [
104-
"*.html"
105-
],
106-
"extends": [
107-
"plugin:@angular-eslint/template/recommended"
108-
],
85+
"files": ["*.html"],
86+
"extends": ["plugin:@angular-eslint/template/recommended"],
10987
"rules": {}
11088
},
11189
{
112-
"files": [
113-
"*.ts"
114-
],
115-
"extends": [
116-
"plugin:ngrx/recommended"
117-
]
90+
"files": ["*.ts"],
91+
"extends": ["plugin:ngrx/recommended"]
11892
}
11993
]
12094
}

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,36 @@ env:
88
NODE_VERSION: 18.x
99

1010
jobs:
11+
12+
13+
prettier-and-eslint:
14+
name: prettier and eslint
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Check out Git repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: ${{ env.NODE_VERSION }}
25+
- name: Cache node_modules
26+
id: cached-node-modules
27+
uses: actions/cache@v3
28+
with:
29+
path: node_modules
30+
key: node-modules-${{ hashFiles('package-lock.json') }}-${{ env.NODE_VERSION }}
31+
32+
- name: Run prettier
33+
uses: actionsx/prettier@v2
34+
with:
35+
# prettier CLI arguments.
36+
args: --check "src/**/*.ts"
37+
38+
- name: run eslint
39+
run: npm run lint
40+
1141
test:
1242
name: Run tests
1343
runs-on: ubuntu-latest

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"bracketSpacing": true,
3+
"singleQuote": false,
4+
"printWidth": 80,
5+
"trailingComma": "all",
6+
"arrowParens": "always"
7+
}

0 commit comments

Comments
 (0)