Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc8367d3

Browse files
committed
feat(eslint-lint)!: add prefer-inject to recommended
1 parentb5ed8d7 commitc8367d3

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

‎packages/angular-eslint/src/configs/ts-recommended.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default (
2424
'@angular-eslint/no-output-on-prefix':'error',
2525
'@angular-eslint/no-output-rename':'error',
2626
'@angular-eslint/no-outputs-metadata-property':'error',
27+
'@angular-eslint/prefer-inject':'error',
2728
'@angular-eslint/prefer-standalone':'error',
2829
'@angular-eslint/use-pipe-transform-interface':'error',
2930
'@angular-eslint/use-lifecycle-interface':'warn',

‎packages/eslint-plugin/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Please see https://github.com/angular-eslint/angular-eslint for full usage instr
6666
|[`no-queries-metadata-property`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-queries-metadata-property.md)| Disallows usage of the`queries` metadata property. See more athttps://angular.dev/style-guide#style-05-12.||||
6767
|[`no-uncalled-signals`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-uncalled-signals.md)| Warns user about unintentionally doing logic on the signal, rather than the signal's value|||:bulb:|
6868
|[`pipe-prefix`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/pipe-prefix.md)| Enforce consistent prefix for pipes.||||
69-
|[`prefer-inject`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-inject.md)| Prefer using the inject() function over constructor parameter injection||||
69+
|[`prefer-inject`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-inject.md)| Prefer using the inject() function over constructor parameter injection|:white_check_mark:|||
7070
|[`prefer-on-push-component-change-detection`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-on-push-component-change-detection.md)| Ensures component's`changeDetection` is set to`ChangeDetectionStrategy.OnPush`|||:bulb:|
7171
|[`prefer-output-emitter-ref`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-output-emitter-ref.md)| Use`OutputEmitterRef` instead of`@Output()`||||
7272
|[`prefer-output-readonly`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-output-readonly.md)| Prefer to declare`@Output`,`OutputEmitterRef` and`OutputRef` as`readonly` since they are not supposed to be reassigned|||:bulb:|

‎packages/eslint-plugin/src/configs/recommended.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"@angular-eslint/no-output-on-prefix":"error",
1111
"@angular-eslint/no-output-rename":"error",
1212
"@angular-eslint/no-outputs-metadata-property":"error",
13+
"@angular-eslint/prefer-inject":"error",
1314
"@angular-eslint/prefer-standalone":"error",
1415
"@angular-eslint/use-pipe-transform-interface":"error",
1516
"@angular-eslint/use-lifecycle-interface":"warn"

‎packages/eslint-plugin/src/rules/prefer-inject.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default createESLintRule<Options, MessageIds>({
1414
docs:{
1515
description:
1616
'Prefer using the inject() function over constructor parameter injection',
17+
recommended:'recommended',
1718
},
1819
schema:[],
1920
messages:{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp