mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
7f137fc27b
With the new ESM version of `ng-dev`, the TypeScript config loading cannot happen automatically because `ts-node` cannot hook into the Node ESM module resolution at runtime. To fix this `ng-dev` is now loading a plain `.ng-dev/config.mjs` and the runtime just needs to be configured accordingly, i.e. running `ng-dev` with `ts-node` so that the ESM loader can be wired up before Node's runtime starts (using e.g. `node --loader`). PR Close #46437
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import {FormatConfig} from '@angular/dev-infra-private/ng-dev';
|
|
|
|
/**
|
|
* Configuration for the `ng-dev format` command.
|
|
*/
|
|
export const format: FormatConfig = {
|
|
'prettier': {
|
|
'matchers': ['**/*.{yaml,yml}'],
|
|
},
|
|
'clang-format': {
|
|
'matchers': [
|
|
'**/*.{js,ts}',
|
|
// TODO: burn down format failures and remove aio and integration exceptions.
|
|
'!aio/**',
|
|
'!integration/**',
|
|
// Both third_party and .yarn are directories containing copied code which should
|
|
// not be modified.
|
|
'!third_party/**',
|
|
'!.yarn/**',
|
|
// Do not format d.ts files as they are generated
|
|
'!**/*.d.ts',
|
|
// Do not format generated ng-dev script
|
|
'!dev-infra/ng-dev.js',
|
|
'!dev-infra/build-worker.js',
|
|
// Do not format compliance test-cases since they must match generated code
|
|
'!packages/compiler-cli/test/compliance/test_cases/**/*.js',
|
|
// Do not format the locale files which are checked-in for Google3, but generated using
|
|
// the `generate-locales-tool` from `packages/common/locales`.
|
|
'!packages/core/src/i18n/locale_en.ts',
|
|
'!packages/common/locales/closure-locale.ts',
|
|
'!packages/common/src/i18n/currencies.ts',
|
|
],
|
|
},
|
|
'buildifier': true,
|
|
};
|