From ed0ff610c2b6732a50c0cdfa190a51d55b487c3e Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 28 Jan 2022 12:42:36 +0000 Subject: [PATCH 1/2] build: update angular shared dev-infra code --- .github/workflows/dev-infra.yml | 2 +- .github/workflows/lock-closed.yml | 2 +- package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dev-infra.yml b/.github/workflows/dev-infra.yml index fda7a4fa2047..5c3e49f897c4 100644 --- a/.github/workflows/dev-infra.yml +++ b/.github/workflows/dev-infra.yml @@ -9,6 +9,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: angular/dev-infra/github-actions/commit-message-based-labels@8298e121c51960857ef39abc16b743775ff6be68 + - uses: angular/dev-infra/github-actions/commit-message-based-labels@0fff09d0d3bb34d2b1a535e7be9f32df56cfa6ea with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} diff --git a/.github/workflows/lock-closed.yml b/.github/workflows/lock-closed.yml index f890dfe5d9fd..2b35317e9be9 100644 --- a/.github/workflows/lock-closed.yml +++ b/.github/workflows/lock-closed.yml @@ -9,6 +9,6 @@ jobs: lock_closed: runs-on: ubuntu-latest steps: - - uses: angular/dev-infra/github-actions/lock-closed@8298e121c51960857ef39abc16b743775ff6be68 + - uses: angular/dev-infra/github-actions/lock-closed@0fff09d0d3bb34d2b1a535e7be9f32df56cfa6ea with: lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }} diff --git a/package.json b/package.json index fd603573f348..f6cc754c358c 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "@angular/bazel": "13.2.0", "@angular/cli": "13.2.0", "@angular/compiler-cli": "13.2.0", - "@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#2b0196f6ebf6de2e62836e962b9f42007e6cf5d6", + "@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#f589cd87f196e09a775d8be25a0f83672f78fc99", "@angular/localize": "13.2.0", "@angular/platform-browser-dynamic": "13.2.0", "@angular/platform-server": "13.2.0", diff --git a/yarn.lock b/yarn.lock index c7d167784bdb..3c184e209006 100644 --- a/yarn.lock +++ b/yarn.lock @@ -350,10 +350,10 @@ dependencies: tslib "^2.0.0" -"@angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#2b0196f6ebf6de2e62836e962b9f42007e6cf5d6": - version "0.0.0-8298e121c51960857ef39abc16b743775ff6be68" - uid "2b0196f6ebf6de2e62836e962b9f42007e6cf5d6" - resolved "https://github.com/angular/dev-infra-private-builds.git#2b0196f6ebf6de2e62836e962b9f42007e6cf5d6" +"@angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#f589cd87f196e09a775d8be25a0f83672f78fc99": + version "0.0.0-0fff09d0d3bb34d2b1a535e7be9f32df56cfa6ea" + uid f589cd87f196e09a775d8be25a0f83672f78fc99 + resolved "https://github.com/angular/dev-infra-private-builds.git#f589cd87f196e09a775d8be25a0f83672f78fc99" dependencies: "@actions/core" "^1.4.0" "@actions/github" "^5.0.0" From 321667c83ff1b38d7d67c5892cfcb176a98e1861 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Fri, 28 Jan 2022 13:49:11 +0100 Subject: [PATCH 2/2] refactor: format all json files with `ng-dev format` command With the latest build of the shared dev-infra tool, we have enabled `.json` file formatting by default if the `prettier` formatter is configured in `.ng-dev/format.ts`. This commit formats all JSON files to ensure lint/the format check continues to pass. --- .ng-dev/tsconfig.json | 2 +- .stylelintrc.json | 90 +++++++++----- .vscode/extensions.json | 5 +- .vscode/settings.json | 4 +- firebase.json | 4 +- goldens/ts-circular-deps.json | 27 +---- goldens/tsec-exemption.json | 8 +- integration/harness-e2e-cli/angular.json | 18 +-- integration/harness-e2e-cli/e2e/jasmine.json | 4 +- integration/harness-e2e-cli/e2e/package.json | 2 +- integration/harness-e2e-cli/e2e/tsconfig.json | 10 +- integration/harness-e2e-cli/tsconfig.app.json | 9 +- integration/harness-e2e-cli/tsconfig.json | 5 +- .../harness-e2e-cli/tsconfig.spec.json | 14 +-- integration/ng-add/angular.json | 18 +-- integration/ng-add/tsconfig.app.json | 9 +- integration/ng-add/tsconfig.json | 5 +- integration/ng-add/tsconfig.spec.json | 14 +-- integration/ng-update-v13/angular.json | 18 +-- integration/ng-update-v13/tsconfig.app.json | 9 +- integration/ng-update-v13/tsconfig.json | 5 +- integration/ng-update-v13/tsconfig.spec.json | 14 +-- .../firebase-functions/tsconfig.json | 4 +- src/cdk/package.json | 24 +++- .../ng-generate/drag-drop/schema.json | 2 +- .../schematics/ng-update/devkit-migration.ts | 5 +- src/cdk/schematics/tsconfig.json | 12 +- src/components-examples/package.json | 4 +- src/google-maps/tsconfig.json | 9 +- .../mdc-snack-bar/tsconfig-build.json | 5 +- .../mdc-table/tsconfig-build.json | 5 +- src/material/package.json | 1 - src/material/schematics/ng-add/schema.json | 22 +++- .../ng-generate/address-form/schema.json | 2 +- .../ng-generate/dashboard/schema.json | 2 +- .../ng-generate/navigation/schema.json | 2 +- .../schematics/ng-generate/table/schema.json | 2 +- .../schematics/ng-generate/tree/schema.json | 2 +- src/material/schematics/tsconfig.json | 5 +- src/tsconfig-legacy.json | 6 +- src/tsconfig-tsec.json | 5 +- tools/dgeni/tsconfig.json | 4 +- tools/markdown-to-html/tsconfig.json | 9 +- tsconfig.json | 2 +- tslint.json | 112 +++++++++--------- 45 files changed, 228 insertions(+), 312 deletions(-) diff --git a/.ng-dev/tsconfig.json b/.ng-dev/tsconfig.json index 9e9c1b746523..1dc78b36afb1 100644 --- a/.ng-dev/tsconfig.json +++ b/.ng-dev/tsconfig.json @@ -6,5 +6,5 @@ "noEmit": true, "skipLibCheck": true, "types": [] - }, + } } diff --git a/.stylelintrc.json b/.stylelintrc.json index 72cbf7187eea..a50185edd205 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -17,29 +17,54 @@ "./tools/stylelint/no-unused-import.ts" ], "rules": { - "material/no-prefixes": [true, { - "browsers": ["last 2 versions", "not dead", "not and_qq > 0", "not OperaMini all", "not ie > 0", "not edge < 78"], - "filePattern": "**/!(*-example.css)" - }], + "material/no-prefixes": [ + true, + { + "browsers": [ + "last 2 versions", + "not dead", + "not and_qq > 0", + "not OperaMini all", + "not ie > 0", + "not edge < 78" + ], + "filePattern": "**/!(*-example.css)" + } + ], "material/theme-mixin-api": true, "material/selector-no-deep": true, "material/no-nested-mixin": true, "material/no-unused-import": true, - "material/single-line-comment-only": [true, { - "filePattern": "\\.scss$" - }], - "material/no-import": [true, { - "exclude": "\\.import\\.scss$" - }], - "material/no-ampersand-beyond-selector-start": [true, { - "filePattern": "-theme\\.scss$" - }], - "material/no-concrete-rules": [true, { - "filePattern": "^_.*\\.scss$" - }], - "material/no-top-level-ampersand-in-mixin": [true, { - "filePattern": "-theme\\.scss$" - }], + "material/single-line-comment-only": [ + true, + { + "filePattern": "\\.scss$" + } + ], + "material/no-import": [ + true, + { + "exclude": "\\.import\\.scss$" + } + ], + "material/no-ampersand-beyond-selector-start": [ + true, + { + "filePattern": "-theme\\.scss$" + } + ], + "material/no-concrete-rules": [ + true, + { + "filePattern": "^_.*\\.scss$" + } + ], + "material/no-top-level-ampersand-in-mixin": [ + true, + { + "filePattern": "-theme\\.scss$" + } + ], "color-hex-case": "lower", "color-no-invalid-hex": true, @@ -71,9 +96,12 @@ "property-case": "lower", "no-duplicate-at-import-rules": true, - "declaration-block-no-duplicate-properties": [true, { - "ignore": ["consecutive-duplicates-with-different-values"] - }], + "declaration-block-no-duplicate-properties": [ + true, + { + "ignore": ["consecutive-duplicates-with-different-values"] + } + ], "declaration-block-trailing-semicolon": "always", "declaration-block-single-line-max-declarations": 1, "declaration-block-semicolon-space-before": "never", @@ -105,12 +133,18 @@ "selector-max-id": 0, "no-missing-end-of-source-newline": true, "no-eol-whitespace": true, - "max-line-length": [100, { - "ignorePattern": "/https?://.*/" - }], + "max-line-length": [ + 100, + { + "ignorePattern": "/https?://.*/" + } + ], "linebreaks": "unix", - "selector-class-pattern": ["^_?(mat-|cdk-|example-|demo-|ng-|mdc-|map-|test-)", { - "resolveNestedSelectors": true - }] + "selector-class-pattern": [ + "^_?(mat-|cdk-|example-|demo-|ng-|mdc-|map-|test-)", + { + "resolveNestedSelectors": true + } + ] } } diff --git a/.vscode/extensions.json b/.vscode/extensions.json index ba8740af8547..c297ab5ab359 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,8 +3,5 @@ // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp // List of extensions which should be recommended for users of this workspace. - "recommendations": [ - "ms-vscode.vscode-typescript-tslint-plugin", - "esbenp.prettier-vscode" - ] + "recommendations": ["ms-vscode.vscode-typescript-tslint-plugin", "esbenp.prettier-vscode"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 277935bdd679..41c5b54f499c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,12 +4,12 @@ "**/.git/subtree-cache/**": true, "**/node_modules/**": true, "**/bazel-out/**": true, - "**/dist/**": true, + "**/dist/**": true }, "search.exclude": { "**/node_modules": true, "**/bazel-out": true, - "**/dist": true, + "**/dist": true }, "git.ignoreLimitWarning": true, "[javascript]": { diff --git a/firebase.json b/firebase.json index f1218e3d73f8..d3cec544b0e9 100644 --- a/firebase.json +++ b/firebase.json @@ -18,8 +18,6 @@ ] } ], - "ignore": [ - "firebase.json" - ] + "ignore": ["firebase.json"] } } diff --git a/goldens/ts-circular-deps.json b/goldens/ts-circular-deps.json index 9eff1107cbcb..8405fc95263a 100644 --- a/goldens/ts-circular-deps.json +++ b/goldens/ts-circular-deps.json @@ -3,29 +3,14 @@ "src/cdk-experimental/dialog/dialog-config.ts", "src/cdk-experimental/dialog/dialog-container.ts" ], - [ - "src/cdk/drag-drop/directives/drag.ts", - "src/cdk/drag-drop/directives/drop-list.ts" - ], - [ - "src/cdk/drag-drop/directives/drag.ts", - "src/cdk/drag-drop/drag-events.ts" - ], + ["src/cdk/drag-drop/directives/drag.ts", "src/cdk/drag-drop/directives/drop-list.ts"], + ["src/cdk/drag-drop/directives/drag.ts", "src/cdk/drag-drop/drag-events.ts"], [ "src/cdk/drag-drop/directives/drag.ts", "src/cdk/drag-drop/drag-events.ts", "src/cdk/drag-drop/directives/drop-list.ts" ], - [ - "src/cdk/drag-drop/drag-ref.ts", - "src/cdk/drag-drop/drop-list-ref.ts" - ], - [ - "src/cdk/scrolling/scroll-dispatcher.ts", - "src/cdk/scrolling/scrollable.ts" - ], - [ - "src/cdk/scrolling/virtual-scroll-strategy.ts", - "src/cdk/scrolling/virtual-scroll-viewport.ts" - ] -] \ No newline at end of file + ["src/cdk/drag-drop/drag-ref.ts", "src/cdk/drag-drop/drop-list-ref.ts"], + ["src/cdk/scrolling/scroll-dispatcher.ts", "src/cdk/scrolling/scrollable.ts"], + ["src/cdk/scrolling/virtual-scroll-strategy.ts", "src/cdk/scrolling/virtual-scroll-viewport.ts"] +] diff --git a/goldens/tsec-exemption.json b/goldens/tsec-exemption.json index 17bc2283c356..5151eafcce0b 100644 --- a/goldens/tsec-exemption.json +++ b/goldens/tsec-exemption.json @@ -1,10 +1,6 @@ { - "ban-trustedtypes-createpolicy": [ - "../src/material/icon/trusted-types.ts" - ], - "ban-element-innerhtml-assignments": [ - "../src/material/icon/icon-registry.ts" - ], + "ban-trustedtypes-createpolicy": ["../src/material/icon/trusted-types.ts"], + "ban-element-innerhtml-assignments": ["../src/material/icon/icon-registry.ts"], "ban-element-setattribute": [ "../src/cdk/a11y/aria-describer/aria-reference.ts", "../src/material-experimental/mdc-checkbox/checkbox.ts", diff --git a/integration/harness-e2e-cli/angular.json b/integration/harness-e2e-cli/angular.json index b3a1e66d2325..d0e36b1cfac3 100644 --- a/integration/harness-e2e-cli/angular.json +++ b/integration/harness-e2e-cli/angular.json @@ -26,13 +26,8 @@ "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.app.json", "inlineStyleLanguage": "scss", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss" - ], + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], "scripts": [] }, "configurations": { @@ -94,13 +89,8 @@ "tsConfig": "tsconfig.spec.json", "karmaConfig": "karma.conf.js", "inlineStyleLanguage": "scss", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss" - ], + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], "scripts": [] } } diff --git a/integration/harness-e2e-cli/e2e/jasmine.json b/integration/harness-e2e-cli/e2e/jasmine.json index a48eaf5e5f57..7a741b447099 100644 --- a/integration/harness-e2e-cli/e2e/jasmine.json +++ b/integration/harness-e2e-cli/e2e/jasmine.json @@ -1,8 +1,6 @@ { "spec_dir": "e2e", - "spec_files": [ - "**/*.spec.ts" - ], + "spec_files": ["**/*.spec.ts"], "env": { "random": true } diff --git a/integration/harness-e2e-cli/e2e/package.json b/integration/harness-e2e-cli/e2e/package.json index 472002573ef7..3dbc1ca591c0 100644 --- a/integration/harness-e2e-cli/e2e/package.json +++ b/integration/harness-e2e-cli/e2e/package.json @@ -1,3 +1,3 @@ { - "type": "module" + "type": "module" } diff --git a/integration/harness-e2e-cli/e2e/tsconfig.json b/integration/harness-e2e-cli/e2e/tsconfig.json index 6b985880fd35..82ff331da23a 100644 --- a/integration/harness-e2e-cli/e2e/tsconfig.json +++ b/integration/harness-e2e-cli/e2e/tsconfig.json @@ -1,7 +1,7 @@ { - "compilerOptions": { - "module": "es2020", - "target": "es2020", - "moduleResolution": "node", - } + "compilerOptions": { + "module": "es2020", + "target": "es2020", + "moduleResolution": "node" + } } diff --git a/integration/harness-e2e-cli/tsconfig.app.json b/integration/harness-e2e-cli/tsconfig.app.json index 82d91dc4a4de..ff396d4ce2d8 100644 --- a/integration/harness-e2e-cli/tsconfig.app.json +++ b/integration/harness-e2e-cli/tsconfig.app.json @@ -5,11 +5,6 @@ "outDir": "./out-tsc/app", "types": [] }, - "files": [ - "src/main.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.d.ts" - ] + "files": ["src/main.ts", "src/polyfills.ts"], + "include": ["src/**/*.d.ts"] } diff --git a/integration/harness-e2e-cli/tsconfig.json b/integration/harness-e2e-cli/tsconfig.json index f531992d6edc..e8b101db71d3 100644 --- a/integration/harness-e2e-cli/tsconfig.json +++ b/integration/harness-e2e-cli/tsconfig.json @@ -18,10 +18,7 @@ "importHelpers": true, "target": "es2017", "module": "es2020", - "lib": [ - "es2020", - "dom" - ] + "lib": ["es2020", "dom"] }, "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, diff --git a/integration/harness-e2e-cli/tsconfig.spec.json b/integration/harness-e2e-cli/tsconfig.spec.json index 092345b02e80..669344f8d2b7 100644 --- a/integration/harness-e2e-cli/tsconfig.spec.json +++ b/integration/harness-e2e-cli/tsconfig.spec.json @@ -3,16 +3,8 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/spec", - "types": [ - "jasmine" - ] + "types": ["jasmine"] }, - "files": [ - "src/test.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] + "files": ["src/test.ts", "src/polyfills.ts"], + "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] } diff --git a/integration/ng-add/angular.json b/integration/ng-add/angular.json index 44806f56181e..274bde61e36b 100644 --- a/integration/ng-add/angular.json +++ b/integration/ng-add/angular.json @@ -26,13 +26,8 @@ "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.app.json", "inlineStyleLanguage": "scss", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss" - ], + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], "scripts": [] }, "configurations": { @@ -94,13 +89,8 @@ "tsConfig": "tsconfig.spec.json", "karmaConfig": "karma.conf.js", "inlineStyleLanguage": "scss", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss" - ], + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], "scripts": [], "watch": false } diff --git a/integration/ng-add/tsconfig.app.json b/integration/ng-add/tsconfig.app.json index 82d91dc4a4de..ff396d4ce2d8 100644 --- a/integration/ng-add/tsconfig.app.json +++ b/integration/ng-add/tsconfig.app.json @@ -5,11 +5,6 @@ "outDir": "./out-tsc/app", "types": [] }, - "files": [ - "src/main.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.d.ts" - ] + "files": ["src/main.ts", "src/polyfills.ts"], + "include": ["src/**/*.d.ts"] } diff --git a/integration/ng-add/tsconfig.json b/integration/ng-add/tsconfig.json index 9d4bd329a745..9664ff00d13c 100644 --- a/integration/ng-add/tsconfig.json +++ b/integration/ng-add/tsconfig.json @@ -18,10 +18,7 @@ "importHelpers": true, "target": "es2017", "module": "es2020", - "lib": [ - "es2018", - "dom" - ] + "lib": ["es2018", "dom"] }, "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, diff --git a/integration/ng-add/tsconfig.spec.json b/integration/ng-add/tsconfig.spec.json index 092345b02e80..669344f8d2b7 100644 --- a/integration/ng-add/tsconfig.spec.json +++ b/integration/ng-add/tsconfig.spec.json @@ -3,16 +3,8 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/spec", - "types": [ - "jasmine" - ] + "types": ["jasmine"] }, - "files": [ - "src/test.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] + "files": ["src/test.ts", "src/polyfills.ts"], + "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] } diff --git a/integration/ng-update-v13/angular.json b/integration/ng-update-v13/angular.json index c7201b0c8111..be048fa46824 100644 --- a/integration/ng-update-v13/angular.json +++ b/integration/ng-update-v13/angular.json @@ -26,13 +26,8 @@ "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.app.json", "inlineStyleLanguage": "scss", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss" - ], + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], "scripts": [] }, "configurations": { @@ -94,13 +89,8 @@ "tsConfig": "tsconfig.spec.json", "karmaConfig": "karma.conf.js", "inlineStyleLanguage": "scss", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss" - ], + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], "scripts": [] } } diff --git a/integration/ng-update-v13/tsconfig.app.json b/integration/ng-update-v13/tsconfig.app.json index 82d91dc4a4de..ff396d4ce2d8 100644 --- a/integration/ng-update-v13/tsconfig.app.json +++ b/integration/ng-update-v13/tsconfig.app.json @@ -5,11 +5,6 @@ "outDir": "./out-tsc/app", "types": [] }, - "files": [ - "src/main.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.d.ts" - ] + "files": ["src/main.ts", "src/polyfills.ts"], + "include": ["src/**/*.d.ts"] } diff --git a/integration/ng-update-v13/tsconfig.json b/integration/ng-update-v13/tsconfig.json index 9d4bd329a745..9664ff00d13c 100644 --- a/integration/ng-update-v13/tsconfig.json +++ b/integration/ng-update-v13/tsconfig.json @@ -18,10 +18,7 @@ "importHelpers": true, "target": "es2017", "module": "es2020", - "lib": [ - "es2018", - "dom" - ] + "lib": ["es2018", "dom"] }, "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, diff --git a/integration/ng-update-v13/tsconfig.spec.json b/integration/ng-update-v13/tsconfig.spec.json index 092345b02e80..669344f8d2b7 100644 --- a/integration/ng-update-v13/tsconfig.spec.json +++ b/integration/ng-update-v13/tsconfig.spec.json @@ -3,16 +3,8 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/spec", - "types": [ - "jasmine" - ] + "types": ["jasmine"] }, - "files": [ - "src/test.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] + "files": ["src/test.ts", "src/polyfills.ts"], + "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] } diff --git a/scripts/caretaking/firebase-functions/tsconfig.json b/scripts/caretaking/firebase-functions/tsconfig.json index e352dab0b2b8..9388ecac027b 100644 --- a/scripts/caretaking/firebase-functions/tsconfig.json +++ b/scripts/caretaking/firebase-functions/tsconfig.json @@ -11,7 +11,5 @@ "types": [] }, "compileOnSave": true, - "include": [ - "src" - ] + "include": ["src"] } diff --git a/src/cdk/package.json b/src/cdk/package.json index bd9bb214f247..071964171d35 100644 --- a/src/cdk/package.json +++ b/src/cdk/package.json @@ -22,12 +22,24 @@ ".": { "sass": "./_index.scss" }, - "./a11y-prebuilt.css": {"style": "./a11y-prebuilt.css"}, - "./a11y-prebuilt": {"style": "./a11y-prebuilt.css"}, - "./overlay-prebuilt.css": {"style": "./overlay-prebuilt.css"}, - "./overlay-prebuilt": {"style": "./overlay-prebuilt.css"}, - "./text-field-prebuilt.css": {"style": "./text-field-prebuilt.css"}, - "./text-field-prebuilt": {"style": "./text-field-prebuilt.css"}, + "./a11y-prebuilt.css": { + "style": "./a11y-prebuilt.css" + }, + "./a11y-prebuilt": { + "style": "./a11y-prebuilt.css" + }, + "./overlay-prebuilt.css": { + "style": "./overlay-prebuilt.css" + }, + "./overlay-prebuilt": { + "style": "./overlay-prebuilt.css" + }, + "./text-field-prebuilt.css": { + "style": "./text-field-prebuilt.css" + }, + "./text-field-prebuilt": { + "style": "./text-field-prebuilt.css" + }, "./schematics": { "default": "./schematics/index.js" } diff --git a/src/cdk/schematics/ng-generate/drag-drop/schema.json b/src/cdk/schematics/ng-generate/drag-drop/schema.json index 4b8c37175888..cc7f69170d95 100644 --- a/src/cdk/schematics/ng-generate/drag-drop/schema.json +++ b/src/cdk/schematics/ng-generate/drag-drop/schema.json @@ -78,7 +78,7 @@ "format": "html-selector", "description": "The selector to use for the component." }, - "module": { + "module": { "type": "string", "description": "Allows specification of the declaring module.", "alias": "m" diff --git a/src/cdk/schematics/ng-update/devkit-migration.ts b/src/cdk/schematics/ng-update/devkit-migration.ts index 2d4fa8f0723a..138af851233d 100644 --- a/src/cdk/schematics/ng-update/devkit-migration.ts +++ b/src/cdk/schematics/ng-update/devkit-migration.ts @@ -42,5 +42,6 @@ export abstract class DevkitMigration extends Migration = Constructor> & - {[m in keyof typeof DevkitMigration]: typeof DevkitMigration[m]}; +export type DevkitMigrationCtor = Constructor> & { + [m in keyof typeof DevkitMigration]: typeof DevkitMigration[m]; +}; diff --git a/src/cdk/schematics/tsconfig.json b/src/cdk/schematics/tsconfig.json index ad4a933f4ce2..0f9346a17cfe 100644 --- a/src/cdk/schematics/tsconfig.json +++ b/src/cdk/schematics/tsconfig.json @@ -19,17 +19,9 @@ "strictFunctionTypes": true, "sourceMap": true, "target": "es2015", - "types": [ - "jasmine", - "node" - ] + "types": ["jasmine", "node"] }, - "exclude": [ - "**/files/**/*", - "**/*.spec.ts", - "ng-update/test-cases/**/*", - "testing/**/*.ts" - ], + "exclude": ["**/files/**/*", "**/*.spec.ts", "ng-update/test-cases/**/*", "testing/**/*.ts"], "bazelOptions": { "suppressTsconfigOverrideWarnings": true } diff --git a/src/components-examples/package.json b/src/components-examples/package.json index 785de023ff1b..bdd81e2ed45d 100644 --- a/src/components-examples/package.json +++ b/src/components-examples/package.json @@ -14,7 +14,9 @@ "components" ], "exports": { - "./fesm2020": {"default": "./fesm2020"} + "./fesm2020": { + "default": "./fesm2020" + } }, "license": "MIT", "bugs": { diff --git a/src/google-maps/tsconfig.json b/src/google-maps/tsconfig.json index d57281895299..10f13e87d57c 100644 --- a/src/google-maps/tsconfig.json +++ b/src/google-maps/tsconfig.json @@ -5,12 +5,7 @@ "rootDir": "..", "baseUrl": ".", "paths": {}, - "types": [ - "jasmine" - ] + "types": ["jasmine"] }, - "include": [ - "./**/*.ts", - "../dev-mode-types.d.ts" - ] + "include": ["./**/*.ts", "../dev-mode-types.d.ts"] } diff --git a/src/material-experimental/mdc-snack-bar/tsconfig-build.json b/src/material-experimental/mdc-snack-bar/tsconfig-build.json index c7f596c14adb..8d620608c839 100644 --- a/src/material-experimental/mdc-snack-bar/tsconfig-build.json +++ b/src/material-experimental/mdc-snack-bar/tsconfig-build.json @@ -1,9 +1,6 @@ { "extends": "../tsconfig-build", - "files": [ - "public-api.ts", - "../dev-mode-types.d.ts" - ], + "files": ["public-api.ts", "../dev-mode-types.d.ts"], "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, diff --git a/src/material-experimental/mdc-table/tsconfig-build.json b/src/material-experimental/mdc-table/tsconfig-build.json index 05628eb9342a..b5209313fdba 100644 --- a/src/material-experimental/mdc-table/tsconfig-build.json +++ b/src/material-experimental/mdc-table/tsconfig-build.json @@ -1,9 +1,6 @@ { "extends": "../tsconfig-build", - "files": [ - "public-api.ts", - "../dev-mode-types.d.ts" - ], + "files": ["public-api.ts", "../dev-mode-types.d.ts"], "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, diff --git a/src/material/package.json b/src/material/package.json index 5f0f04f4c79d..217a88cef08e 100644 --- a/src/material/package.json +++ b/src/material/package.json @@ -68,4 +68,3 @@ }, "sideEffects": false } - diff --git a/src/material/schematics/ng-add/schema.json b/src/material/schematics/ng-add/schema.json index 0fb0c773fd9f..e298bd5ff97c 100644 --- a/src/material/schematics/ng-add/schema.json +++ b/src/material/schematics/ng-add/schema.json @@ -19,11 +19,23 @@ "message": "Choose a prebuilt theme name, or \"custom\" for a custom theme:", "type": "list", "items": [ - { "value": "indigo-pink", "label": "Indigo/Pink [ Preview: https://material.angular.io?theme=indigo-pink ]" }, - { "value": "deeppurple-amber", "label": "Deep Purple/Amber [ Preview: https://material.angular.io?theme=deeppurple-amber ]" }, - { "value": "pink-bluegrey", "label": "Pink/Blue Grey [ Preview: https://material.angular.io?theme=pink-bluegrey ]" }, - { "value": "purple-green", "label": "Purple/Green [ Preview: https://material.angular.io?theme=purple-green ]" }, - { "value": "custom", "label": "Custom" } + { + "value": "indigo-pink", + "label": "Indigo/Pink [ Preview: https://material.angular.io?theme=indigo-pink ]" + }, + { + "value": "deeppurple-amber", + "label": "Deep Purple/Amber [ Preview: https://material.angular.io?theme=deeppurple-amber ]" + }, + { + "value": "pink-bluegrey", + "label": "Pink/Blue Grey [ Preview: https://material.angular.io?theme=pink-bluegrey ]" + }, + { + "value": "purple-green", + "label": "Purple/Green [ Preview: https://material.angular.io?theme=purple-green ]" + }, + {"value": "custom", "label": "Custom"} ] } }, diff --git a/src/material/schematics/ng-generate/address-form/schema.json b/src/material/schematics/ng-generate/address-form/schema.json index 83d385bcf6d6..c7f4e3ca168a 100644 --- a/src/material/schematics/ng-generate/address-form/schema.json +++ b/src/material/schematics/ng-generate/address-form/schema.json @@ -78,7 +78,7 @@ "format": "html-selector", "description": "The selector to use for the component." }, - "module": { + "module": { "type": "string", "description": "Allows specification of the declaring module.", "alias": "m" diff --git a/src/material/schematics/ng-generate/dashboard/schema.json b/src/material/schematics/ng-generate/dashboard/schema.json index b99839ab358e..aab7e2ea45f4 100644 --- a/src/material/schematics/ng-generate/dashboard/schema.json +++ b/src/material/schematics/ng-generate/dashboard/schema.json @@ -78,7 +78,7 @@ "format": "html-selector", "description": "The selector to use for the component." }, - "module": { + "module": { "type": "string", "description": "Allows specification of the declaring module.", "alias": "m" diff --git a/src/material/schematics/ng-generate/navigation/schema.json b/src/material/schematics/ng-generate/navigation/schema.json index b1e097f35b37..f7c9e0e458d0 100644 --- a/src/material/schematics/ng-generate/navigation/schema.json +++ b/src/material/schematics/ng-generate/navigation/schema.json @@ -78,7 +78,7 @@ "format": "html-selector", "description": "The selector to use for the component." }, - "module": { + "module": { "type": "string", "description": "Allows specification of the declaring module.", "alias": "m" diff --git a/src/material/schematics/ng-generate/table/schema.json b/src/material/schematics/ng-generate/table/schema.json index 19fdb15a8c95..5a65ff348d7a 100644 --- a/src/material/schematics/ng-generate/table/schema.json +++ b/src/material/schematics/ng-generate/table/schema.json @@ -78,7 +78,7 @@ "format": "html-selector", "description": "The selector to use for the component." }, - "module": { + "module": { "type": "string", "description": "Allows specification of the declaring module.", "alias": "m" diff --git a/src/material/schematics/ng-generate/tree/schema.json b/src/material/schematics/ng-generate/tree/schema.json index e836ee58524a..1d629a86a296 100644 --- a/src/material/schematics/ng-generate/tree/schema.json +++ b/src/material/schematics/ng-generate/tree/schema.json @@ -78,7 +78,7 @@ "format": "html-selector", "description": "The selector to use for the component." }, - "module": { + "module": { "type": "string", "description": "Allows specification of the declaring module.", "alias": "m" diff --git a/src/material/schematics/tsconfig.json b/src/material/schematics/tsconfig.json index f6a7fc7e9996..c82bc7202f2f 100644 --- a/src/material/schematics/tsconfig.json +++ b/src/material/schematics/tsconfig.json @@ -20,10 +20,7 @@ "sourceMap": true, "declaration": true, "target": "es6", - "types": [ - "jasmine", - "node" - ], + "types": ["jasmine", "node"], "baseUrl": ".", "paths": { "@angular/cdk/schematics": ["../../cdk/schematics"] diff --git a/src/tsconfig-legacy.json b/src/tsconfig-legacy.json index 813c81f0fea5..9decccd4c33c 100644 --- a/src/tsconfig-legacy.json +++ b/src/tsconfig-legacy.json @@ -12,11 +12,7 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true }, - "include": [ - "**/*.spec.ts", - "dev-mode-types.d.ts", - "../node_modules/zone.js/zone.d.ts" - ], + "include": ["**/*.spec.ts", "dev-mode-types.d.ts", "../node_modules/zone.js/zone.d.ts"], "exclude": [ "**/*.e2e.spec.ts", "./cdk/schematics/**/*", diff --git a/src/tsconfig-tsec.json b/src/tsconfig-tsec.json index e397df4d2315..458f91cb5521 100644 --- a/src/tsconfig-tsec.json +++ b/src/tsconfig-tsec.json @@ -1,9 +1,6 @@ { "extends": "./bazel-tsconfig-build.json", "compilerOptions": { - "plugins": [ - {"name": "tsec", "exemptionConfig": "../goldens/tsec-exemption.json"} - ] + "plugins": [{"name": "tsec", "exemptionConfig": "../goldens/tsec-exemption.json"}] } } - diff --git a/tools/dgeni/tsconfig.json b/tools/dgeni/tsconfig.json index aa7ba162820a..90a80bf846dd 100644 --- a/tools/dgeni/tsconfig.json +++ b/tools/dgeni/tsconfig.json @@ -14,8 +14,6 @@ "noFallthroughCasesInSwitch": true, "noImplicitOverride": true, "target": "es2020", - "types": [ - "node" - ] + "types": ["node"] } } diff --git a/tools/markdown-to-html/tsconfig.json b/tools/markdown-to-html/tsconfig.json index 4c6a8a27c956..42b8317aeb81 100644 --- a/tools/markdown-to-html/tsconfig.json +++ b/tools/markdown-to-html/tsconfig.json @@ -5,14 +5,9 @@ "target": "es2020", "esModuleInterop": true, "sourceMap": true, - "types": [ - "jasmine", - "node" - ] + "types": ["jasmine", "node"] }, - "exclude": [ - "*.spec.ts", - ], + "exclude": ["*.spec.ts"], "bazelOptions": { "suppressTsconfigOverrideWarnings": true } diff --git a/tsconfig.json b/tsconfig.json index e43821a84866..444cf8724da0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -39,7 +39,7 @@ } }, "angularCompilerOptions": { - "strictTemplates": true, + "strictTemplates": true }, "include": [ "src/**/*.ts", diff --git a/tslint.json b/tslint.json index c2433bd22e07..b8ab009b44db 100644 --- a/tslint.json +++ b/tslint.json @@ -1,28 +1,17 @@ { - "extends": [ - "rxjs-tslint-rules" - ], + "extends": ["rxjs-tslint-rules"], "rulesDirectory": [ "./tools/tslint-rules/", "node_modules/vrsource-tslint-rules/rules", "node_modules/codelyzer" ], "rules": { - "ban-types": [ - true, - [ - "ReadonlyArray<.+>", - "Use 'readonly T[]' instead." - ] - ], + "ban-types": [true, ["ReadonlyArray<.+>", "Use 'readonly T[]' instead."]], // Disable this flag because of SHA tslint#48b0c597f9257712c7d1f04b55ed0aa60e333f6a // TSLint now shows warnings if types for properties are inferred. This rule needs to be // disabled because all properties need to have explicit types set to work for Dgeni. "no-inferrable-types": false, - "comment-format": [ - true, - "check-space" - ], + "comment-format": [true, "check-space"], "eofline": true, "no-construct": true, "prefer-literal": [true, "object"], @@ -56,7 +45,10 @@ {"name": ["Object", "assign"], "message": "Use the spread operator instead."}, {"name": ["*", "asObservable"], "message": "Cast to Observable type instead."}, {"name": ["*", "removeChild"], "message": "Use `remove` instead instead."}, - {"name": ["isDevMode"], "message": "Use `typeof ngDevMode === 'undefined' || ngDevMode` instead"} + { + "name": ["isDevMode"], + "message": "Use `typeof ngDevMode === 'undefined' || ngDevMode` instead" + } ], // Avoids inconsistent linebreak styles in source files. Forces developers to use LF linebreaks. "linebreak-style": [true, "LF"], @@ -101,47 +93,50 @@ ["Directionality", "DateAdapter"] ], "no-coercion-members": true, - "no-host-decorator-in-concrete": [ + "no-host-decorator-in-concrete": [true, "HostBinding", "HostListener"], + "member-naming": [ true, - "HostBinding", - "HostListener" + { + "private": "^_" + } ], - "member-naming": [true, { - "private": "^_" - }], "symbol-naming": [true, "^_?[A-Z][a-zA-Z0-9]*$"], - "validate-decorators": [true, { - "Component": { - "argument": 0, - "properties": { - "!host": "\\[class\\]", - "!preserveWhitespaces": ".*", - "!styles": ".*", - "!moduleId": ".*", - "changeDetection": "\\.OnPush$", - "encapsulation": "\\.None$" - } - }, - "Directive": { - "argument": 0, - "properties": { - "!host": "\\[class\\]" - } - }, - "NgModule": { - "argument": 0, - "properties": { - "*": "^(?!\\s*$).+" + "validate-decorators": [ + true, + { + "Component": { + "argument": 0, + "properties": { + "!host": "\\[class\\]", + "!preserveWhitespaces": ".*", + "!styles": ".*", + "!moduleId": ".*", + "changeDetection": "\\.OnPush$", + "encapsulation": "\\.None$" + } + }, + "Directive": { + "argument": 0, + "properties": { + "!host": "\\[class\\]" + } + }, + "NgModule": { + "argument": 0, + "properties": { + "*": "^(?!\\s*$).+" + } + }, + "ContentChildren": { + "argument": 1, + "required": true, + "properties": { + "descendants": "^(true|false)$" + } } }, - "ContentChildren": { - "argument": 1, - "required": true, - "properties": { - "descendants": "^(true|false)$" - } - } - }, "src/!(e2e-app|components-examples|universal-app|dev-app)/**/!(*.spec).ts"], + "src/!(e2e-app|components-examples|universal-app|dev-app)/**/!(*.spec).ts" + ], "require-license-banner": [ true, "src/!(e2e-app|components-examples|universal-app)/**/!(*.spec).ts", @@ -154,12 +149,15 @@ "!src/cdk/testing/+(private|tests)/**/*", "!src/google-maps/testing/**/*" ], - "file-name-casing": [true, { - // Exclude custom lint rule files since they have to always be camel-cased and end - // with "Rule". - "\\w+Rule.ts": "camel-case", - ".*": "kebab-case" - }], + "file-name-casing": [ + true, + { + // Exclude custom lint rule files since they have to always be camel-cased and end + // with "Rule". + "\\w+Rule.ts": "camel-case", + ".*": "kebab-case" + } + ], "no-unescaped-html-tag": true, // Ensures that all rxjs imports come only from `rxjs` and `rxjs/operators`. Also ensures // that no AST utils from `@schematics/angular` are imported. These should be vendored.