Skip to content

Commit 34bc48a

Browse files
Merge pull request #109 from mariuscernescu/ens13782-upgrade-angular-version
feat: upgrade angular version
2 parents 4ae1c0b + 69854a5 commit 34bc48a

25 files changed

+19000
-18485
lines changed

.eslintrc.js

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
/*
2+
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
3+
https://github.com/typescript-eslint/tslint-to-eslint-config
4+
5+
It represents the closest reasonable ESLint configuration to this
6+
project's original TSLint configuration.
7+
8+
We recommend eventually switching this configuration to extend from
9+
the recommended rulesets in typescript-eslint.
10+
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
11+
12+
Happy linting! 💖
13+
*/
14+
module.exports = {
15+
"env": {
16+
"browser": true,
17+
"es6": true,
18+
"node": true
19+
},
20+
"ignorePatterns": [
21+
"!.*",
22+
"package-lock.json",
23+
"node_modules/",
24+
"dist/",
25+
".git/",
26+
"!.*",
27+
"package-lock.json",
28+
"node_modules/",
29+
"dist/",
30+
".git/",
31+
"tsconfig.json"
32+
],
33+
"parser": "@typescript-eslint/parser",
34+
"parserOptions": {
35+
"project": "tsconfig.json",
36+
"sourceType": "module"
37+
},
38+
"plugins": [
39+
"eslint-plugin-import",
40+
"@angular-eslint/eslint-plugin",
41+
"@typescript-eslint",
42+
"@typescript-eslint/tslint"
43+
],
44+
"root": true,
45+
"rules": {
46+
"@angular-eslint/component-class-suffix": "error",
47+
"@angular-eslint/component-selector": [
48+
"error",
49+
{
50+
"type": "element",
51+
"prefix": "aem",
52+
"style": "kebab-case"
53+
}
54+
],
55+
"@angular-eslint/directive-class-suffix": "error",
56+
"@angular-eslint/directive-selector": [
57+
"error",
58+
{
59+
"type": "attribute",
60+
"prefix": "aem",
61+
"style": "camelCase"
62+
}
63+
],
64+
"@angular-eslint/no-host-metadata-property": "error",
65+
"@angular-eslint/no-input-rename": "error",
66+
"@angular-eslint/no-inputs-metadata-property": "error",
67+
"@angular-eslint/no-output-on-prefix": "error",
68+
"@angular-eslint/no-output-rename": "error",
69+
"@angular-eslint/no-outputs-metadata-property": "error",
70+
"@angular-eslint/use-lifecycle-interface": "error",
71+
"@angular-eslint/use-pipe-transform-interface": "error",
72+
"@typescript-eslint/consistent-type-definitions": "error",
73+
"@typescript-eslint/dot-notation": "off",
74+
"@typescript-eslint/explicit-member-accessibility": [
75+
"off",
76+
{
77+
"accessibility": "explicit"
78+
}
79+
],
80+
"@typescript-eslint/indent": "error",
81+
"@typescript-eslint/member-delimiter-style": [
82+
"error",
83+
{
84+
"multiline": {
85+
"delimiter": "semi",
86+
"requireLast": true
87+
},
88+
"singleline": {
89+
"delimiter": "semi",
90+
"requireLast": false
91+
}
92+
}
93+
],
94+
"@typescript-eslint/member-ordering": "error",
95+
"@typescript-eslint/naming-convention": [
96+
"error",
97+
{
98+
"selector": "variable",
99+
"format": [
100+
"camelCase",
101+
"UPPER_CASE"
102+
],
103+
"leadingUnderscore": "forbid",
104+
"trailingUnderscore": "forbid"
105+
}
106+
],
107+
"@typescript-eslint/no-empty-function": "off",
108+
"@typescript-eslint/no-empty-interface": "error",
109+
"@typescript-eslint/no-inferrable-types": [
110+
"error",
111+
{
112+
"ignoreParameters": true
113+
}
114+
],
115+
"@typescript-eslint/no-misused-new": "error",
116+
"@typescript-eslint/no-non-null-assertion": "error",
117+
"@typescript-eslint/no-shadow": [
118+
"error",
119+
{
120+
"hoist": "all"
121+
}
122+
],
123+
"@typescript-eslint/no-unused-expressions": "error",
124+
"@typescript-eslint/no-use-before-define": "error",
125+
"@typescript-eslint/prefer-function-type": "error",
126+
"@typescript-eslint/quotes": [
127+
"error",
128+
"single"
129+
],
130+
"@typescript-eslint/semi": [
131+
"error",
132+
"always"
133+
],
134+
"@typescript-eslint/type-annotation-spacing": "error",
135+
"@typescript-eslint/unified-signatures": "error",
136+
"arrow-body-style": "error",
137+
"brace-style": [
138+
"error",
139+
"1tbs"
140+
],
141+
"constructor-super": "error",
142+
"curly": "error",
143+
"dot-notation": "off",
144+
"eol-last": "error",
145+
"eqeqeq": [
146+
"error",
147+
"smart"
148+
],
149+
"guard-for-in": "error",
150+
"id-denylist": "off",
151+
"id-match": "off",
152+
"import/no-deprecated": "warn",
153+
"indent": "off",
154+
"max-len": [
155+
"error",
156+
{
157+
"code": 140
158+
}
159+
],
160+
"no-bitwise": "error",
161+
"no-caller": "error",
162+
"no-console": [
163+
"error",
164+
{
165+
"allow": [
166+
"log",
167+
"warn",
168+
"dir",
169+
"timeLog",
170+
"assert",
171+
"clear",
172+
"count",
173+
"countReset",
174+
"group",
175+
"groupEnd",
176+
"table",
177+
"dirxml",
178+
"error",
179+
"groupCollapsed",
180+
"Console",
181+
"profile",
182+
"profileEnd",
183+
"timeStamp",
184+
"context"
185+
]
186+
}
187+
],
188+
"no-debugger": "error",
189+
"no-empty": "off",
190+
"no-empty-function": "off",
191+
"no-eval": "error",
192+
"no-fallthrough": "error",
193+
"no-new-wrappers": "error",
194+
"no-restricted-imports": [
195+
"error",
196+
"rxjs/Rx"
197+
],
198+
"no-shadow": "off",
199+
"no-throw-literal": "error",
200+
"no-trailing-spaces": "error",
201+
"no-undef-init": "error",
202+
"no-underscore-dangle": "off",
203+
"no-unused-expressions": "off",
204+
"no-unused-labels": "error",
205+
"no-use-before-define": "off",
206+
"no-var": "error",
207+
"prefer-const": "error",
208+
"quotes": "off",
209+
"radix": "error",
210+
"semi": "off",
211+
"spaced-comment": [
212+
"error",
213+
"always",
214+
{
215+
"markers": [
216+
"/"
217+
]
218+
}
219+
],
220+
"@typescript-eslint/tslint/config": [
221+
"error",
222+
{
223+
"rules": {
224+
"import-spacing": true,
225+
"whitespace": [
226+
true,
227+
"check-branch",
228+
"check-decl",
229+
"check-operator",
230+
"check-separator",
231+
"check-type"
232+
]
233+
}
234+
}
235+
]
236+
}
237+
};

.github/workflows/ci.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,13 @@ jobs:
1313
- name: Setup Node.js
1414
uses: actions/setup-node@v1
1515
with:
16-
node-version: '12'
16+
node-version: '16'
1717
- name: Install dependencies
1818
run: npm ci
1919
- name: Build the project
2020
run: npm run build:production
2121
- name: Run tests and do code coverage check
2222
run: npm run test:coverage
23-
- name: Run code linter
24-
uses: mooyoul/tslint-actions@v1.1.2
25-
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
26-
with:
27-
token: ${{ secrets.GITHUB_TOKEN }}
28-
pattern: '*.ts'
2923
- name: Upload code coverage report to workflow as an artifact
3024
uses: actions/upload-artifact@v2
3125
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.angular/cache
12
node_modules/
23
dist/
34
.scannerwork/

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Spa Angular Editable Components
1+
# Spa Angular Editable Components
22

33
[![License](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/adobe/aem-angular-editable-components/blob/master/LICENSE)
44
[![NPM Version](https://img.shields.io/npm/v/@adobe/aem-angular-editable-components.svg)](https://www.npmjs.com/package/@adobe/aem-angular-editable-components)
55
[![Documentation](https://img.shields.io/badge/docs-api-blue)](https://opensource.adobe.com/aem-angular-editable-components/)
66

7-
[![codecov](https://codecov.io/gh/adobe/aem-angular-editable-components/branch/master/graph/badge.svg)](https://codecov.io/gh/adobe/aem-angular-editable-components)
7+
[![codecov](https://codecov.io/gh/adobe/aem-angular-editable-components/branch/master/graph/badge.svg)](https://codecov.io/gh/adobe/aem-angular-editable-components)
88
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=adobe_aem-angular-editable-components&metric=alert_status)](https://sonarcloud.io/dashboard?id=adobe_aem-angular-editable-components)
99
[![Known Vulnerabilities](https://snyk.io/test/github/adobe/aem-angular-editable-components/badge.svg)](https://snyk.io/test/github/adobe/aem-angular-editable-components)
1010
[![Dependencies](https://badges.renovateapi.com/github/adobe/aem-angular-editable-components)](https://app.renovatebot.com/dashboard#github/adobe/aem-angular-editable-components)
@@ -15,7 +15,7 @@ This project provides the Angular components and integration layer to get you st
1515
```
1616
npm install @adobe/aem-angular-editable-components
1717
```
18-
## Documentation
18+
## Documentation
1919

2020
* [SPA Editor Overview](https://www.adobe.com/go/aem6_5_docs_spa_en)
2121
* [SPA Architecture](https://docs.adobe.com/content/help/en/experience-manager-65/developing/headless/spas/spa-architecture.html)
@@ -29,4 +29,3 @@ Contributions are welcome! Read the [Contributing Guide](CONTRIBUTING.md) for mo
2929
## Licensing
3030

3131
This project is licensed under the Apache V2 License. See [LICENSE](LICENSE) for more information.
32-

angular.json

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@
1313
"protractorConfig": "e2e/protractor.conf.js",
1414
"devServerTarget": "spa-angular-editable-components:serve"
1515
}
16-
},
17-
"lint": {
18-
"builder": "@angular-devkit/build-angular:tslint",
19-
"options": {
20-
"tsConfig": "e2e/tsconfig.e2e.json",
21-
"exclude": [
22-
"**/node_modules/**"
23-
]
24-
}
2516
}
2617
}
2718
},
@@ -32,7 +23,7 @@
3223
"prefix": "aem",
3324
"architect": {
3425
"build": {
35-
"builder": "@angular-devkit/build-ng-packagr:build",
26+
"builder": "@angular-devkit/build-angular:ng-packagr",
3627
"options": {
3728
"tsConfig": "tsconfig.lib.json",
3829
"project": "ng-package.json"
@@ -54,18 +45,6 @@
5445
],
5546
"karmaConfig": "karma.conf.js"
5647
}
57-
},
58-
"lint": {
59-
"builder": "@angular-devkit/build-angular:tslint",
60-
"options": {
61-
"tsConfig": [
62-
"tsconfig.lib.json",
63-
"tsconfig.spec.json"
64-
],
65-
"exclude": [
66-
"**/node_modules/**"
67-
]
68-
}
6948
}
7049
}
7150
}

karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = function(config) {
4242
reports: [ 'text', 'html', 'lcovonly' ],
4343
fixWebpackSourcePaths: true
4444
},
45-
reporters: [ 'progress', 'kjhtml' ],
45+
reporters: [ 'progress', 'kjhtml', 'coverage-istanbul' ],
4646
port: 9876,
4747
colors: true,
4848
logLevel: config.LOG_INFO,

0 commit comments

Comments
 (0)