@benjavicente/lint-angular 0.0.2 → 0.0.4

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.
Files changed (3) hide show
  1. package/README.md +23 -17
  2. package/dist/index.mjs +776 -656
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -1,26 +1,32 @@
1
1
  # `@benjavicente/lint-angular`
2
2
 
3
- Oxlint/ESLint-compatible plugin for Angular project rules.
3
+ Opinated Oxlint/ESLint-compatible plugin for Angular project rules.
4
4
 
5
5
  ## Rules
6
6
 
7
7
 
8
- | Rule | Default | Fixable |
9
- | ----------------------------------------------------------------------------------------------------- | ------- | ------- |
10
- | `[rules-of-inject](./src/rules/rules-of-inject/)` | ✅ | |
11
- | `[avoid-explicit-injection-context](./src/rules/avoid-explicit-injection-context/)` | ✅ | |
12
- | `[avoid-explicit-subscription-management](./src/rules/avoid-explicit-subscription-management/)` | ✅ | |
13
- | `[avoid-ng-modules](./src/rules/avoid-ng-modules/)` | ✅ | |
14
- | `[avoid-rxjs-state-in-component](./src/rules/avoid-rxjs-state-in-component/)` | ✅ | |
15
- | `[avoid-writing-signals-in-reactive-context](./src/rules/avoid-writing-signals-in-reactive-context/)` | ✅ | |
16
- | `[class-member-order](./src/rules/class-member-order/)` | ✅ | |
17
- | `[component-class-matches-filename](./src/rules/component-class-matches-filename/)` | ✅ | |
18
- | `[component-resource-filenames](./src/rules/component-resource-filenames/)` | ✅ | |
19
- | `[prefer-private-elements](./src/rules/prefer-private-elements/)` | ✅ | |
20
- | `[prefer-load-component-over-load-children](./src/rules/prefer-load-component-over-load-children/)` | ✅ | |
21
- | `[prefer-style-url](./src/rules/prefer-style-url/)` | ✅ | |
22
- | `[public-component-interface](./src/rules/public-component-interface/)` | ✅ | |
23
- | `[restrict-injectable-provided-in](./src/rules/restrict-injectable-provided-in/)` | ✅ | |
8
+ | Rule | Default | Fixable | Description |
9
+ | ----------------------------------------------------------------------------------------------------- | ------- | ------- | -------------------------------------------------------------------------------------------- |
10
+ | [`rules-of-inject`](./src/rules/rules-of-inject/) | ✅ | | Restrict `inject()` usage to valid Angular injection contexts. |
11
+ | [`avoid-explicit-injection-context`](./src/rules/avoid-explicit-injection-context/) | ✅ | | Avoid explicit injection-context APIs such as `inject(Injector)` and `runInInjectionContext`. |
12
+ | [`avoid-explicit-subscription-management`](./src/rules/avoid-explicit-subscription-management/) | ✅ | | Avoid storing and manually managing RxJS subscriptions in Angular classes. |
13
+ | [`avoid-inappropriate-intimacy`](./src/rules/avoid-inappropriate-intimacy/) | ✅ | | Avoid passing Angular component, directive, and service instances as function arguments. |
14
+ | [`avoid-ng-modules`](./src/rules/avoid-ng-modules/) | ✅ | | Avoid NgModules in favor of standalone Angular APIs. |
15
+ | [`avoid-rxjs-state-in-component`](./src/rules/avoid-rxjs-state-in-component/) | ✅ | | Avoid RxJS subjects for component and directive-local state. |
16
+ | [`avoid-writing-signals-in-reactive-context`](./src/rules/avoid-writing-signals-in-reactive-context/) | ✅ | | Avoid writing to signals from reactive Angular contexts. |
17
+ | [`class-member-order`](./src/rules/class-member-order/) | ✅ | | Enforce a consistent member order for Angular classes. |
18
+ | [`class-matches-filename`](./src/rules/class-matches-filename/) | ✅ | | Require Angular class names to match component, directive, and service filenames. |
19
+ | [`component-resource-filenames`](./src/rules/component-resource-filenames/) | ✅ | | Require component resource filenames to match the component TypeScript filename. |
20
+ | [`decorator-filename-suffix`](./src/rules/decorator-filename-suffix/) | ✅ | | Require Angular decorators to be declared in files with matching filename suffixes. |
21
+ | [`injects-tanstack-query-only-in-component-body`](./src/rules/injects-tanstack-query-only-in-component-body/) | ✅ | | Require TanStack Query inject helpers to be direct component/directive class fields. |
22
+ | [`no-resource-api`](./src/rules/no-resource-api/) | ✅ | | Avoid Angular resource APIs for server state. |
23
+ | [`no-route-resolvers`](./src/rules/no-route-resolvers/) | ✅ | | Avoid Angular route resolvers for data loading. |
24
+ | [`no-ui-inheritance`](./src/rules/no-ui-inheritance/) | ✅ | | Avoid inheritance for Angular components and directives. |
25
+ | [`prefer-private-elements`](./src/rules/prefer-private-elements/) | ✅ | ✅ | Prefer ECMAScript private elements over TypeScript `private` members. |
26
+ | [`prefer-load-component-over-load-children`](./src/rules/prefer-load-component-over-load-children/) | ✅ | | Prefer `loadComponent` for lazy routes that load a standalone component. |
27
+ | [`prefer-style-url`](./src/rules/prefer-style-url/) | ✅ | ✅ | Prefer `styleUrl` when a component has exactly one stylesheet. |
28
+ | [`public-component-interface`](./src/rules/public-component-interface/) | ✅ | ✅ | Keep component and directive signal interfaces public while hiding injected dependencies. |
29
+ | [`restrict-injectable-provided-in`](./src/rules/restrict-injectable-provided-in/) | ✅ | | Restrict `@Injectable` `providedIn` values to `root` or `platform`. |
24
30
 
25
31
 
26
32
  ## Oxlint setup