@angular-eslint/test-utils 19.6.1-alpha.0 → 20.0.0-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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InvalidTestCase, SuggestionOutput } from '@typescript-eslint/rule-tester';
|
|
1
|
+
import type { InvalidTestCase, SuggestionOutput, TestLanguageOptions } from '@typescript-eslint/rule-tester';
|
|
2
2
|
/**
|
|
3
3
|
* When leveraging the convertAnnotatedSourceToFailureCase() utility, the
|
|
4
4
|
* following characters are eligible to be used in the source code of expected
|
|
@@ -10,6 +10,7 @@ import type { InvalidTestCase, SuggestionOutput } from '@typescript-eslint/rule-
|
|
|
10
10
|
*/
|
|
11
11
|
export declare const SPECIAL_UNDERLINE_CHARS: readonly ["~", "^", "#", "%", "¶", "*", "¨", "@"];
|
|
12
12
|
type MultipleErrorOptions<TMessageIds extends string, Options extends readonly unknown[]> = BaseErrorOptions<Options> & {
|
|
13
|
+
readonly languageOptions?: TestLanguageOptions;
|
|
13
14
|
readonly messages: readonly (Message<TMessageIds> & {
|
|
14
15
|
readonly char: (typeof SPECIAL_UNDERLINE_CHARS)[number];
|
|
15
16
|
})[];
|
|
@@ -28,7 +29,9 @@ type Message<TMessageIds extends string> = {
|
|
|
28
29
|
readonly data?: Record<string, unknown>;
|
|
29
30
|
readonly suggestions?: SuggestionOutput<TMessageIds>[];
|
|
30
31
|
};
|
|
31
|
-
type SingleErrorOptions<TMessageIds extends string, Options extends readonly unknown[]> = BaseErrorOptions<Options> & Message<TMessageIds
|
|
32
|
+
type SingleErrorOptions<TMessageIds extends string, Options extends readonly unknown[]> = BaseErrorOptions<Options> & Message<TMessageIds> & {
|
|
33
|
+
readonly languageOptions?: TestLanguageOptions;
|
|
34
|
+
};
|
|
32
35
|
/**
|
|
33
36
|
* convertAnnotatedSourceToFailureCase() provides an ergonomic way to easily write
|
|
34
37
|
* expected failure cases for ESLint rules by allowing you to directly annotate the
|
|
@@ -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,EACV,eAAe,EACf,gBAAgB,
|
|
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,EACV,eAAe,EACf,gBAAgB,EAEhB,mBAAmB,EACpB,MAAM,gCAAgC,CAAC;AAExC;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,mDAS1B,CAAC;AAEX,KAAK,oBAAoB,CACvB,WAAW,SAAS,MAAM,EAC1B,OAAO,SAAS,SAAS,OAAO,EAAE,IAChC,gBAAgB,CAAC,OAAO,CAAC,GAAG;IAC9B,QAAQ,CAAC,eAAe,CAAC,EAAE,mBAAmB,CAAC;IAC/C,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,CAAC,OAAO,IAAI;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,KAAK,OAAO,CAAC,WAAW,SAAS,MAAM,IAAI;IACzC,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,QAAQ,CAAC,WAAW,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,EAAE,CAAC;CACxD,CAAC;AAEF,KAAK,kBAAkB,CACrB,WAAW,SAAS,MAAM,EAC1B,OAAO,SAAS,SAAS,OAAO,EAAE,IAChC,gBAAgB,CAAC,OAAO,CAAC,GAC3B,OAAO,CAAC,WAAW,CAAC,GAAG;IACrB,QAAQ,CAAC,eAAe,CAAC,EAAE,mBAAmB,CAAC;CAChD,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,mCAAmC,CACjD,WAAW,SAAS,MAAM,EAC1B,OAAO,SAAS,SAAS,OAAO,EAAE,EAElC,YAAY,EAAE,kBAAkB,CAAC,WAAW,EAAE,OAAO,CAAC,GACrD,eAAe,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AACzC,wBAAgB,mCAAmC,CACjD,WAAW,SAAS,MAAM,EAC1B,OAAO,SAAS,SAAS,OAAO,EAAE,EAElC,YAAY,EAAE,oBAAoB,CAAC,WAAW,EAAE,OAAO,CAAC,GACvD,eAAe,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -60,6 +60,7 @@ function convertAnnotatedSourceToFailureCase(errorOptions) {
|
|
|
60
60
|
: parsedSource,
|
|
61
61
|
filename: errorOptions.filename,
|
|
62
62
|
options: errorOptions.options ?? [],
|
|
63
|
+
languageOptions: errorOptions.languageOptions,
|
|
63
64
|
errors,
|
|
64
65
|
only: errorOptions.only ?? false,
|
|
65
66
|
output: errorOptions.annotatedOutputs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/test-utils",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0-alpha.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@typescript-eslint/utils": "^7.11.0 || ^8.0.0",
|
|
23
23
|
"eslint": "^8.57.0 || ^9.0.0",
|
|
24
24
|
"typescript": "*",
|
|
25
|
-
"@angular-eslint/template-parser": "
|
|
25
|
+
"@angular-eslint/template-parser": "20.0.0-alpha.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependenciesMeta": {
|
|
28
28
|
"@angular-eslint/template-parser": {
|