@angular-eslint/schematics 17.0.0-alpha.0 → 17.0.1-alpha.0
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/dist/add-eslint-to-project/index.d.ts +6 -0
- package/dist/application/index.d.ts +11 -0
- package/dist/convert-tslint-to-eslint/index.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/library/index.d.ts +11 -0
- package/dist/migrations/update-12-0-0/update-12-0-0.d.ts +2 -0
- package/dist/migrations/update-13-0-0/update-13-0-0.d.ts +2 -0
- package/dist/migrations/update-14-0-0/update-14-0-0.d.ts +2 -0
- package/dist/migrations/update-15-0-0/update-15-0-0.d.ts +2 -0
- package/dist/migrations/update-16-0-0/update-16-0-0.d.ts +2 -0
- package/dist/migrations/update-17-0-0/update-17-0-0.d.ts +2 -0
- package/dist/migrations/update-2-0-0/update-2-0-0.d.ts +2 -0
- package/dist/migrations/update-3-0-0/update-3-0-0.d.ts +2 -0
- package/dist/migrations/update-4-0-0/update-4-0-0.d.ts +2 -0
- package/dist/migrations/utils/dependencies.d.ts +5 -0
- package/dist/ng-add/index.d.ts +2 -0
- package/dist/utils.d.ts +81 -0
- package/dist/workspace/index.d.ts +2 -0
- package/package.json +6 -6
|
@@ -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;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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;
|
package/dist/utils.d.ts
ADDED
|
@@ -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 {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/schematics",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.1-alpha.0+4eddce1",
|
|
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": "17.0.
|
|
37
|
-
"@angular-eslint/eslint-plugin-template": "17.0.
|
|
36
|
+
"@angular-eslint/eslint-plugin": "17.0.1-alpha.0+4eddce1",
|
|
37
|
+
"@angular-eslint/eslint-plugin-template": "17.0.1-alpha.0+4eddce1",
|
|
38
38
|
"@nx/devkit": "17.0.3",
|
|
39
39
|
"ignore": "5.2.4",
|
|
40
40
|
"nx": "17.0.3",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"tmp": "0.2.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@types/tmp": "0.2.
|
|
45
|
+
"@types/tmp": "0.2.6",
|
|
46
46
|
"@typescript-eslint/utils": "6.10.0",
|
|
47
47
|
"eslint": "8.53.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@angular/cli": ">= 17.0.0
|
|
50
|
+
"@angular/cli": ">= 17.0.0 < 18.0.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "4eddce1ede6e3baccb297dcbb5b980af95126f64"
|
|
53
53
|
}
|