Skip to content

Commit

Permalink
TPv2 Upgrade Angular to 16 (#7562)
Browse files Browse the repository at this point in the history
* Upgrade Angular to 16

* Fix build

* Fix server build

* Revert eslint:recommended changes, add missing rules from compat

* Regenerate package-lock
  • Loading branch information
shamrickus authored Jun 15, 2023
1 parent 3820df2 commit c1bcb90
Show file tree
Hide file tree
Showing 23 changed files with 4,954 additions and 3,451 deletions.
146 changes: 136 additions & 10 deletions experimental/traffic-portal/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,131 @@
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"plugins": [
"@typescript-eslint",
"@angular-eslint",
"eslint-plugin-import",
"eslint-plugin-jsdoc",
"eslint-plugin-prefer-arrow"
],
"rules": {
"@typescript-eslint/interface-name-prefix": "off",
"@angular-eslint/component-class-suffix": "error",
"@angular-eslint/contextual-lifecycle": "error",
"@angular-eslint/directive-class-suffix": "error",
"@angular-eslint/no-conflicting-lifecycle": "error",
"@angular-eslint/no-host-metadata-property": "error",
"@angular-eslint/no-input-rename": "error",
"@angular-eslint/no-inputs-metadata-property": "error",
"@angular-eslint/no-output-native": "error",
"@angular-eslint/no-output-on-prefix": "error",
"@angular-eslint/no-output-rename": "error",
"@angular-eslint/no-outputs-metadata-property": "error",
"@angular-eslint/use-lifecycle-interface": "error",
"@angular-eslint/use-pipe-transform-interface": "error",
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/unified-signatures": "error",
"complexity": "off",
"constructor-super": "error",
"eqeqeq": [
"error",
"smart"
],
"guard-for-in": "error",
"id-blacklist": [
"error",
"any",
"Number",
"number",
"String",
"string",
"Boolean",
"boolean",
"Undefined",
"undefined"
],
"id-match": "error",
"import/no-deprecated": "warn",
"jsdoc/newline-after-description": "error",
"max-classes-per-file": "off",
"no-caller": "error",
"no-cond-assign": "error",
"no-console": [
"error",
{
"allow": [
"log",
"warn",
"dir",
"timeLog",
"assert",
"clear",
"count",
"countReset",
"group",
"groupEnd",
"table",
"dirxml",
"error",
"groupCollapsed",
"Console",
"profile",
"profileEnd",
"timeStamp",
"context"
]
}
],
"no-debugger": "error",
"no-eval": "error",
"no-new-wrappers": "error",
"no-throw-literal": "error",
"no-undef-init": "error",
"no-underscore-dangle": "error",
"no-unsafe-finally": "error",
"no-unused-labels": "error",
"no-var": "error",
"object-shorthand": "error",
"one-var": [
"error",
"never"
],
"prefer-const": "error",
"radix": "error",
"use-isnan": "error",
"valid-typeof": "off",
"arrow-body-style": "error",
"comma-dangle": "off",
"curly": "error",
"eol-last": "error",
"jsdoc/check-alignment": "error",
"max-len": [
"error",
{
"code": 140
}
],
"new-parens": "error",
"no-trailing-spaces": "error",
"quote-props": [
"error",
"as-needed"
],
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"asyncArrow": "always",
"named": "never"
}
],
"quotes": "off",
"@typescript-eslint/type-annotation-spacing": "error",
"@angular-eslint/component-selector": [
"error",
{
Expand Down Expand Up @@ -168,7 +288,9 @@
"allowWithDecorator": true
}
],
"@typescript-eslint/no-duplicate-imports": ["error"],
"@typescript-eslint/no-duplicate-imports": [
"error"
],
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-inferrable-types": [
Expand Down Expand Up @@ -269,7 +391,9 @@
"import/order": [
"error",
{
"alphabetize": {"order": "asc"},
"alphabetize": {
"order": "asc"
},
"groups": [
"builtin",
"external",
Expand Down Expand Up @@ -332,7 +456,9 @@
"patterns": [
{
"message": "Going up more than one directory for an import is overly complex; use an import path that starts with 'src/' instead",
"group": ["../../*"]
"group": [
"../../*"
]
}
]
}
Expand Down Expand Up @@ -376,13 +502,13 @@
// until Angular 15, and should be un-commented once that upgrade is
// done.
"rules": {
"@angular-eslint/template/accessibility-alt-text": "error",
"@angular-eslint/template/accessibility-elements-content": "error",
"@angular-eslint/template/alt-text": "error",
"@angular-eslint/template/elements-content": "error",
// "@angular-eslint/template/accessibility-interactive-supports-focus": "error",
"@angular-eslint/template/accessibility-label-has-associated-control": "error",
"@angular-eslint/template/label-has-associated-control": "error",
// "@angular-eslint/template/accessibility-role-has-required-aria": "error",
"@angular-eslint/template/accessibility-table-scope": "error",
"@angular-eslint/template/accessibility-valid-aria": "error",
"@angular-eslint/template/table-scope": "error",
"@angular-eslint/template/valid-aria": "error",
// I want to see the results of this before committing to it,
// which is difficult to do until I can actually use it.
// "@angular-eslint/template/attributes-order": "warn",
Expand Down
3 changes: 2 additions & 1 deletion experimental/traffic-portal/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
}
],
"sourceMap": false,
"optimization": true
"optimization": true,
"buildOptimizer": true
}
}
},
Expand Down
8 changes: 6 additions & 2 deletions experimental/traffic-portal/nightwatch/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
* limitations under the License.
*/
{
"extends": ["../.eslintrc.json"],
"extends": [
"../.eslintrc.json"
],
"overrides": [
{
"parserOptions": {
Expand All @@ -29,7 +31,9 @@
"error",
{
"selector": "objectLiteralProperty",
"format": ["camelCase"],
"format": [
"camelCase"
],
"filter": {
"regex": "^[a-zA-Z0-9.,!?_: ]+$",
"match": false
Expand Down
Loading

0 comments on commit c1bcb90

Please sign in to comment.