@angular-eslint/utils 20.5.2-alpha.4 → 20.5.2-alpha.6
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.
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Check MDN events page for details https://developer.mozilla.org/en-US/docs/Web/Events
|
|
8
8
|
*
|
|
9
|
-
* Event names sourced from @mdn/browser-compat-data@7.1.
|
|
9
|
+
* Event names sourced from @mdn/browser-compat-data@7.1.18
|
|
10
10
|
*/
|
|
11
11
|
export declare function getNativeEventNames(): ReadonlySet<string>;
|
|
12
12
|
//# sourceMappingURL=get-native-event-names.d.ts.map
|
|
@@ -10,7 +10,7 @@ let nativeEventNames = null;
|
|
|
10
10
|
/**
|
|
11
11
|
* Check MDN events page for details https://developer.mozilla.org/en-US/docs/Web/Events
|
|
12
12
|
*
|
|
13
|
-
* Event names sourced from @mdn/browser-compat-data@7.1.
|
|
13
|
+
* Event names sourced from @mdn/browser-compat-data@7.1.18
|
|
14
14
|
*/
|
|
15
15
|
function getNativeEventNames() {
|
|
16
16
|
return (nativeEventNames ??
|
|
@@ -7,8 +7,8 @@ export declare function getImportAddFix({ compatibleWithTypeOnlyImport, fixer, i
|
|
|
7
7
|
node: TSESTree.Node;
|
|
8
8
|
}): TSESLint.RuleFix | undefined;
|
|
9
9
|
export declare function getImportRemoveFix(sourceCode: Readonly<TSESLint.SourceCode>, importDeclarations: readonly TSESTree.ImportDeclaration[], importName: string, fixer: TSESLint.RuleFixer): TSESLint.RuleFix | undefined;
|
|
10
|
-
export declare function getImplementsSchemaFixer({ id, superClass, implements: classImplements }: TSESTree.ClassDeclaration, interfaceName: string): {
|
|
11
|
-
readonly implementsNodeReplace: TSESTree.TSClassImplements | TSESTree.Identifier;
|
|
10
|
+
export declare function getImplementsSchemaFixer({ id, superClass, implements: classImplements, typeParameters, }: TSESTree.ClassDeclaration, interfaceName: string): {
|
|
11
|
+
readonly implementsNodeReplace: TSESTree.TSClassImplements | TSESTree.Identifier | TSESTree.TSTypeParameterDeclaration;
|
|
12
12
|
readonly implementsTextReplace: string;
|
|
13
13
|
};
|
|
14
14
|
export declare function getDecoratorPropertyAddFix({ expression }: TSESTree.Decorator, fixer: TSESLint.RuleFixer, text: string): TSESLint.RuleFix | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-fixes.d.ts","sourceRoot":"","sources":["../../src/eslint-plugin/rule-fixes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAcnE,wBAAgB,eAAe,CAAC,EAC9B,4BAAoC,EACpC,KAAK,EACL,UAAU,EACV,UAAU,EACV,IAAI,GACL,EAAE;IACD,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;CACrB,GAAG,QAAQ,CAAC,OAAO,GAAG,SAAS,CA8B/B;AAED,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EACzC,kBAAkB,EAAE,SAAS,QAAQ,CAAC,iBAAiB,EAAE,EACzD,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,QAAQ,CAAC,SAAS,GACxB,QAAQ,CAAC,OAAO,GAAG,SAAS,CAkC9B;AAED,wBAAgB,wBAAwB,CACtC,
|
|
1
|
+
{"version":3,"file":"rule-fixes.d.ts","sourceRoot":"","sources":["../../src/eslint-plugin/rule-fixes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAcnE,wBAAgB,eAAe,CAAC,EAC9B,4BAAoC,EACpC,KAAK,EACL,UAAU,EACV,UAA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ED,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EACzC,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,KAAK,EAAE,QAAQ,CAAC,SAAS,GACxB,QAAQ,CAAC,OAAO,CAMlB"}
|
|
@@ -53,16 +53,30 @@ function getImportRemoveFix(sourceCode, importDeclarations, importName, fixer) {
|
|
|
53
53
|
importSpecifier.range[1],
|
|
54
54
|
]);
|
|
55
55
|
}
|
|
56
|
-
function getImplementsSchemaFixer({ id, superClass, implements: classImplements }, interfaceName) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
function getImplementsSchemaFixer({ id, superClass, implements: classImplements, typeParameters, }, interfaceName) {
|
|
57
|
+
if (Array.isArray(classImplements) && classImplements.length > 0) {
|
|
58
|
+
return {
|
|
59
|
+
implementsNodeReplace: (0, utils_2.getLast)(classImplements),
|
|
60
|
+
implementsTextReplace: `, ${interfaceName}`,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const implementsTextReplace = ` implements ${interfaceName}`;
|
|
64
|
+
if ((0, utils_2.isNotNullOrUndefined)(superClass)) {
|
|
65
|
+
return {
|
|
66
|
+
implementsNodeReplace: superClass,
|
|
67
|
+
implementsTextReplace,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if ((0, utils_2.isNotNullOrUndefined)(typeParameters)) {
|
|
71
|
+
return {
|
|
72
|
+
implementsNodeReplace: typeParameters,
|
|
73
|
+
implementsTextReplace,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
implementsNodeReplace: id,
|
|
78
|
+
implementsTextReplace,
|
|
79
|
+
};
|
|
66
80
|
}
|
|
67
81
|
function getDecoratorPropertyAddFix({ expression }, fixer, text) {
|
|
68
82
|
if (!(0, ast_utils_1.isCallExpression)(expression)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/utils",
|
|
3
|
-
"version": "20.5.2-alpha.
|
|
3
|
+
"version": "20.5.2-alpha.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"typescript": "*"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@angular-eslint/bundled-angular-compiler": "20.5.2-alpha.
|
|
25
|
+
"@angular-eslint/bundled-angular-compiler": "20.5.2-alpha.6"
|
|
26
26
|
},
|
|
27
27
|
"nx": {
|
|
28
28
|
"namedInputs": {
|