Skip to content

Commit eab3202

Browse files
Merge pull request #29 from RonasIT/vglinskii/update-angular-to-v15
Updated angular to v15 and other deps to latest versions. Migrated from tslint to eslint.
2 parents 69525a4 + 23af64a commit eab3202

35 files changed

+12650
-7933
lines changed

.eslintrc.json

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
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+
],
16+
"rules": {
17+
"@angular-eslint/no-attribute-decorator": "error",
18+
"@typescript-eslint/array-type": [
19+
"error",
20+
{
21+
"default": "generic"
22+
}
23+
],
24+
"@typescript-eslint/consistent-type-definitions": "error",
25+
"@typescript-eslint/dot-notation": "off",
26+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
27+
"@typescript-eslint/triple-slash-reference": "error",
28+
"arrow-parens": ["error", "always"],
29+
"brace-style": ["error", "1tbs"],
30+
"eqeqeq": ["error", "always"],
31+
"id-blacklist": "off",
32+
"id-match": "off",
33+
"import/no-deprecated": "error",
34+
"linebreak-style": ["error", "unix"],
35+
"max-classes-per-file": ["error", 1],
36+
"max-len": [
37+
"error",
38+
{
39+
"ignorePattern": "[^import|^export]",
40+
"code": 120
41+
}
42+
],
43+
"no-duplicate-imports": "error",
44+
"no-redeclare": "error",
45+
"no-return-await": "error",
46+
"no-underscore-dangle": "off",
47+
"padding-line-between-statements": [
48+
"error",
49+
{
50+
"blankLine": "always",
51+
"prev": "*",
52+
"next": "return"
53+
}
54+
],
55+
"prefer-object-spread": "error",
56+
"yoda": "error",
57+
"@angular-eslint/component-selector": "off",
58+
"@angular-eslint/directive-selector": "off",
59+
"@typescript-eslint/no-inferrable-types": "off",
60+
"no-shadow": "off",
61+
"@typescript-eslint/no-shadow": ["error"],
62+
"@typescript-eslint/naming-convention": [
63+
"error",
64+
{
65+
"selector": "enumMember",
66+
"format": ["UPPER_CASE"]
67+
}
68+
],
69+
"@typescript-eslint/member-ordering": [
70+
"error",
71+
{
72+
"default": [
73+
"public-static-field",
74+
"protected-static-field",
75+
"private-static-field",
76+
"public-instance-field",
77+
"protected-instance-field",
78+
"private-instance-field",
79+
"public-constructor",
80+
"protected-constructor",
81+
"private-constructor",
82+
"public-static-method",
83+
"public-instance-method",
84+
"protected-static-method",
85+
"protected-instance-method",
86+
"private-static-method",
87+
"private-instance-method"
88+
]
89+
}
90+
],
91+
"@typescript-eslint/explicit-function-return-type": [
92+
"error",
93+
{
94+
"allowExpressions": true
95+
}
96+
],
97+
"@typescript-eslint/explicit-module-boundary-types": [
98+
"error",
99+
{
100+
"allowArgumentsExplicitlyTypedAsAny": true
101+
}
102+
]
103+
}
104+
},
105+
{
106+
"files": ["*.html"],
107+
"extends": ["plugin:@angular-eslint/template/recommended"],
108+
"rules": {
109+
"@angular-eslint/template/no-negated-async": "off"
110+
}
111+
}
112+
]
113+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/dist
55
/tmp
66
/out-tsc
7+
/.angular
78
# Only exists if Bazel was run
89
/bazel-out
910

angular.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"prefix": "lib",
1111
"architect": {
1212
"build": {
13-
"builder": "@angular-devkit/build-ng-packagr:build",
13+
"builder": "@angular-devkit/build-angular:ng-packagr",
1414
"options": {
1515
"tsConfig": "common/tsconfig.lib.json",
1616
"project": "common/ng-package.json"
@@ -22,19 +22,20 @@
2222
}
2323
},
2424
"lint": {
25-
"builder": "@angular-devkit/build-angular:tslint",
25+
"builder": "@angular-eslint/builder:lint",
2626
"options": {
27-
"tsConfig": [
28-
"common/tsconfig.lib.json",
29-
"common/tsconfig.spec.json"
30-
],
31-
"exclude": [
32-
"**/node_modules/**"
27+
"lintFilePatterns": [
28+
"common/**/*.ts",
29+
"common/**/*.html"
3330
]
3431
}
3532
}
3633
}
3734
}
3835
},
39-
"defaultProject": "common"
36+
"cli": {
37+
"schematicCollections": [
38+
"@angular-eslint/schematics"
39+
]
40+
}
4041
}

common/.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../.eslintrc.json"
3+
}

common/package-lock.json

Lines changed: 48 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"dependencies": {
55
"class-transformer": "^0.5.1",
66
"lodash": "^4.17.21",
7-
"tslib": "^2.4.0"
7+
"tslib": "^2.4.1"
88
},
99
"peerDependencies": {
10-
"@angular/common": "^14.2.0",
11-
"@angular/core": "^14.2.0",
12-
"@angular/router": "^14.2.0",
13-
"@angular/platform-browser": "^14.2.0",
14-
"rxjs": "^7.5.6"
10+
"@angular/common": "^15.0.4",
11+
"@angular/core": "^15.0.4",
12+
"@angular/router": "^15.0.4",
13+
"@angular/platform-browser": "^15.0.4",
14+
"rxjs": "^7.8.0"
1515
}
1616
}

0 commit comments

Comments
 (0)