Skip to content

Commit 8f18c52

Browse files
authored
Merge branch 'main' into dev
2 parents a186b88 + 9a4aa36 commit 8f18c52

File tree

67 files changed

+13295
-7471
lines changed

Some content is hidden

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

67 files changed

+13295
-7471
lines changed

.eslintrc.json

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["projects/**/*"],
4+
"plugins": ["import"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts"],
8+
"parser": "@typescript-eslint/parser",
9+
"parserOptions": {
10+
"project": ["tsconfig.json"],
11+
"createDefaultProgram": true
12+
},
13+
"extends": [
14+
"eslint:recommended",
15+
"plugin:@typescript-eslint/recommended",
16+
"plugin:@angular-eslint/recommended",
17+
"plugin:@angular-eslint/template/process-inline-templates"
18+
],
19+
"rules": {
20+
"max-len": [
21+
"error",
22+
{
23+
"code": 90
24+
}
25+
],
26+
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1,"maxBOF": 0 }],
27+
"no-inferrable-types": "off",
28+
"no-console": "error",
29+
"no-debugger": "error",
30+
"semi": "error",
31+
"no-tabs": "error",
32+
"space-before-blocks": "error",
33+
"import/no-unresolved": "error",
34+
"@angular-eslint/directive-selector": [
35+
"error",
36+
{
37+
"type": "attribute",
38+
"prefix": "app",
39+
"style": "camelCase"
40+
}
41+
],
42+
"@angular-eslint/component-selector": [
43+
"error",
44+
{
45+
"type": "element",
46+
"prefix": "app",
47+
"style": "kebab-case"
48+
}
49+
],
50+
"import/order": [
51+
"error",
52+
{
53+
"alphabetize": { "order": "asc", "caseInsensitive": true },
54+
"newlines-between": "always",
55+
"groups": [ "internal", "unknown", "external", "builtin", ["parent", "sibling", "index"]],
56+
"pathGroups": [
57+
{
58+
"pattern": "@angular",
59+
"group": "internal"
60+
},
61+
{
62+
"pattern": "rxjs",
63+
"group": "unknown"
64+
},
65+
{
66+
"pattern": "rxjs/**",
67+
"group": "unknown"
68+
},
69+
{
70+
"pattern": "@services/**",
71+
"group": "builtin",
72+
"position": "before"
73+
},
74+
{
75+
"pattern": "@components/**",
76+
"group": "builtin",
77+
"position": "before"
78+
},
79+
{
80+
"pattern": "@models/**",
81+
"group": "builtin",
82+
"position": "before"
83+
},
84+
{
85+
"pattern": "@interfaces/**",
86+
"group": "builtin",
87+
"position": "before"
88+
},
89+
{
90+
"pattern": "@utils/**",
91+
"group": "builtin",
92+
"position": "before"
93+
},
94+
{
95+
"pattern": "@constants/**",
96+
"group": "builtin",
97+
"position": "before"
98+
},
99+
{
100+
"pattern": "@pipes/**",
101+
"group": "builtin",
102+
"position": "before"
103+
}
104+
],
105+
"pathGroupsExcludedImportTypes": ["type", "object"]
106+
}
107+
]
108+
},
109+
"settings": {
110+
"import/internal-regex": "@angular",
111+
"import/resolver": {
112+
"alias": true,
113+
"typescript": {
114+
"alwaysTryTypes": true
115+
}
116+
},
117+
"import/parsers": {
118+
"@typescript-eslint/parser": [".ts", ".tsx"]
119+
}
120+
}
121+
},
122+
{
123+
"files": ["*.html"],
124+
"extends": [
125+
"plugin:@angular-eslint/template/recommended"
126+
],
127+
"rules": { }
128+
},
129+
{
130+
"env": {
131+
"jasmine": true
132+
},
133+
"extends": [
134+
"plugin:jasmine/recommended"
135+
],
136+
"plugins": [
137+
"jasmine"
138+
],
139+
"files": [
140+
"**/*.spec.ts",
141+
"*.d.ts"
142+
]
143+
}
144+
]
145+
}

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ jobs:
4646

4747
- name: 📥 Install dependencies
4848
run: npm ci
49-
49+
5050
- name: 🧪 Run unit tests
5151
run: npm run test -- --no-watch --code-coverage --browsers=ChromeHeadlessCI

angular.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,21 @@
9999
],
100100
"scripts": []
101101
}
102+
},
103+
"lint": {
104+
"builder": "@angular-eslint/builder:lint",
105+
"options": {
106+
"lintFilePatterns": [
107+
"src/**/*.ts",
108+
"src/**/*.html"
109+
]
110+
}
102111
}
103112
}
104113
}
105114
},
106-
"defaultProject": "frontend"
115+
"defaultProject": "frontend",
116+
"cli": {
117+
"defaultCollection": "@angular-eslint/schematics"
118+
}
107119
}

karma.conf.js

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ module.exports = function (config) {
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
1212
require('karma-coverage'),
13-
require('@angular-devkit/build-angular/plugins/karma')
13+
require('@angular-devkit/build-angular/plugins/karma'),
14+
require('karma-mocha-reporter')
1415
],
1516
client: {
1617
jasmine: {
@@ -30,14 +31,28 @@ module.exports = function (config) {
3031
reporters: [
3132
{ type: 'html' },
3233
{ type: 'text-summary' }
33-
]
34+
],
35+
check: {
36+
global: {
37+
statements: 50,
38+
branches: 50,
39+
functions: 50,
40+
lines: 50,
41+
},
42+
},
3443
},
35-
reporters: ['progress', 'kjhtml'],
44+
reporters: ['mocha'],
3645
port: 9876,
3746
colors: true,
3847
logLevel: config.LOG_INFO,
3948
autoWatch: true,
40-
browsers: ['Chrome'],
49+
browsers: ['ChromeHeadless'],
50+
customLaunchers: {
51+
ChromeHeadlessCI: {
52+
base: 'ChromeHeadless',
53+
flags: ['--no-sandbox']
54+
}
55+
},
4156
singleRun: false,
4257
restartOnFileChange: true
4358
});

0 commit comments

Comments
 (0)