Skip to content

Commit 35a9e7c

Browse files
Merge remote-tracking branch 'dspace/main' into w2p-98422_Thumbnail-uploader_contribute-7.2
2 parents 4ba64fd + 6e53117 commit 35a9e7c

1,783 files changed

Lines changed: 104101 additions & 48865 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/pull_request_template.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## References
22
_Add references/links to any related issues or PRs. These may include:_
3-
* Fixes #[issue-number]
4-
* Requires DSpace/DSpace#[pr-number] (if a REST API PR is required to test this)
3+
* Fixes #`issue-number` (if this fixes an issue ticket)
4+
* Requires DSpace/DSpace#`pr-number` (if a REST API PR is required to test this)
55

66
## Description
77
Short summary of changes (1-2 sentences).
@@ -19,8 +19,10 @@ List of changes in this PR:
1919
_This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!_
2020

2121
- [ ] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
22-
- [ ] My PR passes [TSLint](https://palantir.github.io/tslint/) validation using `yarn run lint`
23-
- [ ] My PR doesn't introduce circular dependencies
22+
- [ ] My PR passes [ESLint](https://eslint.org/) validation using `yarn lint`
23+
- [ ] My PR doesn't introduce circular dependencies (verified via `yarn check-circ-deps`)
2424
- [ ] My PR includes [TypeDoc](https://typedoc.org/) comments for _all new (or modified) public methods and classes_. It also includes TypeDoc for large or complex private methods.
2525
- [ ] My PR passes all specs/tests and includes new/updated specs or tests based on the [Code Testing Guide](https://wiki.lyrasis.org/display/DSPACE/Code+Testing+Guide).
26-
- [ ] If my PR includes new, third-party dependencies (in `package.json`), I've made sure their licenses align with the [DSpace BSD License](https://github.com/DSpace/DSpace/blob/main/LICENSE) based on the [Licensing of Contributions](https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines#CodeContributionGuidelines-LicensingofContributions) documentation.
26+
- [ ] If my PR includes new libraries/dependencies (in `package.json`), I've made sure their licenses align with the [DSpace BSD License](https://github.com/DSpace/DSpace/blob/main/LICENSE) based on the [Licensing of Contributions](https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines#CodeContributionGuidelines-LicensingofContributions) documentation.
27+
- [ ] If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
28+
- [ ] If my PR fixes an issue ticket, I've [linked them together](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).

0 commit comments

Comments
 (0)