Skip to content

Commit 23840fe

Browse files
authored
Merge pull request #910 from nsemets/feature/initial-angular-upgrade
[ENG-10561] Upgrade Angular to Version 21
2 parents 79e7732 + 86e7a0f commit 23840fe

File tree

75 files changed

+7957
-34140
lines changed

Some content is hidden

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

75 files changed

+7957
-34140
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ yarn-error.log
3434
/libpeerconnection.log
3535
testem.log
3636
/typings
37+
/public
3738

3839
# System files
3940
.DS_Store

angular.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"outputPath": "dist/osf",
2222
"index": "src/index.html",
2323
"browser": "src/main.ts",
24-
"polyfills": ["zone.js"],
2524
"tsConfig": "tsconfig.app.json",
2625
"inlineStyleLanguage": "scss",
2726
"allowedCommonJsDependencies": [
@@ -196,9 +195,6 @@
196195
},
197196
"defaultConfiguration": "development"
198197
},
199-
"extract-i18n": {
200-
"builder": "@angular-devkit/build-angular:extract-i18n"
201-
},
202198
"test": {
203199
"builder": "@angular-devkit/build-angular:jest",
204200
"options": {

docs/docker.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ If the application does not open in your browser at [http://localhost:4200](http
161161
This should return something like `0.0.0.0:4200` or `127.0.0.1:4200`.
162162

163163
6. **Bypass browser caching issues**
164-
165164
- Open the site in an incognito/private window.
166165
- Or test with:
167166
```bash

docs/git-convention.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ The local pipeline is managed via husky
3737
To contribute to this repository, follow these steps:
3838

3939
1. **Fork the Repository**
40-
4140
- Go to the main repository page on GitHub [OSF Angular Project](https://github.com/CenterForOpenScience/angular-osf).
4241
- Click the **Fork** button (top-right corner).
4342
- This creates a copy of the repository under your GitHub account.
@@ -56,7 +55,6 @@ To contribute to this repository, follow these steps:
5655
```
5756

5857
4. **Make Your Changes**
59-
6058
- Follow the commit conventions outlined below.
6159
- Ensure all tests pass before committing.
6260

eslint.config.js

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
// @ts-check
22
const eslint = require('@eslint/js');
3+
const { defineConfig } = require('eslint/config');
34
const tseslint = require('typescript-eslint');
45
const angular = require('angular-eslint');
5-
const pluginImport = require('eslint-plugin-import');
6+
67
const pluginSimpleImportSort = require('eslint-plugin-simple-import-sort');
78
const pluginUnusedImports = require('eslint-plugin-unused-imports');
89
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended');
9-
const angularEslintTemplate = require('@angular-eslint/eslint-plugin-template');
10-
const angularTemplateParser = require('@angular-eslint/template-parser');
1110

12-
module.exports = tseslint.config(
11+
module.exports = defineConfig(
1312
{
1413
files: ['**/*.ts'],
1514
extends: [
1615
eslint.configs.recommended,
17-
...tseslint.configs.recommended,
18-
...tseslint.configs.stylistic,
19-
...angular.configs.tsRecommended,
16+
tseslint.configs.recommended,
17+
tseslint.configs.stylistic,
18+
angular.configs.tsRecommended,
2019
eslintPluginPrettierRecommended,
2120
],
2221
processor: angular.processInlineTemplates,
2322
plugins: {
24-
import: pluginImport,
2523
'simple-import-sort': pluginSimpleImportSort,
2624
'unused-imports': pluginUnusedImports,
2725
},
2826
rules: {
2927
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
30-
3128
'@angular-eslint/directive-selector': [
3229
'error',
3330
{
@@ -44,9 +41,7 @@ module.exports = tseslint.config(
4441
style: 'kebab-case',
4542
},
4643
],
47-
'import/first': 'error',
48-
'import/no-duplicates': 'error',
49-
'import/newline-after-import': 'error',
44+
'no-duplicate-imports': 'error',
5045
'simple-import-sort/imports': [
5146
'error',
5247
{
@@ -58,7 +53,7 @@ module.exports = tseslint.config(
5853
['^ngx-', '^@ngx', '^ng-'],
5954

6055
// Third-party packages (primeng)
61-
['^@primeng', '^primeng'],
56+
['^@primeng', '^primeng', '^@primeuix', '^primeuix'],
6257

6358
// RxJS packages (rxjs or @rxjs/...)
6459
['^rxjs', '^rxjs/operators'],
@@ -86,26 +81,29 @@ module.exports = tseslint.config(
8681
},
8782
},
8883
{
89-
files: ['**/*.html'],
90-
languageOptions: {
91-
parser: angularTemplateParser,
92-
},
93-
extends: [...angular.configs.templateRecommended, ...angular.configs.templateAccessibility],
84+
files: ['src/app/**/*.html'],
85+
extends: [
86+
angular.configs.templateRecommended,
87+
angular.configs.templateAccessibility,
88+
eslintPluginPrettierRecommended,
89+
],
9490
rules: {
95-
'@angular-eslint/template/banana-in-box': ['error'],
96-
'@angular-eslint/template/eqeqeq': ['error'],
97-
'@angular-eslint/template/no-negated-async': ['error'],
98-
'@angular-eslint/template/alt-text': ['error'],
99-
'@angular-eslint/template/click-events-have-key-events': ['error'],
100-
'@angular-eslint/template/elements-content': ['error'],
101-
'@angular-eslint/template/interactive-supports-focus': ['error'],
102-
'@angular-eslint/template/label-has-associated-control': ['error'],
103-
'@angular-eslint/template/mouse-events-have-key-events': ['error'],
104-
'@angular-eslint/template/no-autofocus': ['error'],
105-
'@angular-eslint/template/no-distracting-elements': ['error'],
106-
'@angular-eslint/template/role-has-required-aria': ['error'],
107-
'@angular-eslint/template/table-scope': ['error'],
108-
'@angular-eslint/template/valid-aria': ['error'],
91+
'@angular-eslint/template/banana-in-box': 'error',
92+
'@angular-eslint/template/eqeqeq': 'error',
93+
'@angular-eslint/template/no-negated-async': 'error',
94+
'@angular-eslint/template/prefer-control-flow': 'error',
95+
96+
'@angular-eslint/template/alt-text': 'error',
97+
'@angular-eslint/template/click-events-have-key-events': 'error',
98+
'@angular-eslint/template/elements-content': 'error',
99+
'@angular-eslint/template/interactive-supports-focus': 'error',
100+
'@angular-eslint/template/label-has-associated-control': 'error',
101+
'@angular-eslint/template/mouse-events-have-key-events': 'error',
102+
'@angular-eslint/template/no-autofocus': 'error',
103+
'@angular-eslint/template/no-distracting-elements': 'error',
104+
'@angular-eslint/template/role-has-required-aria': 'error',
105+
'@angular-eslint/template/table-scope': 'error',
106+
'@angular-eslint/template/valid-aria': 'error',
109107
},
110108
},
111109
{

0 commit comments

Comments
 (0)