简体   繁体   English

Angular中的ng lint --format = stylish和ng lint有什么区别

[英]What is difference between `ng lint --format=stylish` and `ng lint` in Angular

I was going through ng lint command and also checked ng lint --help but I was unable to find any difference between ng lint --format=prose and ng lint --format=stylish . 我正在执行ng lint命令,还检查了ng lint --help但是我找不到ng lint --format=proseng lint --format=stylish之间的任何区别。 I could not find any documentation for the same.Please help me. 我找不到相同的任何文档。请帮助我。 Can anyone give link to proper documentation for the same. 任何人都可以提供指向相同文档的链接。

In tslint, you have a few formats available . 在tslint,你有几个格式可用

Those formatters are used to format the output of tslint. 这些格式化程序用于格式化tslint的输出。 Prose is the simple human-readable output, and stylish is another human readable output. 散文是简单的人类可读的输出,而时尚是另一种人类可读的输出。

ng lint 在 Angular 14 中引发节点错误:UnhandledPromiseRejectionWarning:#<object><div id="text_translate"><p> 我将我的应用程序从 Angular 13 升级到 14,现在当我尝试使用安装了最新 eslint 的<strong>ng lint</strong>命令时,出现此错误:</p><pre> (node:15376) UnhandledPromiseRejectionWarning: #&lt;Object&gt; (Use `node --trace-warnings...` to show where the warning was created) (node:15376) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with.catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:15376) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.</pre><p> 我不知道如何解决这个问题,而无需降级回 13。这是我的 devDependencies:</p><pre> "devDependencies": { "@angular-devkit/build-angular": "^14.2.1", "@angular-eslint/builder": "14.0.3", "@angular-eslint/eslint-plugin": "14.0.3", "@angular-eslint/eslint-plugin-template": "14.0.3", "@angular-eslint/schematics": "14.0.3", "@angular-eslint/template-parser": "14.0.3", "@angular/cli": "^14.2.1", "@angular/compiler-cli": "^14.2.0", "@angular/language-service": "^14.2.0", "@ngxs/devtools-plugin": "~3.7.1", "@progress/kendo-licensing": "~1.2.2", "@types/lodash": "~4.14.168", "@typescript-eslint/eslint-plugin": "5.29.0", "@typescript-eslint/parser": "5.29.0", "@webcomponents/custom-elements": "^1.4.3", "eslint": "^8.18.0", "eslint-plugin-deprecation": "^1.3.2", "typescript": "^4.6.4" }</pre></div></object> - ng lint throws Node error in Angular 14: UnhandledPromiseRejectionWarning: #<Object>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Angular 6 ng lint combineLatest 已弃用 - Angular 6 ng lint combineLatest is deprecated 带有 Angular 7 和 `ng lint` 的 TypeScript 中的自定义 TSLint 规则 - Custom TSLint Rule in TypeScript with Angular 7 and `ng lint` 角度4,使皮棉错误致命 - Angular 4, Make ng lint error fatal 在文件保存时将 Angular 配置为“ng lint” - Configure Angular to 'ng lint' on file save 不确定如何在角度项目中使用 ng lint - Not sure how to use ng lint in angular project 如何在 angular 项目中调试 ng lint broken - How to debug ng lint broken in angular project angular 项目中 ng lint 期间未处理的异常 - Unhandled exception during ng lint in angular project “ng lint”安静选项? - "ng lint" quiet option? ng lint 在 Angular 14 中引发节点错误:UnhandledPromiseRejectionWarning:#<object><div id="text_translate"><p> 我将我的应用程序从 Angular 13 升级到 14,现在当我尝试使用安装了最新 eslint 的<strong>ng lint</strong>命令时,出现此错误:</p><pre> (node:15376) UnhandledPromiseRejectionWarning: #&lt;Object&gt; (Use `node --trace-warnings...` to show where the warning was created) (node:15376) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with.catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:15376) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.</pre><p> 我不知道如何解决这个问题,而无需降级回 13。这是我的 devDependencies:</p><pre> "devDependencies": { "@angular-devkit/build-angular": "^14.2.1", "@angular-eslint/builder": "14.0.3", "@angular-eslint/eslint-plugin": "14.0.3", "@angular-eslint/eslint-plugin-template": "14.0.3", "@angular-eslint/schematics": "14.0.3", "@angular-eslint/template-parser": "14.0.3", "@angular/cli": "^14.2.1", "@angular/compiler-cli": "^14.2.0", "@angular/language-service": "^14.2.0", "@ngxs/devtools-plugin": "~3.7.1", "@progress/kendo-licensing": "~1.2.2", "@types/lodash": "~4.14.168", "@typescript-eslint/eslint-plugin": "5.29.0", "@typescript-eslint/parser": "5.29.0", "@webcomponents/custom-elements": "^1.4.3", "eslint": "^8.18.0", "eslint-plugin-deprecation": "^1.3.2", "typescript": "^4.6.4" }</pre></div></object> - ng lint throws Node error in Angular 14: UnhandledPromiseRejectionWarning: #<Object> 在Angular中用多个项目迁移TSLint到ESLint,ng lint命令挂起 - Migrate TSLint to ESLint in Angular with multiple projects, ng lint command hangs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM