@angular-eslint/schematics 16.2.1-alpha.32 → 16.2.1-alpha.38

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.
@@ -0,0 +1,6 @@
1
+ interface Schema {
2
+ project?: string;
3
+ setParserOptionsProject?: boolean;
4
+ }
5
+ declare const _default: (generatorOptions: Schema) => (tree: any, context: any) => Promise<any>;
6
+ export default _default;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * We are able to use the full, unaltered Schema directly from @schematics/angular
3
+ * The applicable json file is copied from node_modules as a prebuiid step to ensure
4
+ * they stay in sync.
5
+ */
6
+ import type { Schema as AngularSchema } from '@schematics/angular/application/schema';
7
+ interface Schema extends AngularSchema {
8
+ setParserOptionsProject?: boolean;
9
+ }
10
+ declare const _default: (generatorOptions: Schema) => (tree: any, context: any) => Promise<any>;
11
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ export default function (): Rule;
File without changes
@@ -0,0 +1,11 @@
1
+ /**
2
+ * We are able to use the full, unaltered Schema directly from @schematics/angular
3
+ * The applicable json file is copied from node_modules as a prebuiid step to ensure
4
+ * they stay in sync.
5
+ */
6
+ import type { Schema as AngularSchema } from '@schematics/angular/library/schema';
7
+ interface Schema extends AngularSchema {
8
+ setParserOptionsProject?: boolean;
9
+ }
10
+ declare const _default: (generatorOptions: Schema) => (tree: any, context: any) => Promise<any>;
11
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ export default function migration(): Rule;
@@ -0,0 +1,2 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ export default function migration(): Rule;
@@ -0,0 +1,2 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ export default function migration(): Rule;
@@ -0,0 +1,2 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ export default function migration(): Rule;
@@ -0,0 +1,2 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ export default function migration(): Rule;
@@ -0,0 +1,2 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ export default function (): Rule;
@@ -0,0 +1,2 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ export default function (): Rule;
@@ -0,0 +1,2 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ export default function (): Rule;
@@ -0,0 +1,5 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ export declare function updateDependencies(depsToUpdate: {
3
+ packageName: string;
4
+ version: string;
5
+ }[]): Rule;
@@ -0,0 +1,2 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ export default function (): Rule;
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Some utils taken from various parts of Nx:
3
+ * https://github.com/nrwl/nx
4
+ *
5
+ * Thanks, Nrwl folks!
6
+ */
7
+ import type { Path } from '@angular-devkit/core';
8
+ import type { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
9
+ import type { Tree as NxTree } from '@nx/devkit';
10
+ /**
11
+ * This method is specifically for reading JSON files in a Tree
12
+ * @param host The host tree
13
+ * @param path The path to the JSON file
14
+ * @returns The JSON data in the file.
15
+ */
16
+ export declare function readJsonInTree<T = any>(host: Tree, path: string): T;
17
+ /**
18
+ * This method is specifically for updating JSON in a Tree
19
+ * @param path Path of JSON file in the Tree
20
+ * @param callback Manipulation of the JSON data
21
+ * @returns A rule which updates a JSON file file in a Tree
22
+ */
23
+ export declare function updateJsonInTree<T = any, O = T>(path: string, callback: (json: T, context: SchematicContext) => O): Rule;
24
+ type TargetsConfig = Record<string, {
25
+ builder: string;
26
+ options: unknown;
27
+ }>;
28
+ export declare function getTargetsConfigFromProject(projectConfig: {
29
+ architect?: TargetsConfig;
30
+ } & {
31
+ targets?: TargetsConfig;
32
+ }): TargetsConfig | null;
33
+ export declare function addESLintTargetToProject__NX(tree: NxTree, projectName: string, targetName: 'eslint' | 'lint'): void;
34
+ export declare function addESLintTargetToProject(projectName: string, targetName: 'eslint' | 'lint'): Rule;
35
+ /**
36
+ * Utility to act on all files in a tree that are not ignored by git.
37
+ */
38
+ export declare function visitNotIgnoredFiles(visitor: (file: Path, host: Tree, context: SchematicContext) => void | Rule, dir?: Path): Rule;
39
+ export declare function createRootESLintConfig(prefix: string | null): {
40
+ root: boolean;
41
+ ignorePatterns: string[];
42
+ overrides: {
43
+ files: string[];
44
+ extends: string[];
45
+ rules: {
46
+ '@angular-eslint/directive-selector': (string | {
47
+ type: string;
48
+ prefix: string;
49
+ style: string;
50
+ })[];
51
+ '@angular-eslint/component-selector': (string | {
52
+ type: string;
53
+ prefix: string;
54
+ style: string;
55
+ })[];
56
+ } | {
57
+ '@angular-eslint/directive-selector'?: undefined;
58
+ '@angular-eslint/component-selector'?: undefined;
59
+ };
60
+ }[];
61
+ };
62
+ export declare function createESLintConfigForProject__NX(tree: NxTree, projectName: string, setParserOptionsProject: boolean): void;
63
+ export declare function createESLintConfigForProject(projectName: string, setParserOptionsProject: boolean): Rule;
64
+ export declare function sortObjectByKeys(obj: Record<string, unknown>): Record<string, unknown>;
65
+ /**
66
+ * To make certain schematic usage conversion more ergonomic, if the user does not specify a project
67
+ * and only has a single project in their angular.json we will just go ahead and use that one.
68
+ */
69
+ export declare function determineTargetProjectName__NX(tree: NxTree, maybeProject?: string): string | null;
70
+ /**
71
+ * To make certain schematic usage conversion more ergonomic, if the user does not specify a project
72
+ * and only has a single project in their angular.json we will just go ahead and use that one.
73
+ */
74
+ export declare function determineTargetProjectName(tree: Tree, maybeProject?: string): string | null;
75
+ /**
76
+ * See `schematicCollections` docs here:
77
+ * https://github.com/angular/angular-cli/blob/8431b3f0769b5f95b9e13807a09293d820c4b017/docs/specifications/schematic-collections-config.md
78
+ */
79
+ export declare function updateSchematicCollections(angularJson: Record<string, any>): Record<string, any>;
80
+ export declare function updateSchematicDefaults(angularJson: Record<string, any>, schematicFullName: string, defaultValues: Record<string, unknown>): Record<string, any>;
81
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ export default function (): Rule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-eslint/schematics",
3
- "version": "16.2.1-alpha.32+59b3204",
3
+ "version": "16.2.1-alpha.38+f18e0d3",
4
4
  "description": "Angular Schematics for angular-eslint",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -33,8 +33,8 @@
33
33
  "save": "devDependencies"
34
34
  },
35
35
  "dependencies": {
36
- "@angular-eslint/eslint-plugin": "16.2.1-alpha.32+59b3204",
37
- "@angular-eslint/eslint-plugin-template": "16.2.1-alpha.32+59b3204",
36
+ "@angular-eslint/eslint-plugin": "16.2.1-alpha.38+f18e0d3",
37
+ "@angular-eslint/eslint-plugin-template": "16.2.1-alpha.38+f18e0d3",
38
38
  "@nx/devkit": "16.5.1",
39
39
  "ignore": "5.2.4",
40
40
  "nx": "16.5.1",
@@ -49,5 +49,5 @@
49
49
  "peerDependencies": {
50
50
  "@angular/cli": ">= 16.0.0 < 17.0.0"
51
51
  },
52
- "gitHead": "59b32048abdeb775de7d7e9c03cfd9675aad9744"
52
+ "gitHead": "f18e0d3fd38ab7e45d929099d33ac69144fd3800"
53
53
  }