@angular-eslint/eslint-plugin 19.3.1-alpha.0 → 19.3.1-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -66,6 +66,7 @@ Please see https://github.com/angular-eslint/angular-eslint for full usage instr
66
66
  | [`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 at https://angular.dev/style-guide#style-05-12. | | | |
67
67
  | [`pipe-prefix`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/pipe-prefix.md) | Enforce consistent prefix for pipes. | | | |
68
68
  | [`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: |
69
+ | [`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()` | | | |
69
70
  | [`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: |
70
71
  | [`prefer-signals`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-signals.md) | Use readonly signals instead of `@Input()`, `@ViewChild()` and other legacy decorators | | :wrench: | |
71
72
  | [`prefer-standalone`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone.md) | Ensures Components, Directives and Pipes do not opt out of standalone | :white_check_mark: | :wrench: | |
@@ -1,45 +1,46 @@
1
1
  {
2
- "parser": "@typescript-eslint/parser",
3
- "plugins": ["@angular-eslint"],
4
- "rules": {
5
- "@angular-eslint/component-class-suffix": "error",
6
- "@angular-eslint/component-max-inline-declarations": "error",
7
- "@angular-eslint/component-selector": "error",
8
- "@angular-eslint/consistent-component-styles": "error",
9
- "@angular-eslint/contextual-decorator": "error",
10
- "@angular-eslint/contextual-lifecycle": "error",
11
- "@angular-eslint/directive-class-suffix": "error",
12
- "@angular-eslint/directive-selector": "error",
13
- "@angular-eslint/no-async-lifecycle-method": "error",
14
- "@angular-eslint/no-attribute-decorator": "error",
15
- "@angular-eslint/no-conflicting-lifecycle": "error",
16
- "@angular-eslint/no-duplicates-in-metadata-arrays": "error",
17
- "@angular-eslint/no-empty-lifecycle-method": "error",
18
- "@angular-eslint/no-forward-ref": "error",
19
- "@angular-eslint/no-input-prefix": "error",
20
- "@angular-eslint/no-input-rename": "error",
21
- "@angular-eslint/no-inputs-metadata-property": "error",
22
- "@angular-eslint/no-lifecycle-call": "error",
23
- "@angular-eslint/no-output-native": "error",
24
- "@angular-eslint/no-output-on-prefix": "error",
25
- "@angular-eslint/no-output-rename": "error",
26
- "@angular-eslint/no-outputs-metadata-property": "error",
27
- "@angular-eslint/no-pipe-impure": "error",
28
- "@angular-eslint/no-queries-metadata-property": "error",
29
- "@angular-eslint/pipe-prefix": "error",
30
- "@angular-eslint/prefer-on-push-component-change-detection": "error",
31
- "@angular-eslint/prefer-output-readonly": "error",
32
- "@angular-eslint/prefer-signals": "error",
33
- "@angular-eslint/prefer-standalone": "error",
34
- "@angular-eslint/relative-url-prefix": "error",
35
- "@angular-eslint/require-lifecycle-on-prototype": "error",
36
- "@angular-eslint/require-localize-metadata": "error",
37
- "@angular-eslint/runtime-localize": "error",
38
- "@angular-eslint/sort-lifecycle-methods": "error",
39
- "@angular-eslint/use-component-selector": "error",
40
- "@angular-eslint/use-component-view-encapsulation": "error",
41
- "@angular-eslint/use-injectable-provided-in": "error",
42
- "@angular-eslint/use-lifecycle-interface": "error",
43
- "@angular-eslint/use-pipe-transform-interface": "error"
44
- }
2
+ "parser": "@typescript-eslint/parser",
3
+ "plugins": ["@angular-eslint"],
4
+ "rules": {
5
+ "@angular-eslint/component-class-suffix": "error",
6
+ "@angular-eslint/component-max-inline-declarations": "error",
7
+ "@angular-eslint/component-selector": "error",
8
+ "@angular-eslint/consistent-component-styles": "error",
9
+ "@angular-eslint/contextual-decorator": "error",
10
+ "@angular-eslint/contextual-lifecycle": "error",
11
+ "@angular-eslint/directive-class-suffix": "error",
12
+ "@angular-eslint/directive-selector": "error",
13
+ "@angular-eslint/no-async-lifecycle-method": "error",
14
+ "@angular-eslint/no-attribute-decorator": "error",
15
+ "@angular-eslint/no-conflicting-lifecycle": "error",
16
+ "@angular-eslint/no-duplicates-in-metadata-arrays": "error",
17
+ "@angular-eslint/no-empty-lifecycle-method": "error",
18
+ "@angular-eslint/no-forward-ref": "error",
19
+ "@angular-eslint/no-input-prefix": "error",
20
+ "@angular-eslint/no-input-rename": "error",
21
+ "@angular-eslint/no-inputs-metadata-property": "error",
22
+ "@angular-eslint/no-lifecycle-call": "error",
23
+ "@angular-eslint/no-output-native": "error",
24
+ "@angular-eslint/no-output-on-prefix": "error",
25
+ "@angular-eslint/no-output-rename": "error",
26
+ "@angular-eslint/no-outputs-metadata-property": "error",
27
+ "@angular-eslint/no-pipe-impure": "error",
28
+ "@angular-eslint/no-queries-metadata-property": "error",
29
+ "@angular-eslint/pipe-prefix": "error",
30
+ "@angular-eslint/prefer-on-push-component-change-detection": "error",
31
+ "@angular-eslint/prefer-output-emitter-ref": "error",
32
+ "@angular-eslint/prefer-output-readonly": "error",
33
+ "@angular-eslint/prefer-signals": "error",
34
+ "@angular-eslint/prefer-standalone": "error",
35
+ "@angular-eslint/relative-url-prefix": "error",
36
+ "@angular-eslint/require-lifecycle-on-prototype": "error",
37
+ "@angular-eslint/require-localize-metadata": "error",
38
+ "@angular-eslint/runtime-localize": "error",
39
+ "@angular-eslint/sort-lifecycle-methods": "error",
40
+ "@angular-eslint/use-component-selector": "error",
41
+ "@angular-eslint/use-component-view-encapsulation": "error",
42
+ "@angular-eslint/use-injectable-provided-in": "error",
43
+ "@angular-eslint/use-lifecycle-interface": "error",
44
+ "@angular-eslint/use-pipe-transform-interface": "error"
45
+ }
45
46
  }
@@ -1,19 +1,19 @@
1
1
  {
2
- "parser": "@typescript-eslint/parser",
3
- "plugins": ["@angular-eslint"],
4
- "rules": {
5
- "@angular-eslint/component-class-suffix": "error",
6
- "@angular-eslint/contextual-lifecycle": "error",
7
- "@angular-eslint/directive-class-suffix": "error",
8
- "@angular-eslint/no-empty-lifecycle-method": "error",
9
- "@angular-eslint/no-input-rename": "error",
10
- "@angular-eslint/no-inputs-metadata-property": "error",
11
- "@angular-eslint/no-output-native": "error",
12
- "@angular-eslint/no-output-on-prefix": "error",
13
- "@angular-eslint/no-output-rename": "error",
14
- "@angular-eslint/no-outputs-metadata-property": "error",
15
- "@angular-eslint/prefer-standalone": "error",
16
- "@angular-eslint/use-pipe-transform-interface": "error",
17
- "@angular-eslint/use-lifecycle-interface": "warn"
18
- }
2
+ "parser": "@typescript-eslint/parser",
3
+ "plugins": ["@angular-eslint"],
4
+ "rules": {
5
+ "@angular-eslint/component-class-suffix": "error",
6
+ "@angular-eslint/contextual-lifecycle": "error",
7
+ "@angular-eslint/directive-class-suffix": "error",
8
+ "@angular-eslint/no-empty-lifecycle-method": "error",
9
+ "@angular-eslint/no-input-rename": "error",
10
+ "@angular-eslint/no-inputs-metadata-property": "error",
11
+ "@angular-eslint/no-output-native": "error",
12
+ "@angular-eslint/no-output-on-prefix": "error",
13
+ "@angular-eslint/no-output-rename": "error",
14
+ "@angular-eslint/no-outputs-metadata-property": "error",
15
+ "@angular-eslint/prefer-standalone": "error",
16
+ "@angular-eslint/use-pipe-transform-interface": "error",
17
+ "@angular-eslint/use-lifecycle-interface": "warn"
18
+ }
19
19
  }
package/dist/index.d.ts CHANGED
@@ -30,6 +30,7 @@ declare const _default: {
30
30
  "@angular-eslint/no-queries-metadata-property": string;
31
31
  "@angular-eslint/pipe-prefix": string;
32
32
  "@angular-eslint/prefer-on-push-component-change-detection": string;
33
+ "@angular-eslint/prefer-output-emitter-ref": string;
33
34
  "@angular-eslint/prefer-output-readonly": string;
34
35
  "@angular-eslint/prefer-signals": string;
35
36
  "@angular-eslint/prefer-standalone": string;
@@ -100,6 +101,7 @@ declare const _default: {
100
101
  additionalSignalCreationFunctions: string[];
101
102
  }], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
102
103
  "prefer-standalone": import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferStandalone", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
104
+ "prefer-output-emitter-ref": import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferOutputEmitterRef", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
103
105
  "prefer-output-readonly": import("@typescript-eslint/utils/ts-eslint").RuleModule<import("./rules/prefer-output-readonly").MessageIds, [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
104
106
  "relative-url-prefix": import("@typescript-eslint/utils/ts-eslint").RuleModule<"relativeUrlPrefix", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
105
107
  "require-lifecycle-on-prototype": import("@typescript-eslint/utils/ts-eslint").RuleModule<"defineOnPrototype", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHA,kBA+CE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4HA,kBAgDE"}
package/dist/index.js CHANGED
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
@@ -52,6 +62,7 @@ const no_pipe_impure_1 = __importStar(require("./rules/no-pipe-impure"));
52
62
  const no_queries_metadata_property_1 = __importStar(require("./rules/no-queries-metadata-property"));
53
63
  const pipe_prefix_1 = __importStar(require("./rules/pipe-prefix"));
54
64
  const prefer_on_push_component_change_detection_1 = __importStar(require("./rules/prefer-on-push-component-change-detection"));
65
+ const prefer_output_emitter_ref_1 = __importStar(require("./rules/prefer-output-emitter-ref"));
55
66
  const prefer_output_readonly_1 = __importStar(require("./rules/prefer-output-readonly"));
56
67
  const prefer_signals_1 = __importStar(require("./rules/prefer-signals"));
57
68
  const prefer_standalone_1 = __importStar(require("./rules/prefer-standalone"));
@@ -100,6 +111,7 @@ module.exports = {
100
111
  [prefer_on_push_component_change_detection_1.RULE_NAME]: prefer_on_push_component_change_detection_1.default,
101
112
  [prefer_signals_1.RULE_NAME]: prefer_signals_1.default,
102
113
  [prefer_standalone_1.RULE_NAME]: prefer_standalone_1.default,
114
+ [prefer_output_emitter_ref_1.RULE_NAME]: prefer_output_emitter_ref_1.default,
103
115
  [prefer_output_readonly_1.RULE_NAME]: prefer_output_readonly_1.default,
104
116
  [relative_url_prefix_1.RULE_NAME]: relative_url_prefix_1.default,
105
117
  [require_lifecycle_on_prototype_1.RULE_NAME]: require_lifecycle_on_prototype_1.default,
@@ -0,0 +1,5 @@
1
+ export type MessageIds = 'preferOutputEmitterRef';
2
+ export declare const RULE_NAME = "prefer-output-emitter-ref";
3
+ declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferOutputEmitterRef", [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
4
+ export default _default;
5
+ //# sourceMappingURL=prefer-output-emitter-ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefer-output-emitter-ref.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-output-emitter-ref.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,UAAU,GAAG,wBAAwB,CAAC;AAClD,eAAO,MAAM,SAAS,8BAA8B,CAAC;;AAErD,wBAqBG"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RULE_NAME = void 0;
4
+ const utils_1 = require("@angular-eslint/utils");
5
+ const create_eslint_rule_1 = require("../utils/create-eslint-rule");
6
+ exports.RULE_NAME = 'prefer-output-emitter-ref';
7
+ exports.default = (0, create_eslint_rule_1.createESLintRule)({
8
+ name: exports.RULE_NAME,
9
+ meta: {
10
+ type: 'suggestion',
11
+ docs: {
12
+ description: 'Use `OutputEmitterRef` instead of `@Output()`',
13
+ },
14
+ schema: [],
15
+ messages: {
16
+ preferOutputEmitterRef: 'Use `OutputEmitterRef` via `output()` for Component and Directive outputs rather than the legacy `@Output()` decorator',
17
+ },
18
+ },
19
+ defaultOptions: [],
20
+ create(context) {
21
+ return {
22
+ [utils_1.Selectors.OUTPUT_DECORATOR]: (node) => {
23
+ context.report({ node, messageId: 'preferOutputEmitterRef' });
24
+ },
25
+ };
26
+ },
27
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-eslint/eslint-plugin",
3
- "version": "19.3.1-alpha.0",
3
+ "version": "19.3.1-alpha.10",
4
4
  "description": "ESLint plugin for Angular applications, following https://angular.dev/style-guide",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -18,11 +18,11 @@
18
18
  "LICENSE"
19
19
  ],
20
20
  "dependencies": {
21
- "@angular-eslint/bundled-angular-compiler": "19.3.1-alpha.0",
22
- "@angular-eslint/utils": "19.3.1-alpha.0"
21
+ "@angular-eslint/bundled-angular-compiler": "19.3.1-alpha.10",
22
+ "@angular-eslint/utils": "19.3.1-alpha.10"
23
23
  },
24
24
  "devDependencies": {
25
- "@angular-eslint/test-utils": "19.3.1-alpha.0"
25
+ "@angular-eslint/test-utils": "19.3.1-alpha.10"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@typescript-eslint/utils": "^7.11.0 || ^8.0.0",