@angular-eslint/utils 18.0.0-alpha.1 → 18.0.0-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/dist/convert-annotated-source-to-failure-case.d.ts +1 -0
- package/dist/convert-annotated-source-to-failure-case.d.ts.map +1 -1
- package/dist/convert-annotated-source-to-failure-case.js +8 -3
- package/dist/eslint-plugin/ast-utils.d.ts +1 -1
- package/dist/eslint-plugin/ast-utils.js +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -5
- package/dist/rule-tester.d.ts +13 -0
- package/dist/rule-tester.d.ts.map +1 -0
- package/dist/rule-tester.js +93 -0
- package/dist/rules-tester.d.ts +3 -2
- package/dist/rules-tester.d.ts.map +1 -1
- package/dist/rules-tester.js +2 -2
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-annotated-source-to-failure-case.d.ts","sourceRoot":"","sources":["../src/convert-annotated-source-to-failure-case.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,mDAS1B,CAAC;AAEX,KAAK,oBAAoB,CAAC,WAAW,SAAS,MAAM,IAAI,gBAAgB,GAAG;IACzE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG;QAClD,QAAQ,CAAC,IAAI,EAAE,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;KACzD,CAAC,EAAE,CAAC;CACN,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC,QAAQ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AAQ,CAAC,eAAe,CAAC,WAAW,EAAE,SAAS,OAAO,EAAE,CAAC,CAAC"}
|
|
@@ -21,6 +21,9 @@ exports.SPECIAL_UNDERLINE_CHARS = [
|
|
|
21
21
|
'@',
|
|
22
22
|
];
|
|
23
23
|
function convertAnnotatedSourceToFailureCase(errorOptions) {
|
|
24
|
+
if (errorOptions.annotatedOutput && errorOptions.annotatedOutputs) {
|
|
25
|
+
throw new Error('Only one of `annotatedOutput` and `annotatedOutputs` should be provided');
|
|
26
|
+
}
|
|
24
27
|
const messages = 'messageId' in errorOptions
|
|
25
28
|
? [{ ...errorOptions, char: '~' }]
|
|
26
29
|
: errorOptions.messages;
|
|
@@ -52,9 +55,11 @@ function convertAnnotatedSourceToFailureCase(errorOptions) {
|
|
|
52
55
|
options: errorOptions.options ?? [],
|
|
53
56
|
errors,
|
|
54
57
|
only: errorOptions.only ?? false,
|
|
55
|
-
output: errorOptions.
|
|
56
|
-
?
|
|
57
|
-
:
|
|
58
|
+
output: errorOptions.annotatedOutputs
|
|
59
|
+
? errorOptions.annotatedOutputs.map((s) => parseInvalidSource(s).source)
|
|
60
|
+
: errorOptions.annotatedOutput
|
|
61
|
+
? parseInvalidSource(errorOptions.annotatedOutput).source
|
|
62
|
+
: null,
|
|
58
63
|
};
|
|
59
64
|
}
|
|
60
65
|
exports.convertAnnotatedSourceToFailureCase = convertAnnotatedSourceToFailureCase;
|
|
@@ -77,7 +77,7 @@ export declare const angularLifecycleInterfaceKeys: readonly ("AfterContentCheck
|
|
|
77
77
|
export declare const angularLifecycleMethodKeys: readonly ("ngAfterContentChecked" | "ngAfterContentInit" | "ngAfterViewChecked" | "ngAfterViewInit" | "ngDoBootstrap" | "ngDoCheck" | "ngOnChanges" | "ngOnDestroy" | "ngOnInit")[];
|
|
78
78
|
/**
|
|
79
79
|
* See lifecycle event sequence:
|
|
80
|
-
* https://angular.
|
|
80
|
+
* https://angular.dev/guide/components/lifecycle
|
|
81
81
|
*/
|
|
82
82
|
export declare const angularLifecycleMethodsOrdered: AngularLifecycleMethods[];
|
|
83
83
|
export declare const ANGULAR_CLASS_DECORATOR_LIFECYCLE_METHOD_MAPPER: ReadonlyMap<AngularClassDecoratorKeys, ReadonlySet<AngularLifecycleMethodKeys>>;
|
|
@@ -72,7 +72,7 @@ exports.angularLifecycleInterfaceKeys = (0, utils_2.objectKeys)(AngularLifecycle
|
|
|
72
72
|
exports.angularLifecycleMethodKeys = (0, utils_2.objectKeys)(AngularLifecycleMethods);
|
|
73
73
|
/**
|
|
74
74
|
* See lifecycle event sequence:
|
|
75
|
-
* https://angular.
|
|
75
|
+
* https://angular.dev/guide/components/lifecycle
|
|
76
76
|
*/
|
|
77
77
|
exports.angularLifecycleMethodsOrdered = [
|
|
78
78
|
AngularLifecycleMethods.ngOnChanges,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export * from './convert-annotated-source-to-failure-case';
|
|
2
|
-
export * from './rules-tester';
|
|
3
1
|
export { toHumanReadableText, arrayify, isNotNullOrUndefined, toPattern, kebabToCamelCase, withoutBracketsAndWhitespaces, capitalize, } from './utils';
|
|
4
2
|
export { getAriaAttributeKeys } from './eslint-plugin/get-aria-attribute-keys';
|
|
5
3
|
export { getNativeEventNames } from './eslint-plugin/get-native-event-names';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,QAAQ,EACR,oBAAoB,EACpB,SAAS,EACT,gBAAgB,EAChB,6BAA6B,EAC7B,UAAU,GACX,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAE7E,OAAO,KAAK,QAAQ,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,SAAS,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,aAAa,MAAM,gCAAgC,CAAC;AAEhE,YAAY,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EACL,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,0CAA0C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -15,9 +15,6 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
-
};
|
|
21
18
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
19
|
if (mod && mod.__esModule) return mod;
|
|
23
20
|
var result = {};
|
|
@@ -27,8 +24,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
24
|
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
exports.getTemplateParserServices = exports.ensureTemplateParser = exports.SelectorUtils = exports.Selectors = exports.RuleFixes = exports.ASTUtils = exports.getNativeEventNames = exports.getAriaAttributeKeys = exports.capitalize = exports.withoutBracketsAndWhitespaces = exports.kebabToCamelCase = exports.toPattern = exports.isNotNullOrUndefined = exports.arrayify = exports.toHumanReadableText = void 0;
|
|
30
|
-
__exportStar(require("./convert-annotated-source-to-failure-case"), exports);
|
|
31
|
-
__exportStar(require("./rules-tester"), exports);
|
|
32
27
|
var utils_1 = require("./utils");
|
|
33
28
|
Object.defineProperty(exports, "toHumanReadableText", { enumerable: true, get: function () { return utils_1.toHumanReadableText; } });
|
|
34
29
|
Object.defineProperty(exports, "arrayify", { enumerable: true, get: function () { return utils_1.arrayify; } });
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RuleTester as TSESLintRuleTester } from '@typescript-eslint/rule-tester';
|
|
2
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
3
|
+
declare const VALID_PARSERS: readonly ["@angular-eslint/template-parser", "@typescript-eslint/parser"];
|
|
4
|
+
type RuleTesterConfig = Omit<TSESLint.RuleTesterConfig, 'parser'> & {
|
|
5
|
+
parser: (typeof VALID_PARSERS)[number];
|
|
6
|
+
};
|
|
7
|
+
export declare class RuleTester extends TSESLintRuleTester {
|
|
8
|
+
private filename?;
|
|
9
|
+
constructor(options: RuleTesterConfig);
|
|
10
|
+
run<TMessageIds extends string, TOptions extends readonly unknown[]>(name: string, rule: TSESLint.RuleModule<TMessageIds, TOptions>, { valid, invalid }: TSESLint.RunTests<TMessageIds, TOptions>): void;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=rule-tester.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-tester.d.ts","sourceRoot":"","sources":["../src/rule-tester.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,QAAA,MAAM,aAAa,2EAGT,CAAC;AAEX,KAAK,gBAAgB,GAAG,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,CAAC,GAAG;IAClE,MAAM,EAAE,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;CACxC,CAAC;AAYF,qBAAa,UAAW,SAAQ,kBAAkB;IAChD,OAAO,CAAC,QAAQ,CAAC,CAAc;gBAKnB,OAAO,EAAE,gBAAgB;IA8B5B,GAAG,CAAC,WAAW,SAAS,MAAM,EAAE,QAAQ,SAAS,SAAS,OAAO,EAAE,EAC1E,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,WAAW,EAAE,QAAQ,CAAC,EAChD,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,GAC3D,IAAI;CA0BR"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
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
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.RuleTester = void 0;
|
|
27
|
+
const rule_tester_1 = require("@typescript-eslint/rule-tester");
|
|
28
|
+
const path = __importStar(require("path"));
|
|
29
|
+
const VALID_PARSERS = [
|
|
30
|
+
'@angular-eslint/template-parser',
|
|
31
|
+
'@typescript-eslint/parser',
|
|
32
|
+
];
|
|
33
|
+
function getFixturesRootDir() {
|
|
34
|
+
return path.join(process.cwd(), 'tests/fixtures/');
|
|
35
|
+
}
|
|
36
|
+
function isValidParser(parser) {
|
|
37
|
+
return VALID_PARSERS.includes(parser);
|
|
38
|
+
}
|
|
39
|
+
class RuleTester extends rule_tester_1.RuleTester {
|
|
40
|
+
filename = '';
|
|
41
|
+
// as of eslint 6 you have to provide an absolute path to the parser
|
|
42
|
+
// but that's not as clean to type, this saves us trying to manually enforce
|
|
43
|
+
// that contributors require.resolve everything
|
|
44
|
+
constructor(options) {
|
|
45
|
+
super({
|
|
46
|
+
...options,
|
|
47
|
+
parser: require.resolve(options.parser),
|
|
48
|
+
});
|
|
49
|
+
if (options.parserOptions?.project) {
|
|
50
|
+
this.filename = path.join(options.parserOptions?.tsconfigRootDir ?? getFixturesRootDir(), 'file.ts');
|
|
51
|
+
}
|
|
52
|
+
// make sure that the parser doesn't hold onto file handles between tests
|
|
53
|
+
// on linux (i.e. our CI env), there can be very a limited number of watch handles available
|
|
54
|
+
afterAll(() => {
|
|
55
|
+
try {
|
|
56
|
+
// instead of creating a hard dependency, just use a soft require
|
|
57
|
+
// a bit weird, but if they're using this tooling, it'll be installed
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
59
|
+
require(options.parser).clearCaches();
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
// ignored
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
// as of eslint 6 you have to provide an absolute path to the parser
|
|
67
|
+
// If you don't do that at the test level, the test will fail somewhat cryptically...
|
|
68
|
+
// This is a lot more explicit
|
|
69
|
+
run(name, rule, { valid, invalid }) {
|
|
70
|
+
const errorMessage = `Do not set the parser at the test level unless you want to use a parser other than ${VALID_PARSERS.join(', ')}`;
|
|
71
|
+
const parsedTests = {
|
|
72
|
+
valid: valid.map((test) => {
|
|
73
|
+
if (typeof test !== 'string' && isValidParser(test.parser)) {
|
|
74
|
+
throw Error(errorMessage);
|
|
75
|
+
}
|
|
76
|
+
return typeof test === 'string'
|
|
77
|
+
? { code: test, filename: this.filename }
|
|
78
|
+
: { ...test, filename: test.filename ?? this.filename };
|
|
79
|
+
}),
|
|
80
|
+
invalid: invalid.map((test) => {
|
|
81
|
+
if (isValidParser(test.parser)) {
|
|
82
|
+
throw Error(errorMessage);
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
...test,
|
|
86
|
+
filename: test.filename ?? this.filename,
|
|
87
|
+
};
|
|
88
|
+
}),
|
|
89
|
+
};
|
|
90
|
+
super.run(name, rule, parsedTests);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.RuleTester = RuleTester;
|
package/dist/rules-tester.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RuleTester as TSESLintRuleTester } from '@typescript-eslint/rule-tester';
|
|
2
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
2
3
|
declare const VALID_PARSERS: readonly ["@angular-eslint/template-parser", "@typescript-eslint/parser"];
|
|
3
4
|
type RuleTesterConfig = Omit<TSESLint.RuleTesterConfig, 'parser'> & {
|
|
4
5
|
parser: (typeof VALID_PARSERS)[number];
|
|
5
6
|
};
|
|
6
|
-
export declare class RuleTester extends
|
|
7
|
+
export declare class RuleTester extends TSESLintRuleTester {
|
|
7
8
|
private filename?;
|
|
8
9
|
constructor(options: RuleTesterConfig);
|
|
9
10
|
run<TMessageIds extends string, TOptions extends readonly unknown[]>(name: string, rule: TSESLint.RuleModule<TMessageIds, TOptions>, { valid, invalid }: TSESLint.RunTests<TMessageIds, TOptions>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules-tester.d.ts","sourceRoot":"","sources":["../src/rules-tester.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"rules-tester.d.ts","sourceRoot":"","sources":["../src/rules-tester.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,QAAA,MAAM,aAAa,2EAGT,CAAC;AAEX,KAAK,gBAAgB,GAAG,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,CAAC,GAAG;IAClE,MAAM,EAAE,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;CACxC,CAAC;AAYF,qBAAa,UAAW,SAAQ,kBAAkB;IAChD,OAAO,CAAC,QAAQ,CAAC,CAAc;gBAKnB,OAAO,EAAE,gBAAgB;IA8B5B,GAAG,CAAC,WAAW,SAAS,MAAM,EAAE,QAAQ,SAAS,SAAS,OAAO,EAAE,EAC1E,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,WAAW,EAAE,QAAQ,CAAC,EAChD,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,GAC3D,IAAI;CA0BR"}
|
package/dist/rules-tester.js
CHANGED
|
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.RuleTester = void 0;
|
|
27
|
-
const
|
|
27
|
+
const rule_tester_1 = require("@typescript-eslint/rule-tester");
|
|
28
28
|
const path = __importStar(require("path"));
|
|
29
29
|
const VALID_PARSERS = [
|
|
30
30
|
'@angular-eslint/template-parser',
|
|
@@ -36,7 +36,7 @@ function getFixturesRootDir() {
|
|
|
36
36
|
function isValidParser(parser) {
|
|
37
37
|
return VALID_PARSERS.includes(parser);
|
|
38
38
|
}
|
|
39
|
-
class RuleTester extends
|
|
39
|
+
class RuleTester extends rule_tester_1.RuleTester {
|
|
40
40
|
filename = '';
|
|
41
41
|
// as of eslint 6 you have to provide an absolute path to the parser
|
|
42
42
|
// but that's not as clean to type, this saves us trying to manually enforce
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/utils",
|
|
3
|
-
"version": "18.0.0-alpha.
|
|
3
|
+
"version": "18.0.0-alpha.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"typescript": "*"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@angular-eslint/bundled-angular-compiler": "18.0.0-alpha.
|
|
25
|
-
"@typescript-eslint/utils": "
|
|
24
|
+
"@angular-eslint/bundled-angular-compiler": "18.0.0-alpha.10",
|
|
25
|
+
"@typescript-eslint/utils": "8.0.0-alpha.17"
|
|
26
26
|
},
|
|
27
27
|
"gitHead": "e2006e5e9c99e5a943d1a999e0efa5247d29ec24"
|
|
28
28
|
}
|