Skip to content

Commit 239d85e

Browse files
committed
Angular 13 and all JS deps
Except: - @types/node, we run on node 14 - typescript, Angular does not support 4.6 yet
1 parent a7de2d0 commit 239d85e

25 files changed

+3554
-4755
lines changed

.eslintrc.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"root": true,
3+
"overrides": [
4+
{
5+
"files": ["*.ts"],
6+
"parserOptions": {
7+
"project": ["tsconfig.json"],
8+
"createDefaultProgram": true
9+
},
10+
"extends": [
11+
"plugin:@angular-eslint/recommended",
12+
"plugin:@angular-eslint/template/process-inline-templates"
13+
],
14+
"rules": {
15+
"@angular-eslint/directive-selector": [
16+
"error",
17+
{
18+
"type": "attribute",
19+
"prefix": "app",
20+
"style": "camelCase"
21+
}
22+
],
23+
"@angular-eslint/component-selector": [
24+
"error",
25+
{
26+
"type": "element",
27+
"prefix": "app",
28+
"style": "kebab-case"
29+
}
30+
],
31+
"@typescript-eslint/ban-types": "error",
32+
"@typescript-eslint/explicit-function-return-type": [
33+
"error",
34+
{
35+
"allowExpressions": true
36+
}
37+
],
38+
"@typescript-eslint/explicit-member-accessibility": "error",
39+
"@typescript-eslint/explicit-module-boundary-types": [
40+
"error",
41+
{
42+
"allowArgumentsExplicitlyTypedAsAny": true
43+
}
44+
],
45+
"@typescript-eslint/no-non-null-assertion": "error",
46+
"@typescript-eslint/prefer-for-of": "error",
47+
"no-restricted-globals": [
48+
"error",
49+
"atob",
50+
"bota",
51+
"document",
52+
"event",
53+
"history",
54+
"length",
55+
"localStorage",
56+
"location",
57+
"name",
58+
"navigator",
59+
"sessionStorage",
60+
"window"
61+
]
62+
}
63+
},
64+
{
65+
"files": ["*.html"],
66+
"extends": ["plugin:@angular-eslint/template/recommended"],
67+
"rules": {}
68+
}
69+
]
70+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ speed-measure-plugin*.json
3333
.history/*
3434

3535
# misc
36+
/.angular/cache
3637
/.sass-cache
3738
/connect.lock
3839
/coverage

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
/.angular/
12
/dist

angular.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,9 @@
9292
}
9393
},
9494
"lint": {
95-
"builder": "@angular-devkit/build-angular:tslint",
95+
"builder": "@angular-eslint/builder:lint",
9696
"options": {
97-
"tsConfig": ["tsconfig.app.json", "tsconfig.spec.json", "e2e/tsconfig.json"],
98-
"exclude": ["**/node_modules/**"]
97+
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
9998
}
10099
}
101100
}
@@ -118,7 +117,8 @@
118117
"development": {
119118
"tsConfig": "projects/fab-speed-dial/tsconfig.lib.json"
120119
}
121-
}
120+
},
121+
"defaultConfiguration": "production"
122122
},
123123
"test": {
124124
"builder": "@angular-devkit/build-angular:karma",
@@ -129,13 +129,9 @@
129129
}
130130
},
131131
"lint": {
132-
"builder": "@angular-devkit/build-angular:tslint",
132+
"builder": "@angular-eslint/builder:lint",
133133
"options": {
134-
"tsConfig": [
135-
"projects/fab-speed-dial/tsconfig.lib.json",
136-
"projects/fab-speed-dial/tsconfig.spec.json"
137-
],
138-
"exclude": ["**/node_modules/**"]
134+
"lintFilePatterns": ["projects/fab-speed-dial/**/*.ts", "projects/fab-speed-dial/**/*.html"]
139135
}
140136
}
141137
}

e2e/src/app.po.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {Page} from '@playwright/test';
22

33
export class AppPage {
4-
constructor(private readonly page: Page) {}
4+
public constructor(private readonly page: Page) {}
55

66
public getParagraphText(): Promise<string> {
77
return this.page.innerText('mat-toolbar-row');

package.json

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,47 @@
1515
"build-demo": "yarn build-lib && ng build demo --aot --base-href /fab-speed-dial/ && cp dist/demo/index.html dist/demo/404.html"
1616
},
1717
"dependencies": {
18-
"@angular/animations": "~12.2.9",
19-
"@angular/cdk": "~12.2.9",
20-
"@angular/common": "~12.2.9",
21-
"@angular/compiler": "~12.2.9",
22-
"@angular/core": "~12.2.9",
23-
"@angular/forms": "~12.2.9",
24-
"@angular/material": "~12.2.9",
25-
"@angular/platform-browser": "~12.2.9",
26-
"@angular/platform-browser-dynamic": "~12.2.9",
27-
"rxjs": "~7.4.0",
18+
"@angular/animations": "~13.2.5",
19+
"@angular/cdk": "~13.2.5",
20+
"@angular/common": "~13.2.5",
21+
"@angular/compiler": "~13.2.5",
22+
"@angular/core": "~13.2.5",
23+
"@angular/forms": "~13.2.5",
24+
"@angular/material": "~13.2.5",
25+
"@angular/platform-browser": "~13.2.5",
26+
"@angular/platform-browser-dynamic": "~13.2.5",
27+
"rxjs": "~7.5.4",
2828
"tslib": "^2.3.1",
2929
"zone.js": "~0.11.4"
3030
},
3131
"devDependencies": {
32-
"@angular-devkit/build-angular": "~12.2.9",
33-
"@angular/cli": "~12.2.9",
34-
"@angular/compiler-cli": "~12.2.9",
35-
"@angular/language-service": "~12.2.9",
36-
"@playwright/test": "^1.17.1",
37-
"@types/jasmine": "~3.9.1",
32+
"@angular-devkit/build-angular": "~13.2.5",
33+
"@angular-eslint/builder": "13.1.0",
34+
"@angular-eslint/eslint-plugin": "13.1.0",
35+
"@angular-eslint/eslint-plugin-template": "13.1.0",
36+
"@angular-eslint/schematics": "13.1.0",
37+
"@angular-eslint/template-parser": "13.1.0",
38+
"@angular/cli": "~13.2.5",
39+
"@angular/compiler-cli": "~13.2.5",
40+
"@angular/language-service": "~13.2.5",
41+
"@playwright/test": "^1.19.2",
42+
"@types/jasmine": "~3.10.3",
3843
"@types/jasminewd2": "~2.0.10",
3944
"@types/node": "^14.14.31",
45+
"@typescript-eslint/eslint-plugin": "5.13.0",
46+
"@typescript-eslint/parser": "5.13.0",
4047
"codelyzer": "^6.0.2",
41-
"jasmine-core": "~3.9.0",
48+
"eslint": "^8.2.0",
49+
"jasmine-core": "~4.0.1",
4250
"jasmine-spec-reporter": "~7.0.0",
43-
"karma": "~6.3.4",
51+
"karma": "~6.3.17",
4452
"karma-chrome-launcher": "~3.1.0",
4553
"karma-coverage-istanbul-reporter": "~3.0.2",
4654
"karma-jasmine": "~4.0.0",
4755
"karma-jasmine-html-reporter": "^1.7.0",
48-
"ng-packagr": "^12.2.2",
49-
"prettier": "2.4.1",
50-
"ts-node": "~10.2.1",
51-
"tslint": "~6.1.0",
52-
"typescript": "~4.3.5"
56+
"ng-packagr": "^13.0.0",
57+
"prettier": "2.5.1",
58+
"ts-node": "~10.6.0",
59+
"typescript": "~4.5.5"
5360
}
5461
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"overrides": [
3+
{
4+
"files": ["*.ts"],
5+
"rules": {
6+
"@angular-eslint/directive-selector": [
7+
"error",
8+
{
9+
"type": "attribute",
10+
"prefix": "eco",
11+
"style": "camelCase"
12+
}
13+
],
14+
"@angular-eslint/component-selector": [
15+
"error",
16+
{
17+
"type": "element",
18+
"prefix": "eco",
19+
"style": "kebab-case"
20+
}
21+
]
22+
}
23+
}
24+
]
25+
}

projects/fab-speed-dial/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"license": "MIT",
55
"repository": "github:Ecodev/fab-speed-dial",
66
"peerDependencies": {
7-
"@angular/common": "^12.0.0",
8-
"@angular/core": "^12.0.0",
9-
"@angular/material": "^12.0.0",
7+
"@angular/common": "^13.0.0",
8+
"@angular/core": "^13.0.0",
9+
"@angular/material": "^13.0.0",
1010
"rxjs": "^7.4.0"
1111
},
1212
"dependencies": {

projects/fab-speed-dial/src/lib/fab-speed-dial.spec.ts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {TestBed, waitForAsync} from '@angular/core/testing';
22

33
import {
4+
Direction,
45
EcoFabSpeedDialActionsComponent,
56
EcoFabSpeedDialComponent,
67
EcoFabSpeedDialTriggerComponent,
@@ -155,19 +156,9 @@ describe('FabSpeedDial', () => {
155156
})
156157
class TestAppComponent {
157158
@ViewChild(EcoFabSpeedDialActionsComponent)
158-
public fabActions: EcoFabSpeedDialActionsComponent;
159+
public fabActions!: EcoFabSpeedDialActionsComponent;
159160
@ViewChild(EcoFabSpeedDialComponent)
160-
public fabSpeedDial: EcoFabSpeedDialComponent;
161-
public direction = 'up';
162-
public open: boolean;
163-
164-
clickCount = 0;
165-
isDisabled = false;
166-
rippleDisabled = false;
167-
168-
tabIndex: number;
169-
170-
increment() {
171-
this.clickCount++;
172-
}
161+
public fabSpeedDial!: EcoFabSpeedDialComponent;
162+
public direction: Direction = 'up';
163+
public open: boolean = false;
173164
}

0 commit comments

Comments
 (0)