Skip to content

Commit 646b444

Browse files
author
Joran De Braekeleer
committed
Merge branch 'main' into w2p-130253_replace-bitstreams-from-submission
2 parents 4a918b1 + 269404c commit 646b444

File tree

3,933 files changed

+419531
-133435
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,933 files changed

+419531
-133435
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: 132 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@
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+
"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:rxjs/recommended"
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,11 +160,14 @@
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",
@@ -183,7 +208,7 @@
183208
],
184209
"@typescript-eslint/type-annotation-spacing": "error",
185210
"@typescript-eslint/unified-signatures": "error",
186-
"@typescript-eslint/ban-types": "warn", // todo: deal with {} type issues & re-enable
211+
"@typescript-eslint/ban-types": "error",
187212
"@typescript-eslint/no-floating-promises": "warn",
188213
"@typescript-eslint/no-misused-promises": "warn",
189214
"@typescript-eslint/restrict-plus-operands": "warn",
@@ -200,19 +225,106 @@
200225
"@typescript-eslint/no-unsafe-return": "off",
201226
"@typescript-eslint/restrict-template-expressions": "off",
202227
"@typescript-eslint/require-await": "off",
228+
"@typescript-eslint/no-base-to-string": [
229+
"error",
230+
{
231+
"ignoredTypeNames": [
232+
"ResourceType",
233+
"Error"
234+
]
235+
}
236+
],
203237

204238
"deprecation/deprecation": "warn",
205239

240+
"simple-import-sort/imports": "error",
241+
"simple-import-sort/exports": "error",
206242
"import/order": "off",
243+
"import/first": "error",
244+
"import/newline-after-import": "error",
245+
"import/no-duplicates": "error",
207246
"import/no-deprecated": "warn",
208247
"import/no-namespace": "error",
248+
"import-newlines/enforce": [
249+
"error",
250+
{
251+
"items": 1,
252+
"semi": true,
253+
"forceSingleLine": true
254+
}
255+
],
256+
209257
"unused-imports/no-unused-imports": "error",
210258
"lodash/import-scope": [
211259
"error",
212260
"method"
261+
],
262+
263+
"rxjs/no-nested-subscribe": "off", // todo: go over _all_ cases
264+
265+
// Custom DSpace Angular rules
266+
"dspace-angular-ts/alias-imports": [
267+
"error",
268+
{
269+
"aliases": [
270+
{
271+
"package": "rxjs",
272+
"imported": "of",
273+
"local": "of"
274+
}
275+
]
276+
}
277+
],
278+
"dspace-angular-ts/themed-component-classes": "error",
279+
"dspace-angular-ts/themed-component-selectors": "error",
280+
"dspace-angular-ts/themed-component-usages": "error",
281+
"dspace-angular-ts/themed-decorators": [
282+
"off",
283+
{
284+
"decorators": {
285+
"listableObjectComponent": 3,
286+
"rendersSectionForMenu": 2
287+
}
288+
}
289+
],
290+
"dspace-angular-ts/themed-wrapper-no-input-defaults": "error",
291+
"dspace-angular-ts/unique-decorators": [
292+
"off",
293+
{
294+
"decorators": [
295+
"listableObjectComponent"
296+
]
297+
}
298+
],
299+
"dspace-angular-ts/sort-standalone-imports": [
300+
"error",
301+
{
302+
"locale": "en-US",
303+
"maxItems": 0,
304+
"indent": 2,
305+
"trailingComma": true
306+
}
213307
]
214308
}
215309
},
310+
{
311+
"files": [
312+
"*.spec.ts"
313+
],
314+
"parserOptions": {
315+
"project": [
316+
"./tsconfig.json",
317+
"./cypress/tsconfig.json"
318+
],
319+
"createDefaultProgram": true
320+
},
321+
"rules": {
322+
"prefer-const": "off",
323+
324+
// Custom DSpace Angular rules
325+
"dspace-angular-ts/themed-component-usages": "error"
326+
}
327+
},
216328
{
217329
"files": [
218330
"*.html"
@@ -221,20 +333,24 @@
221333
"plugin:@angular-eslint/template/recommended"
222334
],
223335
"rules": {
224-
// todo: re-enable & fix errors
225-
"@angular-eslint/template/no-negated-async": "off",
226-
"@angular-eslint/template/eqeqeq": "off"
336+
// Custom DSpace Angular rules
337+
"dspace-angular-html/themed-component-usages": "error",
338+
"dspace-angular-html/no-disabled-attribute-on-button": "error",
339+
"@angular-eslint/template/prefer-control-flow": "error"
227340
}
228341
},
229342
{
230343
"files": [
231344
"*.json5"
232345
],
233346
"extends": [
234-
"plugin:jsonc/recommended-with-jsonc"
347+
"plugin:jsonc/recommended-with-json5"
235348
],
236349
"rules": {
237-
"no-irregular-whitespace": "error",
350+
// The ESLint core no-irregular-whitespace rule doesn't work well in JSON
351+
// See: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html
352+
"no-irregular-whitespace": "off",
353+
"jsonc/no-irregular-whitespace": "error",
238354
"no-trailing-spaces": "error",
239355
"jsonc/comma-dangle": [
240356
"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)