Skip to content

Commit 7ede96b

Browse files
committed
Merge branch 'main' into theme-name-as-data-attr-7.2
2 parents 31d6605 + 39aee1d commit 7ede96b

1,674 files changed

Lines changed: 96747 additions & 41009 deletions

File tree

Some content is hidden

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

.browserslistrc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22
# For additional information regarding the format and rule options, please see:
33
# https://github.com/browserslist/browserslist#queries
44

5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
58
# You can see what browsers were selected by your queries by running:
69
# npx browserslist
710

8-
> 0.5%
9-
last 2 versions
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
1016
Firefox ESR
11-
not IE 9-11 # For IE 9-11 support, remove 'not'.
17+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

.eslintrc.json

Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
{
2+
"root": true,
3+
"plugins": [
4+
"@typescript-eslint",
5+
"@angular-eslint/eslint-plugin",
6+
"eslint-plugin-import",
7+
"eslint-plugin-jsdoc",
8+
"eslint-plugin-deprecation",
9+
"unused-imports",
10+
"eslint-plugin-lodash"
11+
],
12+
"overrides": [
13+
{
14+
"files": [
15+
"*.ts"
16+
],
17+
"parserOptions": {
18+
"project": [
19+
"./tsconfig.json",
20+
"./cypress/tsconfig.json"
21+
],
22+
"createDefaultProgram": true
23+
},
24+
"extends": [
25+
"eslint:recommended",
26+
"plugin:@typescript-eslint/recommended",
27+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
28+
"plugin:@angular-eslint/recommended",
29+
"plugin:@angular-eslint/template/process-inline-templates"
30+
],
31+
"rules": {
32+
"max-classes-per-file": [
33+
"error",
34+
1
35+
],
36+
"comma-dangle": [
37+
"off",
38+
"always-multiline"
39+
],
40+
"eol-last": [
41+
"error",
42+
"always"
43+
],
44+
"no-console": [
45+
"error",
46+
{
47+
"allow": [
48+
"log",
49+
"warn",
50+
"dir",
51+
"timeLog",
52+
"assert",
53+
"clear",
54+
"count",
55+
"countReset",
56+
"group",
57+
"groupEnd",
58+
"table",
59+
"debug",
60+
"info",
61+
"dirxml",
62+
"error",
63+
"groupCollapsed",
64+
"Console",
65+
"profile",
66+
"profileEnd",
67+
"timeStamp",
68+
"context"
69+
]
70+
}
71+
],
72+
"curly": "error",
73+
"brace-style": [
74+
"error",
75+
"1tbs",
76+
{
77+
"allowSingleLine": true
78+
}
79+
],
80+
"eqeqeq": [
81+
"error",
82+
"always",
83+
{
84+
"null": "ignore"
85+
}
86+
],
87+
"radix": "error",
88+
"guard-for-in": "error",
89+
"no-bitwise": "error",
90+
"no-restricted-imports": "error",
91+
"no-caller": "error",
92+
"no-debugger": "error",
93+
"no-redeclare": "error",
94+
"no-eval": "error",
95+
"no-fallthrough": "error",
96+
"no-trailing-spaces": "error",
97+
"space-infix-ops": "error",
98+
"keyword-spacing": "error",
99+
"no-var": "error",
100+
"no-unused-expressions": [
101+
"error",
102+
{
103+
"allowTernary": true
104+
}
105+
],
106+
"prefer-const": "off", // todo: re-enable & fix errors (more strict than it used to be in TSLint)
107+
"prefer-spread": "off",
108+
"no-underscore-dangle": "off",
109+
110+
// todo: disabled rules from eslint:recommended, consider re-enabling & fixing
111+
"no-prototype-builtins": "off",
112+
"no-useless-escape": "off",
113+
"no-case-declarations": "off",
114+
"no-extra-boolean-cast": "off",
115+
116+
"@angular-eslint/directive-selector": [
117+
"error",
118+
{
119+
"type": "attribute",
120+
"prefix": "ds",
121+
"style": "camelCase"
122+
}
123+
],
124+
"@angular-eslint/component-selector": [
125+
"error",
126+
{
127+
"type": "element",
128+
"prefix": "ds",
129+
"style": "kebab-case"
130+
}
131+
],
132+
"@angular-eslint/pipe-prefix": [
133+
"error",
134+
{
135+
"prefixes": [
136+
"ds"
137+
]
138+
}
139+
],
140+
"@angular-eslint/no-attribute-decorator": "error",
141+
"@angular-eslint/no-forward-ref": "error",
142+
"@angular-eslint/no-output-native": "warn",
143+
"@angular-eslint/no-output-on-prefix": "warn",
144+
"@angular-eslint/no-conflicting-lifecycle": "warn",
145+
146+
"@typescript-eslint/no-inferrable-types":[
147+
"error",
148+
{
149+
"ignoreParameters": true
150+
}
151+
],
152+
"@typescript-eslint/quotes": [
153+
"error",
154+
"single",
155+
{
156+
"avoidEscape": true,
157+
"allowTemplateLiterals": true
158+
}
159+
],
160+
"@typescript-eslint/semi": "error",
161+
"@typescript-eslint/no-shadow": "error",
162+
"@typescript-eslint/dot-notation": "error",
163+
"@typescript-eslint/consistent-type-definitions": "error",
164+
"@typescript-eslint/prefer-function-type": "error",
165+
"@typescript-eslint/naming-convention": [
166+
"error",
167+
{
168+
"selector": "property",
169+
"format": null
170+
}
171+
],
172+
"@typescript-eslint/member-ordering": [
173+
"error",
174+
{
175+
"default": [
176+
"static-field",
177+
"instance-field",
178+
"static-method",
179+
"instance-method"
180+
]
181+
}
182+
],
183+
"@typescript-eslint/type-annotation-spacing": "error",
184+
"@typescript-eslint/unified-signatures": "error",
185+
"@typescript-eslint/ban-types": "warn", // todo: deal with {} type issues & re-enable
186+
"@typescript-eslint/no-floating-promises": "warn",
187+
"@typescript-eslint/no-misused-promises": "warn",
188+
"@typescript-eslint/restrict-plus-operands": "warn",
189+
"@typescript-eslint/unbound-method": "off",
190+
"@typescript-eslint/ban-ts-comment": "off",
191+
"@typescript-eslint/no-var-requires": "off",
192+
"@typescript-eslint/no-unused-vars": "off",
193+
"@typescript-eslint/no-unnecessary-type-assertion": "off",
194+
"@typescript-eslint/no-explicit-any": "off",
195+
"@typescript-eslint/no-unsafe-assignment": "off",
196+
"@typescript-eslint/no-unsafe-member-access": "off",
197+
"@typescript-eslint/no-unsafe-call": "off",
198+
"@typescript-eslint/no-unsafe-argument": "off",
199+
"@typescript-eslint/no-unsafe-return": "off",
200+
"@typescript-eslint/restrict-template-expressions": "off",
201+
"@typescript-eslint/require-await": "off",
202+
203+
"deprecation/deprecation": "warn",
204+
205+
"import/order": "off",
206+
"import/no-deprecated": "warn",
207+
"import/no-namespace": "error",
208+
"unused-imports/no-unused-imports": "error",
209+
"lodash/import-scope": [
210+
"error",
211+
"method"
212+
]
213+
}
214+
},
215+
{
216+
"files": [
217+
"*.html"
218+
],
219+
"extends": [
220+
"plugin:@angular-eslint/template/recommended"
221+
],
222+
"rules": {
223+
// todo: re-enable & fix errors
224+
"@angular-eslint/template/no-negated-async": "off",
225+
"@angular-eslint/template/eqeqeq": "off"
226+
}
227+
}
228+
]
229+
}

.gitattributes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# By default, auto detect text files and perform LF normalization
2+
# This ensures code is always checked in with LF line endings
3+
* text=auto
4+
5+
# JS and TS files must always use LF for Angular tools to work
6+
# Some Angular tools expect LF line endings, even on Windows.
7+
# This ensures Windows always checks out these files with LF line endings
8+
# We've copied many of these rules from https://github.com/angular/angular-cli/
9+
*.js eol=lf
10+
*.ts eol=lf
11+
*.json eol=lf
12+
*.json5 eol=lf
13+
*.css eol=lf
14+
*.scss eol=lf
15+
*.html eol=lf
16+
*.svg eol=lf

.github/workflows/build.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ name: Build
66
# Run this Build for all pushes / PRs to current branch
77
on: [push, pull_request]
88

9+
permissions:
10+
contents: read # to fetch code (actions/checkout)
11+
912
jobs:
1013
tests:
1114
runs-on: ubuntu-latest
@@ -22,18 +25,18 @@ jobs:
2225
strategy:
2326
# Create a matrix of Node versions to test against (in parallel)
2427
matrix:
25-
node-version: [12.x, 14.x]
28+
node-version: [14.x, 16.x]
2629
# Do NOT exit immediately if one matrix job fails
2730
fail-fast: false
2831
# These are the actual CI steps to perform per job
2932
steps:
3033
# https://github.com/actions/checkout
3134
- name: Checkout codebase
32-
uses: actions/checkout@v2
35+
uses: actions/checkout@v3
3336

3437
# https://github.com/actions/setup-node
3538
- name: Install Node.js ${{ matrix.node-version }}
36-
uses: actions/setup-node@v2
39+
uses: actions/setup-node@v3
3740
with:
3841
node-version: ${{ matrix.node-version }}
3942

@@ -58,7 +61,7 @@ jobs:
5861
id: yarn-cache-dir-path
5962
run: echo "::set-output name=dir::$(yarn cache dir)"
6063
- name: Cache Yarn dependencies
61-
uses: actions/cache@v2
64+
uses: actions/cache@v3
6265
with:
6366
# Cache entire Yarn cache directory (see previous step)
6467
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -70,7 +73,10 @@ jobs:
7073
run: yarn install --frozen-lockfile
7174

7275
- name: Run lint
73-
run: yarn run lint
76+
run: yarn run lint --quiet
77+
78+
- name: Check for circular dependencies
79+
run: yarn run check-circ-deps
7480

7581
- name: Run build
7682
run: yarn run build:prod
@@ -79,11 +85,11 @@ jobs:
7985
run: yarn run test:headless
8086

8187
# NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286
82-
# Upload coverage reports to Codecov (for Node v12 only)
88+
# Upload coverage reports to Codecov (for one version of Node only)
8389
# https://github.com/codecov/codecov-action
8490
- name: Upload coverage to Codecov.io
85-
uses: codecov/codecov-action@v2
86-
if: matrix.node-version == '12.x'
91+
uses: codecov/codecov-action@v3
92+
if: matrix.node-version == '16.x'
8793

8894
# Using docker-compose start backend using CI configuration
8995
# and load assetstore from a cached copy
@@ -97,7 +103,7 @@ jobs:
97103
# https://github.com/cypress-io/github-action
98104
# (NOTE: to run these e2e tests locally, just use 'ng e2e')
99105
- name: Run e2e tests (integration tests)
100-
uses: cypress-io/github-action@v2
106+
uses: cypress-io/github-action@v4
101107
with:
102108
# Run tests in Chrome, headless mode
103109
browser: chrome
@@ -113,7 +119,7 @@ jobs:
113119
# Cypress always creates a video of all e2e tests (whether they succeeded or failed)
114120
# Save those in an Artifact
115121
- name: Upload e2e test videos to Artifacts
116-
uses: actions/upload-artifact@v2
122+
uses: actions/upload-artifact@v3
117123
if: always()
118124
with:
119125
name: e2e-test-videos
@@ -122,12 +128,20 @@ jobs:
122128
# If e2e tests fail, Cypress creates a screenshot of what happened
123129
# Save those in an Artifact
124130
- name: Upload e2e test failure screenshots to Artifacts
125-
uses: actions/upload-artifact@v2
131+
uses: actions/upload-artifact@v3
126132
if: failure()
127133
with:
128134
name: e2e-test-screenshots
129135
path: cypress/screenshots
130136

137+
- name: Stop app (in case it stays up after e2e tests)
138+
run: |
139+
app_pid=$(lsof -t -i:4000)
140+
if [[ ! -z $app_pid ]]; then
141+
echo "App was still up! (PID: $app_pid)"
142+
kill -9 $app_pid
143+
fi
144+
131145
# Start up the app with SSR enabled (run in background)
132146
- name: Start app in SSR (server-side rendering) mode
133147
run: |

0 commit comments

Comments
 (0)