Skip to content

Commit 7e925da

Browse files
Merge remote-tracking branch 'dspace/main' into w2p-136580_Replace-plaintext-relationship-main
2 parents 80070a8 + 4ca64ad commit 7e925da

File tree

4,170 files changed

+470010
-145746
lines changed

Some content is hidden

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

4,170 files changed

+470010
-145746
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

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ trim_trailing_whitespace = false
1515

1616
[*.ts]
1717
quote_type = single
18+
ij_typescript_enforce_trailing_comma = whenmultiline
19+
20+
[*.js]
21+
ij_javascript_enforce_trailing_comma = whenmultiline
1822

1923
[*.json5]
2024
ij_json_keep_blank_lines_in_code = 3

.eslintrc.json

Lines changed: 142 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@
55
"@angular-eslint/eslint-plugin",
66
"eslint-plugin-import",
77
"eslint-plugin-jsdoc",
8-
"eslint-plugin-deprecation",
98
"unused-imports",
109
"eslint-plugin-lodash",
11-
"eslint-plugin-jsonc"
10+
"eslint-plugin-jsonc",
11+
"@smarttools/rxjs",
12+
"eslint-plugin-simple-import-sort",
13+
"eslint-plugin-import-newlines",
14+
"@stylistic",
15+
"dspace-angular-ts",
16+
"dspace-angular-html"
17+
],
18+
"ignorePatterns": [
19+
"lint/test/fixture"
1220
],
1321
"overrides": [
1422
{
@@ -18,7 +26,8 @@
1826
"parserOptions": {
1927
"project": [
2028
"./tsconfig.json",
21-
"./cypress/tsconfig.json"
29+
"./cypress/tsconfig.json",
30+
"./lint/tsconfig.json"
2231
],
2332
"createDefaultProgram": true
2433
},
@@ -27,17 +36,32 @@
2736
"plugin:@typescript-eslint/recommended",
2837
"plugin:@typescript-eslint/recommended-requiring-type-checking",
2938
"plugin:@angular-eslint/recommended",
30-
"plugin:@angular-eslint/template/process-inline-templates"
39+
"plugin:@angular-eslint/template/process-inline-templates",
40+
"plugin:@smarttools/rxjs/recommended-legacy"
3141
],
3242
"rules": {
43+
"indent": [
44+
"error",
45+
2,
46+
{
47+
"SwitchCase": 1,
48+
"ignoredNodes": [
49+
"ClassBody.body > PropertyDefinition[decorators.length > 0] > .key"
50+
]
51+
}
52+
],
3353
"max-classes-per-file": [
3454
"error",
3555
1
3656
],
3757
"comma-dangle": [
38-
"off",
58+
"error",
3959
"always-multiline"
4060
],
61+
"object-curly-spacing": [
62+
"error",
63+
"always"
64+
],
4165
"eol-last": [
4266
"error",
4367
"always"
@@ -104,15 +128,13 @@
104128
"allowTernary": true
105129
}
106130
],
107-
"prefer-const": "off", // todo: re-enable & fix errors (more strict than it used to be in TSLint)
131+
"prefer-const": "error",
132+
"no-case-declarations": "error",
133+
"no-extra-boolean-cast": "error",
108134
"prefer-spread": "off",
109135
"no-underscore-dangle": "off",
110-
111-
// todo: disabled rules from eslint:recommended, consider re-enabling & fixing
112136
"no-prototype-builtins": "off",
113137
"no-useless-escape": "off",
114-
"no-case-declarations": "off",
115-
"no-extra-boolean-cast": "off",
116138

117139
"@angular-eslint/directive-selector": [
118140
"error",
@@ -138,27 +160,31 @@
138160
]
139161
}
140162
],
163+
"@angular-eslint/prefer-standalone": [
164+
"error"
165+
],
141166
"@angular-eslint/no-attribute-decorator": "error",
142-
"@angular-eslint/no-forward-ref": "error",
143167
"@angular-eslint/no-output-native": "warn",
144168
"@angular-eslint/no-output-on-prefix": "warn",
145169
"@angular-eslint/no-conflicting-lifecycle": "warn",
170+
"@angular-eslint/use-lifecycle-interface": "error",
146171

147172
"@typescript-eslint/no-inferrable-types":[
148173
"error",
149174
{
150175
"ignoreParameters": true
151176
}
152177
],
153-
"@typescript-eslint/quotes": [
178+
"@angular-eslint/prefer-inject": "off",
179+
"@stylistic/quotes": [
154180
"error",
155181
"single",
156182
{
157183
"avoidEscape": true,
158184
"allowTemplateLiterals": true
159185
}
160186
],
161-
"@typescript-eslint/semi": "error",
187+
"@stylistic/semi": "error",
162188
"@typescript-eslint/no-shadow": "error",
163189
"@typescript-eslint/dot-notation": "error",
164190
"@typescript-eslint/consistent-type-definitions": "error",
@@ -181,9 +207,9 @@
181207
]
182208
}
183209
],
184-
"@typescript-eslint/type-annotation-spacing": "error",
210+
"@stylistic/type-annotation-spacing": "error",
185211
"@typescript-eslint/unified-signatures": "error",
186-
"@typescript-eslint/ban-types": "warn", // todo: deal with {} type issues & re-enable
212+
"@typescript-eslint/no-restricted-types": "error",
187213
"@typescript-eslint/no-floating-promises": "warn",
188214
"@typescript-eslint/no-misused-promises": "warn",
189215
"@typescript-eslint/restrict-plus-operands": "warn",
@@ -200,19 +226,110 @@
200226
"@typescript-eslint/no-unsafe-return": "off",
201227
"@typescript-eslint/restrict-template-expressions": "off",
202228
"@typescript-eslint/require-await": "off",
229+
"@typescript-eslint/no-base-to-string": [
230+
"error",
231+
{
232+
"ignoredTypeNames": [
233+
"ResourceType",
234+
"Error"
235+
]
236+
}
237+
],
203238

204-
"deprecation/deprecation": "warn",
239+
"@typescript-eslint/no-deprecated": "warn",
205240

241+
"simple-import-sort/imports": "error",
242+
"simple-import-sort/exports": "error",
206243
"import/order": "off",
244+
"import/first": "error",
245+
"import/newline-after-import": "error",
246+
"import/no-duplicates": "error",
207247
"import/no-deprecated": "warn",
208248
"import/no-namespace": "error",
249+
"import-newlines/enforce": [
250+
"error",
251+
{
252+
"items": 1,
253+
"semi": true,
254+
"forceSingleLine": true
255+
}
256+
],
257+
"import/enforce-node-protocol-usage": [
258+
"error",
259+
"always"
260+
],
261+
209262
"unused-imports/no-unused-imports": "error",
210263
"lodash/import-scope": [
211264
"error",
212265
"method"
266+
],
267+
268+
"@smarttools/rxjs/no-nested-subscribe": "off", // todo: go over _all_ cases
269+
270+
// Custom DSpace Angular rules
271+
"dspace-angular-ts/alias-imports": [
272+
"error",
273+
{
274+
"aliases": [
275+
{
276+
"package": "rxjs",
277+
"imported": "of",
278+
"local": "of"
279+
}
280+
]
281+
}
282+
],
283+
"dspace-angular-ts/no-default-standalone-value": "error",
284+
"dspace-angular-ts/themed-component-selectors": "error",
285+
"dspace-angular-ts/themed-component-usages": "error",
286+
"dspace-angular-ts/themed-decorators": [
287+
"off",
288+
{
289+
"decorators": {
290+
"listableObjectComponent": 3,
291+
"rendersSectionForMenu": 2
292+
}
293+
}
294+
],
295+
"dspace-angular-ts/themed-wrapper-no-input-defaults": "error",
296+
"dspace-angular-ts/unique-decorators": [
297+
"off",
298+
{
299+
"decorators": [
300+
"listableObjectComponent"
301+
]
302+
}
303+
],
304+
"dspace-angular-ts/sort-standalone-imports": [
305+
"error",
306+
{
307+
"locale": "en-US",
308+
"maxItems": 0,
309+
"indent": 2,
310+
"trailingComma": true
311+
}
213312
]
214313
}
215314
},
315+
{
316+
"files": [
317+
"*.spec.ts"
318+
],
319+
"parserOptions": {
320+
"project": [
321+
"./tsconfig.json",
322+
"./cypress/tsconfig.json"
323+
],
324+
"createDefaultProgram": true
325+
},
326+
"rules": {
327+
"prefer-const": "off",
328+
329+
// Custom DSpace Angular rules
330+
"dspace-angular-ts/themed-component-usages": "error"
331+
}
332+
},
216333
{
217334
"files": [
218335
"*.html"
@@ -221,20 +338,24 @@
221338
"plugin:@angular-eslint/template/recommended"
222339
],
223340
"rules": {
224-
// todo: re-enable & fix errors
225-
"@angular-eslint/template/no-negated-async": "off",
226-
"@angular-eslint/template/eqeqeq": "off"
341+
// Custom DSpace Angular rules
342+
"dspace-angular-html/themed-component-usages": "error",
343+
"dspace-angular-html/no-disabled-attribute-on-button": "error",
344+
"@angular-eslint/template/prefer-control-flow": "error"
227345
}
228346
},
229347
{
230348
"files": [
231349
"*.json5"
232350
],
233351
"extends": [
234-
"plugin:jsonc/recommended-with-jsonc"
352+
"plugin:jsonc/recommended-with-json5"
235353
],
236354
"rules": {
237-
"no-irregular-whitespace": "error",
355+
// The ESLint core no-irregular-whitespace rule doesn't work well in JSON
356+
// See: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html
357+
"no-irregular-whitespace": "off",
358+
"jsonc/no-irregular-whitespace": "error",
238359
"no-trailing-spaces": "error",
239360
"jsonc/comma-dangle": [
240361
"error",

.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)