diff --git a/.circleci/config.yml b/.circleci/config.yml index e24fa49b44..6933d1d122 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -272,12 +272,6 @@ jobs: - custom_attach_workspace - init_environment - - run: 'yarn bazel:format -mode=check || - (echo "BUILD files not formatted. Please run ''yarn bazel:format''" ; exit 1)' - # Run the skylark linter to check our Bazel rules - - run: 'yarn bazel:lint || - (echo -e "\n.bzl files have lint errors. Please run ''yarn bazel:lint-fix''"; exit 1)' - - run: yarn -s tslint - run: yarn -s ng-dev format changed $CI_GIT_BASE_REVISION --check - run: yarn -s ts-circular-deps:check diff --git a/.dev-infra.json b/.dev-infra.json index b3d7b3f2ec..bd898f7593 100644 --- a/.dev-infra.json +++ b/.dev-infra.json @@ -45,8 +45,8 @@ ] }, "format": { - "matchers": { - "jsTs": [ + "clang-format": { + "matchers": [ "dev-infra/**/*.{js,ts}", "packages/**/*.{js,ts}", "!packages/zone.js", @@ -66,6 +66,7 @@ "!**/built/**", "!shims_for_IE.js" ] - } + }, + "buildifier": true } } diff --git a/dev-infra/format/cli.ts b/dev-infra/format/cli.ts index 71221e8ee1..df30064931 100644 --- a/dev-infra/format/cli.ts +++ b/dev-infra/format/cli.ts @@ -62,7 +62,6 @@ export function buildFormatParser(localYargs: yargs.Argv) { console.warn(` yarn ng-dev format --help`); console.warn(); console.warn(`For more on the rationale and effects of this deprecation visit:`); - // TODO(josephperrott): Update this PR to the correct URL. console.warn(` https://github.com/angular/angular/pull/36842#issue-410321447`); }); } diff --git a/package.json b/package.json index af23b3c8ba..7a6bf715c0 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,9 @@ "url": "https://github.com/angular/angular.git" }, "scripts": { - "bazel:format": "find . -type f \\( -name \"*.bzl\" -or -name WORKSPACE -or -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs buildifier -v --warnings=attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,constant-glob,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,git-repository,http-archive,integer-division,load,load-on-top,native-build,native-package,output-group,package-name,package-on-top,positional-args,redefined-variable,repository-name,same-origin-load,string-iteration,unused-variable", - "bazel:lint": "yarn bazel:format --lint=warn", - "bazel:lint-fix": "yarn bazel:format --lint=fix", + "bazel:format": "yarn -s ng-dev format deprecation-warning bazel:format", + "bazel:lint": "yarn -s ng-dev format deprecation-warning bazel:lint", + "bazel:lint-fix": "yarn -s ng-dev format deprecation-warning bazel:lint-fix", "preinstall": "node tools/yarn/check-yarn.js", "postinstall": "node scripts/webdriver-manager-update.js && node --preserve-symlinks --preserve-symlinks-main ./tools/postinstall-patches.js", "check-env": "gulp check-env",