Skip to content

Commit 0f8f0c6

Browse files
Merge remote-tracking branch 'main' into w2p-134319_escape-html-tags_contribute-main
2 parents 26e14e8 + dba2d7a commit 0f8f0c6

File tree

2,793 files changed

+336191
-89001
lines changed

Some content is hidden

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

2,793 files changed

+336191
-89001
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: 90 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
"eslint-plugin-jsonc",
1212
"eslint-plugin-rxjs",
1313
"eslint-plugin-simple-import-sort",
14-
"eslint-plugin-import-newlines"
14+
"eslint-plugin-import-newlines",
15+
"dspace-angular-ts",
16+
"dspace-angular-html"
17+
],
18+
"ignorePatterns": [
19+
"lint/test/fixture"
1520
],
1621
"overrides": [
1722
{
@@ -21,7 +26,8 @@
2126
"parserOptions": {
2227
"project": [
2328
"./tsconfig.json",
24-
"./cypress/tsconfig.json"
29+
"./cypress/tsconfig.json",
30+
"./lint/tsconfig.json"
2531
],
2632
"createDefaultProgram": true
2733
},
@@ -38,7 +44,10 @@
3844
"error",
3945
2,
4046
{
41-
"SwitchCase": 1
47+
"SwitchCase": 1,
48+
"ignoredNodes": [
49+
"ClassBody.body > PropertyDefinition[decorators.length > 0] > .key"
50+
]
4251
}
4352
],
4453
"max-classes-per-file": [
@@ -151,10 +160,14 @@
151160
]
152161
}
153162
],
163+
"@angular-eslint/prefer-standalone": [
164+
"error"
165+
],
154166
"@angular-eslint/no-attribute-decorator": "error",
155167
"@angular-eslint/no-output-native": "warn",
156168
"@angular-eslint/no-output-on-prefix": "warn",
157169
"@angular-eslint/no-conflicting-lifecycle": "warn",
170+
"@angular-eslint/use-lifecycle-interface": "error",
158171

159172
"@typescript-eslint/no-inferrable-types":[
160173
"error",
@@ -212,6 +225,15 @@
212225
"@typescript-eslint/no-unsafe-return": "off",
213226
"@typescript-eslint/restrict-template-expressions": "off",
214227
"@typescript-eslint/require-await": "off",
228+
"@typescript-eslint/no-base-to-string": [
229+
"error",
230+
{
231+
"ignoredTypeNames": [
232+
"ResourceType",
233+
"Error"
234+
]
235+
}
236+
],
215237

216238
"deprecation/deprecation": "warn",
217239

@@ -231,14 +253,62 @@
231253
"forceSingleLine": true
232254
}
233255
],
256+
"import/enforce-node-protocol-usage": [
257+
"error",
258+
"always"
259+
],
234260

235261
"unused-imports/no-unused-imports": "error",
236262
"lodash/import-scope": [
237263
"error",
238264
"method"
239265
],
240266

241-
"rxjs/no-nested-subscribe": "off" // todo: go over _all_ cases
267+
"rxjs/no-nested-subscribe": "off", // todo: go over _all_ cases
268+
269+
// Custom DSpace Angular rules
270+
"dspace-angular-ts/alias-imports": [
271+
"error",
272+
{
273+
"aliases": [
274+
{
275+
"package": "rxjs",
276+
"imported": "of",
277+
"local": "of"
278+
}
279+
]
280+
}
281+
],
282+
"dspace-angular-ts/themed-component-classes": "error",
283+
"dspace-angular-ts/themed-component-selectors": "error",
284+
"dspace-angular-ts/themed-component-usages": "error",
285+
"dspace-angular-ts/themed-decorators": [
286+
"off",
287+
{
288+
"decorators": {
289+
"listableObjectComponent": 3,
290+
"rendersSectionForMenu": 2
291+
}
292+
}
293+
],
294+
"dspace-angular-ts/themed-wrapper-no-input-defaults": "error",
295+
"dspace-angular-ts/unique-decorators": [
296+
"off",
297+
{
298+
"decorators": [
299+
"listableObjectComponent"
300+
]
301+
}
302+
],
303+
"dspace-angular-ts/sort-standalone-imports": [
304+
"error",
305+
{
306+
"locale": "en-US",
307+
"maxItems": 0,
308+
"indent": 2,
309+
"trailingComma": true
310+
}
311+
]
242312
}
243313
},
244314
{
@@ -253,7 +323,10 @@
253323
"createDefaultProgram": true
254324
},
255325
"rules": {
256-
"prefer-const": "off"
326+
"prefer-const": "off",
327+
328+
// Custom DSpace Angular rules
329+
"dspace-angular-ts/themed-component-usages": "error"
257330
}
258331
},
259332
{
@@ -262,17 +335,26 @@
262335
],
263336
"extends": [
264337
"plugin:@angular-eslint/template/recommended"
265-
]
338+
],
339+
"rules": {
340+
// Custom DSpace Angular rules
341+
"dspace-angular-html/themed-component-usages": "error",
342+
"dspace-angular-html/no-disabled-attribute-on-button": "error",
343+
"@angular-eslint/template/prefer-control-flow": "error"
344+
}
266345
},
267346
{
268347
"files": [
269348
"*.json5"
270349
],
271350
"extends": [
272-
"plugin:jsonc/recommended-with-jsonc"
351+
"plugin:jsonc/recommended-with-json5"
273352
],
274353
"rules": {
275-
"no-irregular-whitespace": "error",
354+
// The ESLint core no-irregular-whitespace rule doesn't work well in JSON
355+
// See: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html
356+
"no-irregular-whitespace": "off",
357+
"jsonc/no-irregular-whitespace": "error",
276358
"no-trailing-spaces": "error",
277359
"jsonc/comma-dangle": [
278360
"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)