Skip to content

Commit

Permalink
build: update dev-infra package and format json files with prettier (#…
Browse files Browse the repository at this point in the history
…24303)

* build: update angular shared dev-infra code

* 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.

Co-authored-by: Renovate Bot <bot@renovateapp.com>
(cherry picked from commit cff93c8)
  • Loading branch information
devversion authored and zarend committed Feb 3, 2022
1 parent 0181623 commit b0d7386
Show file tree
Hide file tree
Showing 49 changed files with 235 additions and 319 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/lock-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion .ng-dev/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"noEmit": true,
"skipLibCheck": true,
"types": []
},
}
}
90 changes: 62 additions & 28 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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
}
]
}
}
5 changes: 1 addition & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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]": {
Expand Down
4 changes: 1 addition & 3 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
]
}
],
"ignore": [
"firebase.json"
]
"ignore": ["firebase.json"]
}
}
27 changes: 6 additions & 21 deletions goldens/ts-circular-deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
]
["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"]
]
8 changes: 2 additions & 6 deletions goldens/tsec-exemption.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
18 changes: 4 additions & 14 deletions integration/harness-e2e-cli/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": []
}
}
Expand Down
4 changes: 1 addition & 3 deletions integration/harness-e2e-cli/e2e/jasmine.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"spec_dir": "e2e",
"spec_files": [
"**/*.spec.ts"
],
"spec_files": ["**/*.spec.ts"],
"env": {
"random": true
}
Expand Down
2 changes: 1 addition & 1 deletion integration/harness-e2e-cli/e2e/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"type": "module"
"type": "module"
}
10 changes: 5 additions & 5 deletions integration/harness-e2e-cli/e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "es2020",
"target": "es2020",
"moduleResolution": "node",
}
"compilerOptions": {
"module": "es2020",
"target": "es2020",
"moduleResolution": "node"
}
}
9 changes: 2 additions & 7 deletions integration/harness-e2e-cli/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
5 changes: 1 addition & 4 deletions integration/harness-e2e-cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
"importHelpers": true,
"target": "es2017",
"module": "es2020",
"lib": [
"es2020",
"dom"
]
"lib": ["es2020", "dom"]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
Expand Down
14 changes: 3 additions & 11 deletions integration/harness-e2e-cli/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
18 changes: 4 additions & 14 deletions integration/ng-add/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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
}
Expand Down
9 changes: 2 additions & 7 deletions integration/ng-add/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
5 changes: 1 addition & 4 deletions integration/ng-add/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
"importHelpers": true,
"target": "es2017",
"module": "es2020",
"lib": [
"es2018",
"dom"
]
"lib": ["es2018", "dom"]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
Expand Down
Loading

0 comments on commit b0d7386

Please sign in to comment.