Skip to content

Commit e974af2

Browse files
authored
feat: Upgrade angular to v14
feat: Upgrade angular to v14, jest to 28 and migrate to ESLINT BREAKING CHANGE: Upgrading angular to v14
1 parent 2e05541 commit e974af2

Some content is hidden

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

42 files changed

+20813
-47056
lines changed

.eslintrc.json

+356
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,356 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["projects/**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"parserOptions": {
8+
"project": ["tsconfig.json"],
9+
"createDefaultProgram": true
10+
},
11+
"extends": [
12+
"plugin:@angular-eslint/ng-cli-compat",
13+
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
14+
"plugin:@angular-eslint/template/process-inline-templates",
15+
"plugin:@typescript-eslint/all",
16+
"prettier"
17+
],
18+
"plugins": ["eslint-plugin-no-null", "eslint-plugin-unicorn"],
19+
"rules": {
20+
"@angular-eslint/component-max-inline-declarations": [
21+
"error",
22+
{
23+
"template": 10
24+
}
25+
],
26+
"@angular-eslint/no-attribute-decorator": "error",
27+
"@angular-eslint/no-forward-ref": "error",
28+
"@angular-eslint/no-lifecycle-call": "error",
29+
"@angular-eslint/no-pipe-impure": "error",
30+
"@angular-eslint/no-queries-metadata-property": "error",
31+
"@angular-eslint/prefer-output-readonly": "error",
32+
"@angular-eslint/use-component-selector": "error",
33+
"@angular-eslint/use-component-view-encapsulation": "error",
34+
"@typescript-eslint/ban-types": [
35+
"error",
36+
{
37+
"types": {
38+
"Object": {
39+
"message": "Avoid using the `Object` type. Did you mean `object`?"
40+
},
41+
"Function": {
42+
"message": "Avoid using the `Function` type. Prefer a specific function type, like `() => void`."
43+
},
44+
"Boolean": {
45+
"message": "Avoid using the `Boolean` type. Did you mean `boolean`?"
46+
},
47+
"Number": {
48+
"message": "Avoid using the `Number` type. Did you mean `number`?"
49+
},
50+
"String": {
51+
"message": "Avoid using the `String` type. Did you mean `string`?"
52+
},
53+
"Symbol": {
54+
"message": "Avoid using the `Symbol` type. Did you mean `symbol`?"
55+
},
56+
"ArrayDeserializer": {
57+
"message": "Please use the Angular injectable version instead: ArrayDeserializerService"
58+
},
59+
"DeserializationManager": {
60+
"message": "Please use the Angular injectable version instead: DeserializationManagerService"
61+
},
62+
"ModelDeserializer": {
63+
"message": "Please use the Angular injectable version instead: ModelDeserializerService"
64+
},
65+
"ModelLibrary": {
66+
"message": "Please use the Angular injectable version instead: ModelLibraryService"
67+
},
68+
"ModelManager": {
69+
"message": "Please use the Angular injectable version instead: ModelManagerService"
70+
},
71+
"ObjectDeserializer": {
72+
"message": "Please use the Angular injectable version instead: ObjectDeserializerService"
73+
},
74+
"PrimitiveDeserializer": {
75+
"message": "Please use the Angular injectable version instead: PrimitiveDeserializerService"
76+
},
77+
"RendererLibrary": {
78+
"message": "Please use the Angular injectable version instead: RendererLibraryService"
79+
},
80+
"DashboardManager": {
81+
"message": "Please use the Angular injectable version instead: DashboardManagerService"
82+
},
83+
"Logger": {
84+
"message": "Please use the Angular injectable version instead: LoggerService"
85+
},
86+
"DataSourceManager": {
87+
"message": "Please use the Angular injectable version instead: DataSourceManagerService"
88+
},
89+
"ModelPropertyTypeLibrary": {
90+
"message": "Please use the Angular injectable version instead: ModelPropertyTypeLibraryService"
91+
},
92+
"VariableManager": {
93+
"message": "Please use the Angular injectable version instead: VariableManagerService"
94+
},
95+
"VariableDeserializer": {
96+
"message": "Please use the Angular injectable version instead: VariableDeserializerService"
97+
},
98+
"DashboardEventManager": {
99+
"message": "Please use the Angular injectable version instead: DashboardEventManagerService"
100+
},
101+
"ModelCreatedEvent": {
102+
"message": "Please use the Angular injectable version instead: ModelCreatedEventService"
103+
},
104+
"ModelDestroyedEvent": {
105+
"message": "Please use the Angular injectable version instead: ModelDestroyedEventService"
106+
},
107+
"ModelPropertyValidator": {
108+
"message": "Please use the Angular injectable version instead: ModelPropertyValidatorService"
109+
},
110+
"DefaultModelApiBuilder": {
111+
"message": "Please use the Angular injectable version instead: DefaultModelApiBuilderService"
112+
},
113+
"ModelChangedEvent": {
114+
"message": "Please use the Angular injectable version instead: ModelChangedEventService"
115+
},
116+
"ThemeManager": {
117+
"message": "Please use the Angular injectable version instead: ThemeManagerService"
118+
},
119+
"ModelEventInstaller": {
120+
"message": "Please use the Angular injectable version instead: ModelEventInstallerService"
121+
},
122+
"ArraySerializer": {
123+
"message": "Please use the Angular injectable version instead: ArraySerializerService"
124+
},
125+
"SerializationManager": {
126+
"message": "Please use the Angular injectable version instead: SerializationManagerService"
127+
},
128+
"ModelSerializer": {
129+
"message": "Please use the Angular injectable version instead: ModelSerializerService"
130+
},
131+
"VariableSerializer": {
132+
"message": "Please use the Angular injectable version instead: VariableSerializerService"
133+
},
134+
"ObjectSerializer": {
135+
"message": "Please use the Angular injectable version instead: ObjectSerializerService"
136+
},
137+
"PrimitiveSerializer": {
138+
"message": "Please use the Angular injectable version instead: PrimitiveSerializerService"
139+
},
140+
"EditorLibary": {
141+
"message": "Please use the Angular injectable version instead: EditorLibaryService"
142+
},
143+
"EditorApiFactory": {
144+
"message": "Please use the Angular injectable version instead: EditorApiFactoryService"
145+
},
146+
"ModelPropertyType": {
147+
"message": "Please use the Angular injectable version instead: ModelPropertyTypeService"
148+
},
149+
"DataRefreshEvent": {
150+
"message": "Please use the Angular injectable version instead: DataRefreshEventService"
151+
},
152+
"TimeRangeChangedEvent": {
153+
"message": "Please use the Angular injectable version instead: TimeRangeChangedEventService"
154+
},
155+
"TimeRangeManager": {
156+
"message": "Please use the Angular injectable version instead: TimeRangeManagerService"
157+
}
158+
}
159+
}
160+
],
161+
"@typescript-eslint/parameter-properties": ["error", { "prefer": "parameter-property" }],
162+
"@typescript-eslint/array-type": [
163+
"error",
164+
{
165+
"default": "array"
166+
}
167+
],
168+
"@typescript-eslint/await-thenable": "error",
169+
"@typescript-eslint/ban-ts-comment": "error",
170+
"@typescript-eslint/consistent-type-definitions": "error",
171+
"@typescript-eslint/explicit-member-accessibility": [
172+
"error",
173+
{
174+
"accessibility": "explicit",
175+
"overrides": {
176+
"accessors": "explicit",
177+
"constructors": "explicit",
178+
"parameterProperties": "explicit"
179+
}
180+
}
181+
],
182+
"@typescript-eslint/member-delimiter-style": [
183+
"off",
184+
{
185+
"multiline": {
186+
"delimiter": "none",
187+
"requireLast": true
188+
},
189+
"singleline": {
190+
"delimiter": "semi",
191+
"requireLast": false
192+
}
193+
}
194+
],
195+
"@typescript-eslint/no-empty-function": "error",
196+
"@typescript-eslint/no-explicit-any": "error",
197+
"@typescript-eslint/no-for-in-array": "error",
198+
"@typescript-eslint/no-inferrable-types": [
199+
"error",
200+
{
201+
"ignoreParameters": true,
202+
"ignoreProperties": true
203+
}
204+
],
205+
"@typescript-eslint/no-require-imports": "error",
206+
"@typescript-eslint/no-this-alias": "error",
207+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
208+
"@typescript-eslint/no-unnecessary-qualifier": "error",
209+
"@typescript-eslint/no-unnecessary-type-arguments": "error",
210+
"@typescript-eslint/no-unnecessary-type-assertion": "error",
211+
"@typescript-eslint/no-var-requires": "error",
212+
"@typescript-eslint/prefer-readonly": "error",
213+
"@typescript-eslint/promise-function-async": "error",
214+
"@typescript-eslint/quotes": [
215+
"error",
216+
"single",
217+
{
218+
"avoidEscape": true
219+
}
220+
],
221+
"@typescript-eslint/require-await": "error",
222+
"@typescript-eslint/restrict-plus-operands": "error",
223+
"@typescript-eslint/strict-boolean-expressions": [
224+
"error",
225+
{
226+
"allowNullableObject": true
227+
}
228+
],
229+
"arrow-body-style": ["error", "as-needed"],
230+
"comma-dangle": "error",
231+
"complexity": "error",
232+
"default-case": "error",
233+
"eqeqeq": ["error", "always"],
234+
"import/no-default-export": "error",
235+
"import/no-extraneous-dependencies": "error",
236+
"import/no-internal-modules": [
237+
"error",
238+
{
239+
"allow": [
240+
"@angular/core/testing/*",
241+
"@angular/platform-browser-dynamic/testing/*",
242+
"zone.js/dist/*",
243+
"core-js/*",
244+
"@angular/common/http/*",
245+
"rxjs/operators",
246+
"@ngneat/spectator/*",
247+
"rxjs/testing"
248+
]
249+
}
250+
],
251+
"import/no-unassigned-import": "error",
252+
"import/order": "error",
253+
"max-lines": ["error", 500],
254+
"no-duplicate-case": "error",
255+
"no-duplicate-imports": "error",
256+
"no-empty": "error",
257+
"no-extra-bind": "error",
258+
"no-new-func": "error",
259+
"no-param-reassign": "error",
260+
"no-redeclare": "error",
261+
"no-restricted-syntax": ["error", "ForInStatement"],
262+
"no-return-await": "error",
263+
"no-sequences": "error",
264+
"no-sparse-arrays": "error",
265+
"no-void": "error",
266+
"object-shorthand": ["error", "never"],
267+
"padding-line-between-statements": [
268+
"error",
269+
{
270+
"blankLine": "always",
271+
"prev": "*",
272+
"next": "return"
273+
}
274+
],
275+
"prefer-object-spread": "error",
276+
"prefer-template": "error",
277+
"unicorn/filename-case": "error",
278+
"yoda": "error",
279+
"quote-props": "off",
280+
"space-before-function-paren": "off",
281+
"space-in-parens": ["off", "never"],
282+
"@typescript-eslint/no-unsafe-member-access": "off",
283+
"@typescript-eslint/no-unsafe-call": "off",
284+
"@typescript-eslint/consistent-indexed-obj": "off",
285+
"no-template-curly-in-string": "off",
286+
"@typescript-eslint/naming-convention": "off",
287+
"no-null/no-null": "off",
288+
"@typescript-eslint/restrict-template-expressions": "off",
289+
"@typescript-eslint/no-confusing-void-expression": "off",
290+
"@typescript-eslint/consistent-generic-constructors": "off",
291+
"@typescript-eslint/consistent-indexed-object-style": "off",
292+
"@typescript-eslint/no-unsafe-assignment": "off",
293+
"@typescript-eslint/no-use-before-define": "off",
294+
"@typescript-eslint/sort-type-constituents": "off",
295+
"prefer-const": "off",
296+
"prefer-arrow/prefer-arrow-functions": "off",
297+
"@typescript-eslint/method-signature-style": "off",
298+
"@typescript-eslint/no-unnecessary-type-constraint": "off",
299+
"capitalized-comments": "off",
300+
"@typescript-eslint/consistent-type-imports": "off",
301+
"@typescript-eslint/no-type-alias": "off",
302+
"@typescript-eslint/prefer-readonly-parameter-types": "off",
303+
"@typescript-eslint/no-magic-numbers": "off",
304+
"@typescript-eslint/explicit-function-return-type": "off",
305+
"@typescript-eslint/member-ordering": "off",
306+
"@typescript-eslint/no-extraneous-class": "off",
307+
"@typescript-eslint/no-floating-promises": "off",
308+
"@typescript-eslint/no-non-null-assertion": "off",
309+
"@typescript-eslint/semi": ["off", null],
310+
"@typescript-eslint/type-annotation-spacing": "off",
311+
"@typescript-eslint/unbound-method": "off",
312+
"@typescript-eslint/init-declarations": "off",
313+
"@typescript-eslint/lines-between-class-members": "off",
314+
"@typescript-eslint/explicit-module-boundary-types": "off",
315+
"init-declarations": "off",
316+
"arrow-parens": ["off", "always"],
317+
"brace-style": ["off", "off"],
318+
"class-methods-use-this": "off",
319+
"eol-last": "off",
320+
"import/no-deprecated": "off",
321+
"linebreak-style": "off",
322+
"max-len": "off",
323+
"new-parens": "off",
324+
"newline-per-chained-call": "off",
325+
"no-extra-semi": "off",
326+
"no-irregular-whitespace": "off",
327+
"no-magic-numbers": "off",
328+
"no-plusplus": [
329+
"off",
330+
{
331+
"allowForLoopAfterthoughts": true
332+
}
333+
],
334+
"no-trailing-spaces": "off"
335+
}
336+
},
337+
{
338+
"files": ["*.html"],
339+
"extends": ["plugin:@angular-eslint/template/recommended"],
340+
"rules": {
341+
"@angular-eslint/template/conditional-complexity": [
342+
"error",
343+
{
344+
"maxComplexity": 4
345+
}
346+
],
347+
"@angular-eslint/template/cyclomatic-complexity": [
348+
"error",
349+
{
350+
"maxComplexity": 5
351+
}
352+
]
353+
}
354+
}
355+
]
356+
}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
!.vscode/extensions.json
2727

2828
# misc
29+
/.angular/cache
2930
/.sass-cache
3031
/connect.lock
3132
/coverage

0 commit comments

Comments
 (0)