Skip to content

Commit 99d72b9

Browse files
authored
Merge branch 'main' into patch-15
2 parents 4ca1edf + 3468ef6 commit 99d72b9

File tree

3,600 files changed

+194124
-87891
lines changed

Some content is hidden

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

3,600 files changed

+194124
-87891
lines changed

.dockerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,6 @@ npm-debug.log.*
2525

2626
# Webpack files
2727
webpack.records.json
28-
package-lock.json
28+
29+
# Yarn no longer used
30+
yarn.lock

.eslintrc.json

Lines changed: 87 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,16 @@
88
"eslint-plugin-deprecation",
99
"unused-imports",
1010
"eslint-plugin-lodash",
11-
"eslint-plugin-jsonc"
11+
"eslint-plugin-jsonc",
12+
"eslint-plugin-rxjs",
13+
"eslint-plugin-simple-import-sort",
14+
"eslint-plugin-import-newlines",
15+
"eslint-plugin-jsonc",
16+
"dspace-angular-ts",
17+
"dspace-angular-html"
18+
],
19+
"ignorePatterns": [
20+
"lint/test/fixture"
1221
],
1322
"overrides": [
1423
{
@@ -18,7 +27,8 @@
1827
"parserOptions": {
1928
"project": [
2029
"./tsconfig.json",
21-
"./cypress/tsconfig.json"
30+
"./cypress/tsconfig.json",
31+
"./lint/tsconfig.json"
2232
],
2333
"createDefaultProgram": true
2434
},
@@ -27,17 +37,32 @@
2737
"plugin:@typescript-eslint/recommended",
2838
"plugin:@typescript-eslint/recommended-requiring-type-checking",
2939
"plugin:@angular-eslint/recommended",
30-
"plugin:@angular-eslint/template/process-inline-templates"
40+
"plugin:@angular-eslint/template/process-inline-templates",
41+
"plugin:rxjs/recommended"
3142
],
3243
"rules": {
44+
"indent": [
45+
"error",
46+
2,
47+
{
48+
"SwitchCase": 1,
49+
"ignoredNodes": [
50+
"ClassBody.body > PropertyDefinition[decorators.length > 0] > .key"
51+
]
52+
}
53+
],
3354
"max-classes-per-file": [
3455
"error",
3556
1
3657
],
3758
"comma-dangle": [
38-
"off",
59+
"error",
3960
"always-multiline"
4061
],
62+
"object-curly-spacing": [
63+
"error",
64+
"always"
65+
],
4166
"eol-last": [
4267
"error",
4368
"always"
@@ -104,15 +129,13 @@
104129
"allowTernary": true
105130
}
106131
],
107-
"prefer-const": "off", // todo: re-enable & fix errors (more strict than it used to be in TSLint)
132+
"prefer-const": "error",
133+
"no-case-declarations": "error",
134+
"no-extra-boolean-cast": "error",
108135
"prefer-spread": "off",
109136
"no-underscore-dangle": "off",
110-
111-
// todo: disabled rules from eslint:recommended, consider re-enabling & fixing
112137
"no-prototype-builtins": "off",
113138
"no-useless-escape": "off",
114-
"no-case-declarations": "off",
115-
"no-extra-boolean-cast": "off",
116139

117140
"@angular-eslint/directive-selector": [
118141
"error",
@@ -139,10 +162,10 @@
139162
}
140163
],
141164
"@angular-eslint/no-attribute-decorator": "error",
142-
"@angular-eslint/no-forward-ref": "error",
143165
"@angular-eslint/no-output-native": "warn",
144166
"@angular-eslint/no-output-on-prefix": "warn",
145167
"@angular-eslint/no-conflicting-lifecycle": "warn",
168+
"@angular-eslint/use-lifecycle-interface": "error",
146169

147170
"@typescript-eslint/no-inferrable-types":[
148171
"error",
@@ -183,7 +206,7 @@
183206
],
184207
"@typescript-eslint/type-annotation-spacing": "error",
185208
"@typescript-eslint/unified-signatures": "error",
186-
"@typescript-eslint/ban-types": "warn", // todo: deal with {} type issues & re-enable
209+
"@typescript-eslint/ban-types": "error",
187210
"@typescript-eslint/no-floating-promises": "warn",
188211
"@typescript-eslint/no-misused-promises": "warn",
189212
"@typescript-eslint/restrict-plus-operands": "warn",
@@ -200,17 +223,65 @@
200223
"@typescript-eslint/no-unsafe-return": "off",
201224
"@typescript-eslint/restrict-template-expressions": "off",
202225
"@typescript-eslint/require-await": "off",
226+
"@typescript-eslint/no-base-to-string": [
227+
"error",
228+
{
229+
"ignoredTypeNames": [
230+
"ResourceType",
231+
"Error"
232+
]
233+
}
234+
],
203235

204236
"deprecation/deprecation": "warn",
205237

238+
"simple-import-sort/imports": "error",
239+
"simple-import-sort/exports": "error",
206240
"import/order": "off",
241+
"import/first": "error",
242+
"import/newline-after-import": "error",
243+
"import/no-duplicates": "error",
207244
"import/no-deprecated": "warn",
208245
"import/no-namespace": "error",
246+
"import-newlines/enforce": [
247+
"error",
248+
{
249+
"items": 1,
250+
"semi": true,
251+
"forceSingleLine": true
252+
}
253+
],
254+
209255
"unused-imports/no-unused-imports": "error",
210256
"lodash/import-scope": [
211257
"error",
212258
"method"
213-
]
259+
],
260+
261+
"rxjs/no-nested-subscribe": "off", // todo: go over _all_ cases
262+
263+
// Custom DSpace Angular rules
264+
"dspace-angular-ts/themed-component-classes": "error",
265+
"dspace-angular-ts/themed-component-selectors": "error",
266+
"dspace-angular-ts/themed-component-usages": "error"
267+
}
268+
},
269+
{
270+
"files": [
271+
"*.spec.ts"
272+
],
273+
"parserOptions": {
274+
"project": [
275+
"./tsconfig.json",
276+
"./cypress/tsconfig.json"
277+
],
278+
"createDefaultProgram": true
279+
},
280+
"rules": {
281+
"prefer-const": "off",
282+
283+
// Custom DSpace Angular rules
284+
"dspace-angular-ts/themed-component-usages": "error"
214285
}
215286
},
216287
{
@@ -221,9 +292,10 @@
221292
"plugin:@angular-eslint/template/recommended"
222293
],
223294
"rules": {
224-
// todo: re-enable & fix errors
225-
"@angular-eslint/template/no-negated-async": "off",
226-
"@angular-eslint/template/eqeqeq": "off"
295+
// Custom DSpace Angular rules
296+
"dspace-angular-html/themed-component-usages": "error",
297+
"dspace-angular-html/no-disabled-attribute-on-button": "error",
298+
"@angular-eslint/template/prefer-control-flow": "error"
227299
}
228300
},
229301
{

.gitattributes

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@
1313
*.css eol=lf
1414
*.scss eol=lf
1515
*.html eol=lf
16-
*.svg eol=lf
16+
*.svg eol=lf
17+
18+
# Generated documentation should have LF line endings to reduce git noise
19+
docs/lint/**/*.md eol=lf

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ assignees: ''
77

88
---
99

10-
**Describe the bug**
10+
## Describe the bug
1111
A clear and concise description of what the bug is. Include the version(s) of DSpace where you've seen this problem & what *web browser* you were using. Link to examples if they are public.
1212

13-
**To Reproduce**
13+
## To Reproduce
1414
Steps to reproduce the behavior:
1515
1. Do this
1616
2. Then this...
1717

18-
**Expected behavior**
18+
## Expected behavior
1919
A clear and concise description of what you expected to happen.
2020

21-
**Related work**
21+
## Related work
2222
Link to any related tickets or PRs here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ assignees: ''
77

88
---
99

10-
**Is your feature request related to a problem? Please describe.**
11-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
10+
## Is your feature request related to a problem? Please describe.
11+
A clear and concise description of what the problem or use case is. For example, I'm always frustrated when [...]
1212

13-
**Describe the solution you'd like**
13+
## Describe the solution you'd like
1414
A clear and concise description of what you want to happen.
1515

16-
**Describe alternatives or workarounds you've considered**
16+
## Describe alternatives or workarounds you've considered
1717
A clear and concise description of any alternative solutions or features you've considered.
1818

19-
**Additional context**
20-
Add any other context or screenshots about the feature request here.
19+
## Additional information
20+
Add any other information, related tickets or screenshots about the feature request here.

0 commit comments

Comments
 (0)